Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: update minimum supported Node version from 16.13.0 -> 16.14.0 #24988

Merged
merged 1 commit into from Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion constants.bzl
@@ -1,5 +1,5 @@
# Engine versions to stamp in a release package.json
RELEASE_ENGINES_NODE = "^16.13.0 || >=18.10.0"
RELEASE_ENGINES_NODE = "^16.14.0 || >=18.10.0"
RELEASE_ENGINES_NPM = "^6.11.0 || ^7.5.6 || >=8.0.0"
RELEASE_ENGINES_YARN = ">= 1.13.0"

Expand Down
2 changes: 1 addition & 1 deletion docs/DEVELOPER.md
Expand Up @@ -6,7 +6,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. Clone to your local computer using `git`.
1. Make sure that you have Node `v14.20`, `v16.13` or `v18.10` installed. See instructions [here](https://nodejs.org/en/download/).
1. Make sure that you have Node `v14.20`, `v16.14` or `v18.10` 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. Run `yarn` (no arguments) from the root of your clone of this project to install dependencies.

Expand Down
2 changes: 1 addition & 1 deletion lib/packages.ts
Expand Up @@ -85,7 +85,7 @@ function loadPackageJson(p: string) {
// Overwrite engines to a common default.
case 'engines':
pkg['engines'] = {
'node': '^16.13.0 || >=18.10.0',
'node': '^16.14.0 || >=18.10.0',
'npm': '^6.11.0 || ^7.5.6 || >=8.0.0',
'yarn': '>= 1.13.0',
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -40,7 +40,7 @@
"url": "https://github.com/angular/angular-cli.git"
},
"engines": {
"node": "^16.13.0 || ^18.10.0",
"node": "^16.14.0 || ^18.10.0",
"yarn": ">=1.21.1 <2",
"npm": "Please use yarn instead of NPM to install dependencies"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/angular/cli/bin/ng.js
Expand Up @@ -48,15 +48,15 @@ if (version[0] % 2 === 1) {
} else if (
version[0] < 14 ||
(version[0] === 14 && version[1] < 20) ||
(version[0] === 16 && version[1] < 13) ||
(version[0] === 16 && version[1] < 14) ||
(version[0] === 18 && version[1] < 10)
) {
// Error and exit if less than 14.20, 16.13 or 18.10
// Error and exit if less than 14.20, 16.14 or 18.10
console.error(
'Node.js version ' +
process.version +
' detected.\n' +
'The Angular CLI requires a minimum Node.js version of either v14.20, v16.13 or v18.10.\n\n' +
'The Angular CLI requires a minimum Node.js version of either v14.20, v16.14 or v18.10.\n\n' +
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n',
);

Expand Down
Expand Up @@ -315,12 +315,7 @@ async function writeResultFiles(
directoryExists.add(basePath);
}
// Copy file contents
await fs.copyFile(
source,
path.join(outputPath, destination),
// This is not yet available from `fs/promises` in Node.js v16.13
fsConstants.COPYFILE_FICLONE,
);
await fs.copyFile(source, path.join(outputPath, destination), fsConstants.COPYFILE_FICLONE);
}),
);
}
Expand Down
2 changes: 1 addition & 1 deletion tools/test/expected_package.json
Expand Up @@ -35,7 +35,7 @@
}
},
"engines": {
"node": "^16.13.0 || >=18.10.0",
"node": "^16.14.0 || >=18.10.0",
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
"yarn": ">= 1.13.0"
}
Expand Down