File tree 1 file changed +8
-3
lines changed
packages/nx/src/nx-init/angular
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export async function getLegacyMigrationFunctionIfApplicable(
28
28
const angularVersion =
29
29
readModulePackageJson ( '@angular/core' ) . packageJson . version ;
30
30
const majorAngularVersion = major ( angularVersion ) ;
31
- if ( majorAngularVersion > minMajorAngularVersionSupported ) {
31
+ if ( majorAngularVersion >= minMajorAngularVersionSupported ) {
32
32
// non-legacy
33
33
return null ;
34
34
}
@@ -51,9 +51,14 @@ export async function getLegacyMigrationFunctionIfApplicable(
51
51
legacyMigrationCommand = `ng g ${ pkgName } :ng-add --preserve-angular-cli-layout` ;
52
52
} else {
53
53
// use the latest Nx version that supported the Angular version
54
- legacyMigrationCommand = `nx@${
54
+ pkgName = '@nrwl/angular' ;
55
+ pkgVersion = await resolvePackageVersion (
56
+ 'nx' ,
55
57
nxAngularLegacyVersionMap [ majorAngularVersion ]
56
- } init ${ process . argv . slice ( 2 ) . join ( ' ' ) } `;
58
+ ) ;
59
+ legacyMigrationCommand = `nx@${ pkgVersion } init ${ process . argv
60
+ . slice ( 2 )
61
+ . join ( ' ' ) } `;
57
62
}
58
63
59
64
return async ( ) => {
You can’t perform that action at this time.
1 commit comments
vercel[bot] commentedon Mar 31, 2023
Successfully deployed to the following URLs:
nx-dev – ./
nx.dev
nx-five.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app