@@ -7,16 +7,14 @@ export class BundleValidatorHelper extends VersionValidatorHelper implements IBu
77 webpack : "nativescript-dev-webpack"
88 } ;
99
10- constructor ( protected $projectData : IProjectData ,
11- protected $errors : IErrors ,
10+ constructor ( protected $errors : IErrors ,
1211 protected $options : IOptions ) {
1312 super ( ) ;
14- this . $projectData . initializeProjectData ( ) ;
1513 }
1614
17- public validate ( minSupportedVersion ?: string ) : void {
15+ public validate ( projectData : IProjectData , minSupportedVersion ?: string ) : void {
1816 if ( this . $options . bundle ) {
19- const currentVersion = this . getBundlerDependencyVersion ( ) ;
17+ const currentVersion = this . getBundlerDependencyVersion ( projectData ) ;
2018 if ( ! currentVersion ) {
2119 this . $errors . failWithoutHelp ( BundleValidatorMessages . MissingBundlePlugin ) ;
2220 }
@@ -28,11 +26,11 @@ export class BundleValidatorHelper extends VersionValidatorHelper implements IBu
2826 }
2927 }
3028
31- public getBundlerDependencyVersion ( bundlerName ?: string ) : string {
29+ public getBundlerDependencyVersion ( projectData : IProjectData , bundlerName ?: string ) : string {
3230 let dependencyVersion = null ;
3331 const bundlePluginName = bundlerName || this . bundlersMap [ this . $options . bundle ] ;
34- const bundlerVersionInDependencies = this . $ projectData. dependencies && this . $ projectData. dependencies [ bundlePluginName ] ;
35- const bundlerVersionInDevDependencies = this . $ projectData. devDependencies && this . $ projectData. devDependencies [ bundlePluginName ] ;
32+ const bundlerVersionInDependencies = projectData . dependencies && projectData . dependencies [ bundlePluginName ] ;
33+ const bundlerVersionInDevDependencies = projectData . devDependencies && projectData . devDependencies [ bundlePluginName ] ;
3634 dependencyVersion = bundlerVersionInDependencies || bundlerVersionInDevDependencies ;
3735
3836 return dependencyVersion ;
0 commit comments