Skip to content

Commit

Permalink
build: upgrade to node 14 (angular#41544)
Browse files Browse the repository at this point in the history
Upgrade local development environment for the angular repo to use node 14
dropping node 10 from supported for development within the angular repo.

PR Close angular#41544
  • Loading branch information
josephperrott authored and zarend committed Apr 14, 2021
1 parent 0bc539a commit ee615e0
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 17 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ version: 2.1
# **NOTE 1 **: If you change the cache key prefix, also sync the cache_key_fallback to match.
# **NOTE 2 **: Keep the static part of the cache key as prefix to enable correct fallbacks.
# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
var_3: &cache_key v4-angular-node-12-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }}
var_3: &cache_key v4-angular-node-14-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }}
# We invalidate the cache if the Bazel version changes because otherwise the `bazelisk` cache
# folder will contain all previously used versions and ultimately cause the cache restoring to
# be slower due to its growing size.
var_4: &cache_key_fallback v4-angular-node-12-{{ checksum ".bazelversion" }}
var_4: &cache_key_fallback v4-angular-node-14-{{ checksum ".bazelversion" }}

# Windows needs its own cache key because binaries in node_modules are different.
var_3_win: &cache_key_win v4-angular-win-node-12-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }}
var_4_win: &cache_key_win_fallback v4-angular-win-node-12-{{ checksum ".bazelversion" }}
var_3_win: &cache_key_win v4-angular-win-node-14-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }}
var_4_win: &cache_key_win_fallback v4-angular-win-node-14-{{ checksum ".bazelversion" }}

# Cache key for the `components-repo-unit-tests` job. **Note** when updating the SHA in the
# cache keys also update the SHA for the "COMPONENTS_REPO_COMMIT" environment variable.
Expand Down Expand Up @@ -77,7 +77,7 @@ executors:
type: string
default: medium
docker:
- image: circleci/node:12.14.1@sha256:f9de24fc0017059cc42ef7d07db060008af65a98b1f0cdd1ef3339213226bf6d
- image: circleci/node:14.16.1@sha256:951e12268fe692615bfd155c327bd910e10c99db98404badd03879f984c32b31
resource_class: << parameters.resource_class >>
working_directory: ~/ng

Expand All @@ -95,7 +95,7 @@ executors:
machine:
# Windows preview image that includes the following:
# - Visual Studio 2019 build tools
# - Node 12
# - Node 14
# - yarn 1.17
# - Python 3 3.7.4
image: windows-server-2019-vs2019:201908-02
Expand Down
4 changes: 2 additions & 2 deletions .circleci/windows-env.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ copy .circleci\bazel.windows.rc ${Env:USERPROFILE}\.bazelrc
####################################################################################################
# Install specific version of node.
####################################################################################################
nvm install 12.14.1
nvm use 12.14.1
nvm install 14.16.1
nvm use 14.16.1

# These Bazel prereqs aren't needed because the CircleCI image already includes them.
# choco install yarn --version 1.16.0 --no-progress
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/recommended-Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Image metadata and config.
# Ideally, the Node.js version should match what we use on CI.
# See `executors > default-executor` in `.circleci/config.yml`.
FROM circleci/node:12-browsers
FROM circleci/node:14-browsers


LABEL name="Angular dev environment" \
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.14.1
14.16.1
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ check_rules_nodejs_version(minimum_version_string = "2.2.0")

# Setup the Node.js toolchain
node_repositories(
node_version = "12.14.1",
node_version = "14.16.1",
package_json = ["//:package.json"],
)

Expand Down
2 changes: 1 addition & 1 deletion aio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
},
"//engines-comment": "Keep this in sync with /package.json and /aio/tools/examples/shared/package.json",
"engines": {
"node": ">=10.19.0 <16.0.0",
"node": ">=12.14.1 <16.0.0",
"yarn": ">=1.22.4 <2",
"npm": "Please use yarn instead of NPM to install dependencies"
},
Expand Down
3 changes: 1 addition & 2 deletions aio/tools/examples/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
},
"//engines-comment": "Keep this in sync with /package.json and /aio/package.json",
"engines": {
"node": ">=10.19.0 <16.0.0",
"node": ">=12.14.1 <16.0.0",
"yarn": ">=1.21.1 <2",
"npm": "Please use yarn instead of NPM to install dependencies"

},
"keywords": [],
"author": "",
Expand Down
3 changes: 1 addition & 2 deletions integration/bazel/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install
# Setup the Node.js toolchain
node_repositories(
# Use same node version as root angular WORKSPACE since
# we share node_module packages and some require node >= 10.15.0
node_version = "12.14.1",
node_version = "14.16.1",
yarn_version = "1.12.1",
)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"//engines-comment": "Keep this in sync with /aio/package.json and /aio/tools/examples/shared/package.json",
"engines": {
"node": ">=10.19.0 <16.0.0",
"node": ">=12.14.1 <16.0.0",
"yarn": ">=1.22.4 <2",
"npm": "Please use yarn instead of NPM to install dependencies"
},
Expand Down

0 comments on commit ee615e0

Please sign in to comment.