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

upgrade to node 14 #41544

Closed
wants to merge 17 commits into from
Closed

upgrade to node 14 #41544

wants to merge 17 commits into from

Conversation

@josephperrott
Copy link
Member

@josephperrott josephperrott commented Apr 9, 2021

Upgrades the repository to use node 14. Additionally, removes support for node 10 as it has
reached end of life.

BREAKING CHANGE: Angular no longer maintains support for node v10

Note: Only core scope commit includes a breaking change note to prevent the same note from occurring many times.

@josephperrott josephperrott requested review from mgechev and devversion Apr 9, 2021
@ngbot ngbot bot added this to the Backlog milestone Apr 9, 2021
@ngbot ngbot bot added this to the Backlog milestone Apr 9, 2021
@ngbot ngbot bot added this to the Backlog milestone Apr 9, 2021
@google-cla google-cla bot added the cla: yes label Apr 9, 2021
@josephperrott josephperrott marked this pull request as ready for review Apr 9, 2021
@pullapprove pullapprove bot requested review from alxhub and petebacondarwin Apr 9, 2021
@@ -34,9 +34,6 @@
"./__ivy_ngcc__/esm2015/init/src/init.js",
"./__ivy_ngcc__/fesm2015/init.js"
],
"engines": {
Copy link
Contributor

@alan-agius4 alan-agius4 Apr 10, 2021

Why the “engines” field was removed from here (and other packages)

This is useful if users are installing this package in an older node.js environment, which will cause a warning or a error based on the package manager and its settings.

Copy link
Member Author

@josephperrott josephperrott Apr 12, 2021

Should we just set the engines field in @angular/core's package.json since it essentially is always needed to use any of the packages? Alternatively we could set it for all packages we release.

Copy link
Member Author

@josephperrott josephperrott Apr 12, 2021

@jelbourn thoughts on the above?

Copy link
Member

@jelbourn jelbourn Apr 13, 2021

Seems like the "technically correct" thing is to list it on each package, no? I would probably do that unless there's some reason not too (like if it were to generate extra console noise).

The change seems to have the engines set on everything now, though, yes?

Copy link
Member Author

@josephperrott josephperrott Apr 13, 2021

Yes, this change makes the engines value appear in everyone packages package.json. If someone were to be using an unsupported version of node, they would see a warning during node install for each package they rely on.

Copy link
Contributor

@alan-agius4 alan-agius4 left a comment

Shouldn’t the changes be split into 2 commits?

ci: update to use Node 14
feat(core): drop support for Node 10

Copy link
Member

@gkalpak gkalpak left a comment

Yesss 🎊 🎉 🎇
Please also update .devcontainer/recommended-Dockerfile.

FWIW, I believe the changes should be split up into two commits: one that updates the version of Node.js used in the repo and another one that updates the engines in the various packages (compiler-cli, localize, platform-server).

.circleci/config.yml Outdated Show resolved Hide resolved
.nvmrc Outdated Show resolved Hide resolved
packages/core/package.json Outdated Show resolved Hide resolved
Copy link
Member

@devversion devversion left a comment

LGTM. I assume we can't use 14.16.1 for Bazel yet as we aren't on the latest rules_nodejs version, right?

@josephperrott josephperrott changed the title feat(core): upgrade to node 14 upgrade to node 14 Apr 13, 2021
devversion added a commit to devversion/material2 that referenced this issue Apr 13, 2021
NodeJS v14 is the current LTS version and we should switch as the
Angular framework/dev-infra also updates to Node V14. See angular/angular#41544

We remove the engines filed in non-top-level `package.json` files to avoid
unnecessary churn. We keep NodeJS v12 working as this is the minimum
required version for framework too and diverging could cause productivity
issues when switching between projects.
Copy link
Member

@gkalpak gkalpak left a comment

LGTM ✔️

@alfaproject
Copy link
Contributor

@alfaproject alfaproject commented Apr 14, 2021

I don't quite understand why you are publishing a library that is mostly used in a browser context with the engines field. I could understand platform-server, or compiler-cli or angular-cli in general, but why the rest?

@zarend zarend closed this in ee615e0 Apr 14, 2021
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

BREAKING CHANGE: Angular no longer maintains support for node v10

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
…ns (#41544)

Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
zarend added a commit that referenced this issue Apr 14, 2021
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

PR Close #41544
@petebacondarwin
Copy link
Member

@petebacondarwin petebacondarwin commented Apr 14, 2021

I don't quite understand why you are publishing a library that is mostly used in a browser context with the engines field. I could understand platform-server, or compiler-cli or angular-cli in general, but why the rest?

Indeed we were just discussing this. There is the slight oddity that even things like core might end up being executed inside node.js if you are doing SSR. As a team we are on the fence and slightly falling on the side of just adding the engine field to all our packages for consistency.

mmalerba added a commit to angular/components that referenced this issue Apr 14, 2021
NodeJS v14 is the current LTS version and we should switch as the
Angular framework/dev-infra also updates to Node V14. See angular/angular#41544

We remove the engines filed in non-top-level `package.json` files to avoid
unnecessary churn. We keep NodeJS v12 working as this is the minimum
required version for framework too and diverging could cause productivity
issues when switching between projects.
@JounQin
Copy link
Contributor

@JounQin JounQin commented May 13, 2021

May I ask why Node v16 is not supported? Is there any known issue?

@josephperrott josephperrott deleted the upgrade-node branch May 13, 2021
@josephperrott
Copy link
Member Author

@josephperrott josephperrott commented May 13, 2021

@JounQin There are not any known issues, and I would even guess that it will work perfectly well. However, Node v16 is in the Current release status per https://nodejs.org/en/about/releases/. Angular only supports versions of Node which are in Active LTS or Maintenance LTS.

We should begin supporting v16 ~End of October 2021 as this is when it will begin Active LTS.

@marlass
Copy link

@marlass marlass commented May 13, 2021

@josephperrott In this case it might be worth updating that info in the docs: https://angular.io/guide/setup-local#prerequisites where current is mentioned in the support list.

Nevermind. I see it's updated there

trik added a commit to trik/ajf that referenced this issue Jun 9, 2021
NodeJS v14 is the current LTS version and we should switch as the
Angular framework/dev-infra also updates to Node V14. See angular/angular#41544

We remove the engines filed in non-top-level `package.json` files to avoid
unnecessary churn. We keep NodeJS v12 working as this is the minimum
required version for framework too and diverging could cause productivity
issues when switching between projects.
trik added a commit to gnucoop/ajf that referenced this issue Jun 10, 2021
NodeJS v14 is the current LTS version and we should switch as the
Angular framework/dev-infra also updates to Node V14. See angular/angular#41544

We remove the engines filed in non-top-level `package.json` files to avoid
unnecessary churn. We keep NodeJS v12 working as this is the minimum
required version for framework too and diverging could cause productivity
issues when switching between projects.
@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Jun 13, 2021

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

10 participants