File tree Expand file tree Collapse file tree 6 files changed +14
-11
lines changed
tests/legacy-cli/e2e/tests/commands/add Expand file tree Collapse file tree 6 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ function loadPackageJson(p: string) {
85
85
// Overwrite engines to a common default.
86
86
case 'engines' :
87
87
pkg [ 'engines' ] = {
88
- 'node' : '^12.20.0 || >= 14.0 .0' ,
88
+ 'node' : '^12.20.0 || ^ 14.15.0 || >=16.10 .0' ,
89
89
'npm' : '^6.11.0 || ^7.5.6' ,
90
90
'yarn' : '>= 1.13.0' ,
91
91
} ;
Original file line number Diff line number Diff line change 40
40
"url" : " https://github.com/angular/angular-cli.git"
41
41
},
42
42
"engines" : {
43
- "node" : " ^12.20.0 || ^14.0 .0" ,
43
+ "node" : " ^12.20.0 || ^14.15.0 || ^16.10 .0" ,
44
44
"yarn" : " >=1.21.1 <2" ,
45
45
"npm" : " Please use yarn instead of NPM to install dependencies"
46
46
},
Original file line number Diff line number Diff line change 24
24
// These may not support ES2015 features such as const/let/async/await/etc.
25
25
// These would then crash with a hard to diagnose error message.
26
26
var version = process . versions . node . split ( '.' ) . map ( ( part ) => Number ( part ) ) ;
27
- if ( version [ 0 ] % 2 === 1 && version [ 0 ] > 14 ) {
28
- // Allow new odd numbered releases with a warning (currently v15 +)
27
+ if ( version [ 0 ] % 2 === 1 && version [ 0 ] > 16 ) {
28
+ // Allow new odd numbered releases with a warning (currently v17 +)
29
29
console . warn (
30
30
'Node.js version ' +
31
31
process . version +
@@ -38,15 +38,17 @@ if (version[0] % 2 === 1 && version[0] > 14) {
38
38
} else if (
39
39
version [ 0 ] < 12 ||
40
40
version [ 0 ] === 13 ||
41
+ version [ 0 ] === 15 ||
41
42
( version [ 0 ] === 12 && version [ 1 ] < 20 ) ||
42
- ( version [ 0 ] === 14 && version [ 1 ] < 15 )
43
+ ( version [ 0 ] === 14 && version [ 1 ] < 15 ) ||
44
+ ( version [ 0 ] === 16 && version [ 1 ] < 10 )
43
45
) {
44
- // Error and exit if less than 12.20 or 13.x or less than 14.15
46
+ // Error and exit if less than 12.20 or 13.x or less than 14.15 or 15.x or less than 16.10
45
47
console . error (
46
48
'Node.js version ' +
47
49
process . version +
48
50
' detected.\n' +
49
- 'The Angular CLI requires a minimum Node.js version of either v12.20 or v14.15.\n\n' +
51
+ 'The Angular CLI requires a minimum Node.js version of either v12.20, v14.15, or v16.10 .\n\n' +
50
52
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n' ,
51
53
) ;
52
54
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import { Schema as VersionCommandSchema } from './version';
16
16
/**
17
17
* Major versions of Node.js that are officially supported by Angular.
18
18
*/
19
- const SUPPORTED_NODE_MAJORS = [ 12 , 14 ] ;
19
+ const SUPPORTED_NODE_MAJORS = [ 12 , 14 , 16 ] ;
20
20
21
21
interface PartialPackageInfo {
22
22
name : string ;
Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ const isDebug = debugEnv !== undefined && debugEnv !== '0' && debugEnv.toLowerCa
23
23
export default async function ( options : { testing ?: boolean ; cliArgs : string [ ] } ) {
24
24
// This node version check ensures that the requirements of the project instance of the CLI are met
25
25
const version = process . versions . node . split ( '.' ) . map ( ( part ) => Number ( part ) ) ;
26
- if ( version [ 0 ] < 12 || ( version [ 0 ] === 12 && version [ 1 ] < 14 ) ) {
26
+ if ( version [ 0 ] < 12 || ( version [ 0 ] === 12 && version [ 1 ] < 20 ) ) {
27
27
process . stderr . write (
28
28
`Node.js version ${ process . version } detected.\n` +
29
- 'The Angular CLI requires a minimum v12.14 .\n\n' +
29
+ 'The Angular CLI requires a minimum v12.20 .\n\n' +
30
30
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n' ,
31
31
) ;
32
32
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ export default async function () {
22
22
throw new Error ( 'Installation should not have been skipped' ) ;
23
23
}
24
24
25
- const output3 = await ng ( 'add' , '@angular/localize@12.0.0' , '--skip-confirmation' ) ;
25
+ // v12.2.0 has a package.json engine field that supports Node.js v16+
26
+ const output3 = await ng ( 'add' , '@angular/localize@12.2.0' , '--skip-confirmation' ) ;
26
27
if ( output3 . stdout . includes ( 'Skipping installation: Package already installed' ) ) {
27
28
throw new Error ( 'Installation should not have been skipped' ) ;
28
29
}
You can’t perform that action at this time.
0 commit comments