Skip to content

Commit 3ce2c35

Browse files
committed
build: update minimum supported node.js version to 12.14
This is to match the ranges in the framework repo. (cherry picked from commit 0b27cfb)
1 parent b6af3f6 commit 3ce2c35

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To get started locally, follow these instructions:
4949

5050
1. If you haven't done it already, [make a fork of this repo](https://github.com/angular/angular-cli/fork).
5151
1. Clone to your local computer using `git`.
52-
1. Make sure that you have Node 10.13 or later installed. See instructions [here](https://nodejs.org/en/download/).
52+
1. Make sure that you have Node 12.14 or 14.0 installed. See instructions [here](https://nodejs.org/en/download/).
5353
1. Make sure that you have `yarn` installed; see instructions [here](https://yarnpkg.com/lang/en/docs/install/).
5454
1. Run `yarn` (no arguments) from the root of your clone of this project to install dependencies.
5555

lib/packages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function loadPackageJson(p: string) {
8888
// Overwrite engines to a common default.
8989
case 'engines':
9090
pkg['engines'] = {
91-
'node': '>= 12.13.0',
91+
'node': '^12.14.1 || ^14.0.0',
9292
'npm': '^6.11.0 || ^7.5.6',
9393
'yarn': '>= 1.13.0',
9494
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"url": "https://github.com/angular/angular-cli.git"
4242
},
4343
"engines": {
44-
"node": ">=12.13.0 <15.0.0",
44+
"node": "^12.14.1 || ^14.0.0",
4545
"yarn": ">=1.21.1 <2",
4646
"npm": "Please use yarn instead of NPM to install dependencies"
4747
},

packages/angular/cli/bin/ng

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ if (version[0] % 2 === 1 && version[0] > 14) {
2929
} else if (
3030
version[0] < 12 ||
3131
version[0] === 13 ||
32-
(version[0] === 12 && version[1] < 13) ||
32+
(version[0] === 12 && version[1] < 14) ||
3333
(version[0] === 14 && version[1] < 15)
3434
) {
35-
// Error and exit if less than 12.13 or 13.x or less than 14.15
35+
// Error and exit if less than 12.14 or 13.x or less than 14.15
3636
console.error(
3737
'Node.js version ' +
3838
process.version +
3939
' detected.\n' +
40-
'The Angular CLI requires a minimum Node.js version of either v12.13 or v14.15.\n\n' +
40+
'The Angular CLI requires a minimum Node.js version of either v12.14 or v14.15.\n\n' +
4141
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n',
4242
);
4343

packages/angular/cli/lib/cli/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ const isDebug =
2626
export default async function(options: { testing?: boolean; cliArgs: string[] }) {
2727
// This node version check ensures that the requirements of the project instance of the CLI are met
2828
const version = process.versions.node.split('.').map(part => Number(part));
29-
if (version[0] < 10 || version[0] === 11 || (version[0] === 10 && version[1] < 13)) {
29+
if (version[0] < 12 || (version[0] === 12 && version[1] < 14)) {
3030
process.stderr.write(
3131
`Node.js version ${process.version} detected.\n` +
32-
'The Angular CLI requires a minimum Node.js version of either v10.13 or v12.0.\n\n' +
32+
'The Angular CLI requires a minimum v12.14.\n\n' +
3333
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n',
3434
);
3535

scripts/templates/readme.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ To get started locally, follow these instructions:
5757

5858
1. If you haven't done it already, [make a fork of this repo](https://github.com/angular/angular-cli/fork).
5959
1. Clone to your local computer using `git`.
60-
1. Make sure that you have Node 10.13 or later installed. See instructions [here](https://nodejs.org/en/download/).
60+
1. Make sure that you have Node 12.14 or 14.0 installed. See instructions [here](https://nodejs.org/en/download/).
6161
1. Make sure that you have `yarn` installed; see instructions [here](https://yarnpkg.com/lang/en/docs/install/).
6262
1. Run `yarn` (no arguments) from the root of your clone of this project to install dependencies.
6363

0 commit comments

Comments
 (0)