Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

chore(*): update Node.js from 8 to 12, update some dependencies #16915

Merged
merged 5 commits into from
May 23, 2020

Conversation

mgol
Copy link
Member

@mgol mgol commented Nov 15, 2019

AngularJS is in LTS mode

We are no longer accepting changes that are not critical bug fixes into this project.
See https://blog.angular.io/stable-angularjs-and-long-term-support-7e077635ee9c for more detail.

Does this PR fix a regression since 1.7.0, a security flaw, or a problem caused by a new browser version?

What is the current behavior? (You can also link to an open issue here)

Node.js 8 is used to build/test AngularJS.

What is the new behavior (if this is a feature change)?

Node.js 12 is used to build/test AngularJS.

Does this PR introduce a breaking change?

No.

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Fix/Feature: Docs have been added/updated
  • Fix/Feature: Tests have been added; existing tests pass

Other information:

Node.js 8 ends its support at the end of 2019. Node 12 will be supported
until April 2022 which is way past AngularJS end of support.

Some dependencies needed to be updated to make them work in Node.js 12.

TODO:

  • Migrate to Gulp v4 😱

@mgol mgol added this to the 1.7.x milestone Nov 15, 2019
@mgol mgol self-assigned this Nov 15, 2019
gkalpak
gkalpak previously approved these changes Nov 15, 2019
Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

LGTM (as long as Travis is happy 😱)

@mgol mgol force-pushed the node-12 branch 2 times, most recently from 27017bb to eea94b1 Compare November 15, 2019 16:10
@mgol mgol dismissed gkalpak’s stale review November 15, 2019 17:38

More updates are needed

@mgol mgol changed the title chore(*): Update Node.js from 8 to 12, update some dependencies chore(*): update Node.js from 8 to 12, update some dependencies Nov 15, 2019
@gkalpak
Copy link
Member

gkalpak commented Feb 2, 2020

Rebased on master to see if c8a6e84 would fix the failures.
Nevermind, I just realized gulp 3 is not compatible with Node.js v12.

@Splaktar
Copy link
Member

You can support Gulp 3.x in NodeJS v12/14 using the approach that we used in AngularJS Material: angular/material#11892

Upgrading to Gulp v4 is generally considered too time intensive and not worth the effort for older projects that are close to ending LTS.

Copy link
Member

@Splaktar Splaktar left a comment

Choose a reason for hiding this comment

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

The primordials failures with Gulp v3 are caused by NodeJS 12+ no longer accepting the natives override. The PR I linked above has another approach that solves these issues with graceful-fs.

package.json Show resolved Hide resolved
package.json Show resolved Hide resolved
@petebacondarwin petebacondarwin modified the milestones: 1.7.x, 1.8.x May 20, 2020
@mgol
Copy link
Member Author

mgol commented May 20, 2020

The primordials failures with Gulp v3 are caused by NodeJS 12+ no longer accepting the natives override. The PR I linked above has another approach that solves these issues with graceful-fs.

That's a great idea, thanks! I'll have a look later.

@petebacondarwin
Copy link
Contributor

Adding a resolution for graceful-fs works at treat.

@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@petebacondarwin
Copy link
Contributor

@googlebot I consent

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@Splaktar
Copy link
Member

Looks like there's a duplicate Googlebot here. We had this problem in AngularJS Material too. I think that there was one configured for the repo and one for the org. We were able to resolve it. I don't know if this affects only this PR or all PRs in the repo.

@josephperrott maybe dev-infra can resolve easily?

mgol and others added 4 commits May 22, 2020 18:08
Node.js 8 ends its support at the end of 2019. Node 12 will be supported
until April 2022 which is way past AngularJS end of support.

Some dependencies needed to be updated to make them work in Node.js 12.
Copy link
Member

@Splaktar Splaktar left a comment

Choose a reason for hiding this comment

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

LGTM. Just a note that Chrome M83 is the latest stable now and NodeJS 12.16.3 is the latest LTS.

