mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 02:54:21 +08:00
feat(@angular/cli): update minimum required Node.js version to 10.9
Node.js 8 is now in maintenance LTS status and will be EOL in December 2019. Node.js 10 is now the active LTS version with Node.js 12 due for arrival in April 2019. Node.js 10+ provides an improved performance baseline as well as access to newer Node.js APIs and Javascript language features which the Angular CLI will now be able to leverage.
This commit is contained in:
parent
efac7b61ba
commit
b4965c09e2
@ -12,10 +12,10 @@ try {
|
||||
|
||||
// Some older versions of Node do not support let or const.
|
||||
var version = process.version.substr(1).split('.');
|
||||
if (Number(version[0]) < 8 || (Number(version[0]) === 8 && Number(version[1]) < 9)) {
|
||||
if (Number(version[0]) < 10 || (Number(version[0]) === 10 && Number(version[1]) < 9)) {
|
||||
process.stderr.write(
|
||||
'You are running version ' + process.version + ' of Node.js, which is not supported by Angular CLI v6.\n' +
|
||||
'The official Node.js version that is supported is 8.9 and greater.\n\n' +
|
||||
'You are running version ' + process.version + ' of Node.js, which is not supported by Angular CLI 8.0+.\n' +
|
||||
'The official Node.js version that is supported is 10.9 or greater.\n\n' +
|
||||
'Please visit https://nodejs.org/en/ to find instructions on how to update Node.js.\n'
|
||||
);
|
||||
|
||||
|
@ -48,13 +48,9 @@ export default async function (packageName: string,
|
||||
if (!save) {
|
||||
installArgs.push('--no-save');
|
||||
}
|
||||
const installOptions = {
|
||||
stdio: 'inherit',
|
||||
shell: true,
|
||||
};
|
||||
|
||||
await new Promise((resolve, reject) => {
|
||||
spawn(packageManager, installArgs, installOptions)
|
||||
spawn(packageManager, installArgs, { stdio: 'inherit', shell: true })
|
||||
.on('close', (code: number) => {
|
||||
if (code === 0) {
|
||||
logger.info(terminal.green(`Installed packages for tooling via ${packageManager}.`));
|
||||
|
Loading…
x
Reference in New Issue
Block a user