Skip to content

Commit

Permalink
fix(@angular/cli): add engine field support for npm 8 and higher
Browse files Browse the repository at this point in the history
The `npm` package manager recently released version 8. This version removes support for older versions of Node.js but retains support for the versions that align with Angular's support range. The Angular CLI packages unfortunately did not support version 8 due to the ranges only permitting versions ^6.11.0 and ^7.5.6 which were the minimums for each that ensured a functioning Angular CLI environment. The range has now been expanded to include >=8.0.0 to allow newer versions of `npm` to function as well.

npm 8.0.0 release information: https://github.com/npm/cli/releases/tag/v8.0.0

(cherry picked from commit 34f486e)
  • Loading branch information
clydin authored and alan-agius4 committed Oct 9, 2021
1 parent 427a9ee commit d2a9922
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/packages.ts
Expand Up @@ -86,7 +86,7 @@ function loadPackageJson(p: string) {
case 'engines':
pkg['engines'] = {
'node': '^12.20.0 || ^14.15.0 || >=16.10.0',
'npm': '^6.11.0 || ^7.5.6',
'npm': '^6.11.0 || ^7.5.6 || >=8.0.0',
'yarn': '>= 1.13.0',
};
break;
Expand Down

1 comment on commit d2a9922

@mcalmus
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this please be back-ported to 12?

Please sign in to comment.