build: update minimum supported node.js version to 12.14

This is to match the ranges in the framework repo.
This commit is contained in:
Alan Agius 2021-04-27 10:02:56 +02:00
parent 9d6c1dad95
commit 0b27cfb720
6 changed files with 9 additions and 9 deletions

View File

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

View File

@ -88,7 +88,7 @@ function loadPackageJson(p: string) {
// Overwrite engines to a common default. // Overwrite engines to a common default.
case 'engines': case 'engines':
pkg['engines'] = { pkg['engines'] = {
'node': '>= 12.13.0', 'node': '^12.14.1 || ^14.0.0',
'npm': '^6.11.0 || ^7.5.6', 'npm': '^6.11.0 || ^7.5.6',
'yarn': '>= 1.13.0', 'yarn': '>= 1.13.0',
}; };

View File

@ -41,7 +41,7 @@
"url": "https://github.com/angular/angular-cli.git" "url": "https://github.com/angular/angular-cli.git"
}, },
"engines": { "engines": {
"node": ">=12.13.0 <15.0.0", "node": "^12.14.1 || ^14.0.0",
"yarn": ">=1.21.1 <2", "yarn": ">=1.21.1 <2",
"npm": "Please use yarn instead of NPM to install dependencies" "npm": "Please use yarn instead of NPM to install dependencies"
}, },

View File

@ -29,15 +29,15 @@ if (version[0] % 2 === 1 && version[0] > 14) {
} else if ( } else if (
version[0] < 12 || version[0] < 12 ||
version[0] === 13 || version[0] === 13 ||
(version[0] === 12 && version[1] < 13) || (version[0] === 12 && version[1] < 14) ||
(version[0] === 14 && version[1] < 15) (version[0] === 14 && version[1] < 15)
) { ) {
// Error and exit if less than 12.13 or 13.x or less than 14.15 // Error and exit if less than 12.14 or 13.x or less than 14.15
console.error( console.error(
'Node.js version ' + 'Node.js version ' +
process.version + process.version +
' detected.\n' + ' detected.\n' +
'The Angular CLI requires a minimum Node.js version of either v12.13 or v14.15.\n\n' + 'The Angular CLI requires a minimum Node.js version of either v12.14 or v14.15.\n\n' +
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n', 'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n',
); );

View File

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

View File

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