capabilitiesForSauceLabs({
browserName: 'chrome',
platform: 'OS X 10.14',
version: '81'
Copy link
Member

Choose a reason for hiding this comment

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

Chrome Stable just hit 83.

Copy link
Contributor

Choose a reason for hiding this comment

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

According to this https://saucelabs.com/platform/supported-browsers-devices SauceLabs only has Chrome 81 available right now.

This commit gets rid of all references to Travis and, belatedly, Jenkins.
Now all CI is done on CircleCI and releases are run locally.

The CI no longer updates the docs and code.angularjs.org for jobs that are
not on the `master` branch.

During releases, the docs and code should be uploaded manually.
@petebacondarwin petebacondarwin merged commit a0488b3 into angular:master May 23, 2020
@mgol mgol deleted the node-12 branch May 23, 2020 13:58
Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

Post-merge review 😁
Mostly some questions.

@@ -98,11 +99,17 @@
"sorted-object": "^1.0.0",
"stringmap": "^0.2.2"
},
"dependencies": {},
"dependencies": {
"firebase": "^7.14.4",
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need firebase as a dependency?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oops. I think that got included when I was messing about with trying out firebase deployments...

Copy link
Member

@Splaktar Splaktar May 26, 2020

Choose a reason for hiding this comment

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

firebase-tools makes sense as a dev dependency 😄

"dependencies": {
"firebase": "^7.14.4",
"firebase-tools": "^8.3.0",
"node-glob": "^1.2.0"
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need these three to be dependencies (vs devDependencies)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly - I added this by accident.

@@ -36,7 +36,6 @@ function init {

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this file be executable?

Copy link
Contributor

Choose a reason for hiding this comment

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

Absolutely! I forgot to re-apply the chmod.

@@ -38,4 +38,4 @@ function run {
phase publish
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this file be executable?

@@ -123,6 +123,8 @@ describe('$anchorScroll', function() {
var lastAnchor = anchors.last();
var lastAnchorId = 'anchor-5';

if (browser.params.browser === 'firefox') return;
Copy link
Member

Choose a reason for hiding this comment

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

Why this? Are the tests not working on Firefox? Or is $anchorScroll() not working correctly on Firefox?
It would be helpful to have a comment explaining at least.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK

steps:
- custom_attach_workspace
- init_environment
- run: yarn -s grunt ci-checks
Copy link
Member

Choose a reason for hiding this comment

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

Why the -s here (but not elsewhere)?

Copy link
Contributor

Choose a reason for hiding this comment

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

I copied it from the angular/angular project where it is used extensively. Then I forgot about it. I'll remove it because I don't think it makes much difference and is confusing if not used consistently.

filters:
branches:
only:
- latest
Copy link
Member

Choose a reason for hiding this comment

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

Is latest a special value? Are there any docs on how it works?

Copy link
Contributor

@petebacondarwin petebacondarwin May 24, 2020

Choose a reason for hiding this comment

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

Previously deployments of the "latest" build, i.e. the releases that have a value of latest in the dist-tag property of package.json also triggered deployment of the docs to a firebase hosting, and also a special version of the code to snapshot-stable.

This is more difficult in CircleCI, so I had this idea that we would simply keep a new latest git branch updated to the latest stable release, which would then trigger the deployments.

I never got it fleshed out properly - and now I am thinking, given the status of the project, that we can just run manual deployments when we run the release. WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

Why is it more difficult in CircleCI. It seems quite straight forward to me (just check package.json > distTag and abort the job if it is not latest).

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I guess that could work. I was thinking of ways to avoid running the job in the first place.

# the commit is tagged
# - or the branch is "master"
# - or the branch distTag from package.json is "latest" (i.e. stable branch)
if [[ "$TRAVIS_TAG" != '' || "$TRAVIS_BRANCH" == master || "$DIST_TAG" == latest ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

Has this logic been replicated in the new setup? I only see the corresponding job be run on branches master and latest (whatever that means 😁). What about tagged commits?

Copy link
Contributor

Choose a reason for hiding this comment

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

This logic has not been mapped over 1 to 1. See #16915 (comment)

A tagged commit corresponds to a release, right? So if our release process includes deployment of docs and code, then we are done. The only missing piece is the dist-tag updates...

fi

if [[ "$DEPLOY_DOCS" == true || "$DEPLOY_CODE" == true ]]; then
grunt prepareDeploy
Copy link
Member

Choose a reason for hiding this comment

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

I see that grunt prepareDeploy is run for both DEPLOY_CODE and DEPLOY_DOCS here. In the new setup, it is only run in the deploy-docs job (but not the deploy-code one. Is that intended?

gkalpak added a commit to gkalpak/angular.js that referenced this pull request May 24, 2020
This is a follow-up to angular#16915, cleaning up `.circleci/config.yml`
(pinning Docker images of executors, removing unused code, etc.).
gkalpak added a commit to gkalpak/angular.js that referenced this pull request May 24, 2020
This is a follow-up to angular#16915, cleaning up `package.json` and
`.circleci/config.yml` and making release scripts executable.
gkalpak added a commit to gkalpak/angular.js that referenced this pull request May 24, 2020
This is a follow-up to angular#16915, cleaning up `package.json` and
`.circleci/config.yml` and making release scripts executable.
gkalpak added a commit to gkalpak/angular.js that referenced this pull request May 24, 2020
This is a follow-up to angular#16915, cleaning up `package.json` and
`.circleci/config.yml` and making release scripts executable.
gkalpak added a commit to gkalpak/angular.js that referenced this pull request May 25, 2020
This is a follow-up to angular#16915, cleaning up `package.json` and
`.circleci/config.yml` and making release scripts executable.
gkalpak added a commit that referenced this pull request May 26, 2020
This is a follow-up to #16915, cleaning up `package.json` and
`.circleci/config.yml` and making release scripts executable.
@soffieswan044
Copy link

AngularJS is in LTS mode

We are no longer accepting changes that are not critical bug fixes into this project.
See https://blog.angular.io/stable-angularjs-and-long-term-support-7e077635ee9c for more detail.

Does this PR fix a regression since 1.7.0, a security flaw, or a problem caused by a new browser version?

What is the current behavior? (You can also link to an open issue here)

Node.js 8 is used to build/test AngularJS.

What is the new behavior (if this is a feature change)?

Node.js 12 is used to build/test AngularJS.

Does this PR introduce a breaking change?

No.

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Fix/Feature: Docs have been added/updated
  • Fix/Feature: Tests have been added; existing tests pass

Other information:

Node.js 8 ends its support at the end of 2019. Node 12 will be supported
until April 2022 which is way past AngularJS end of support.

Some dependencies needed to be updated to make them work in Node.js 12.

TODO:

  • Migrate to Gulp v4 😱

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants