File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,9 @@ export class InitService implements IInitService {
6060 if ( ! dependencies ) {
6161 projectData . dependencies = Object . create ( null ) ;
6262 }
63- projectData . dependencies [ constants . TNS_CORE_MODULES_NAME ] = this . getVersionData ( constants . TNS_CORE_MODULES_NAME ) . wait ( ) [ "version" ] ;
63+ // In case console is interactive and --force is not specified, do not read the version from package.json, show all available versions to the user.
64+ let tnsCoreModulesVersionInPackageJson = this . useDefaultValue ? projectData . dependencies [ constants . TNS_CORE_MODULES_NAME ] : null ;
65+ projectData . dependencies [ constants . TNS_CORE_MODULES_NAME ] = this . $options . tnsModulesVersion || tnsCoreModulesVersionInPackageJson || this . getVersionData ( constants . TNS_CORE_MODULES_NAME ) . wait ( ) [ "version" ] ;
6466
6567 this . $fs . writeJson ( this . projectFilePath , projectData ) . wait ( ) ;
6668 } catch ( err ) {
@@ -106,7 +108,7 @@ export class InitService implements IInitService {
106108 let data = this . $npm . view ( packageName , "versions" ) . wait ( ) ;
107109 let versions = _ . filter ( data [ latestVersion ] . versions , ( version : string ) => semver . gte ( version , InitService . MIN_SUPPORTED_FRAMEWORK_VERSIONS [ packageName ] ) ) ;
108110 if ( versions . length === 1 ) {
109- this . $logger . info ( `Only ${ versions [ 0 ] } version is available for ${ packageName } framework .` ) ;
111+ this . $logger . info ( `Only ${ versions [ 0 ] } version is available for ${ packageName } .` ) ;
110112 return this . buildVersionData ( versions [ 0 ] ) ;
111113 }
112114 let sortedVersions = versions . sort ( helpers . versionCompare ) . reverse ( ) ;
You can’t perform that action at this time.
0 commit comments