build: upgrade to node 14 (#41544)
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 #41544
This commit is contained in:
parent
0bc539af29
commit
ee615e0744
|
@ -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 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.
|
# **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.
|
# 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
|
# 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
|
# folder will contain all previously used versions and ultimately cause the cache restoring to
|
||||||
# be slower due to its growing size.
|
# 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.
|
# 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_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-12-{{ checksum ".bazelversion" }}
|
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 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.
|
# cache keys also update the SHA for the "COMPONENTS_REPO_COMMIT" environment variable.
|
||||||
|
@ -77,7 +77,7 @@ executors:
|
||||||
type: string
|
type: string
|
||||||
default: medium
|
default: medium
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node:12.14.1@sha256:f9de24fc0017059cc42ef7d07db060008af65a98b1f0cdd1ef3339213226bf6d
|
- image: circleci/node:14.16.1@sha256:951e12268fe692615bfd155c327bd910e10c99db98404badd03879f984c32b31
|
||||||
resource_class: << parameters.resource_class >>
|
resource_class: << parameters.resource_class >>
|
||||||
working_directory: ~/ng
|
working_directory: ~/ng
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ executors:
|
||||||
machine:
|
machine:
|
||||||
# Windows preview image that includes the following:
|
# Windows preview image that includes the following:
|
||||||
# - Visual Studio 2019 build tools
|
# - Visual Studio 2019 build tools
|
||||||
# - Node 12
|
# - Node 14
|
||||||
# - yarn 1.17
|
# - yarn 1.17
|
||||||
# - Python 3 3.7.4
|
# - Python 3 3.7.4
|
||||||
image: windows-server-2019-vs2019:201908-02
|
image: windows-server-2019-vs2019:201908-02
|
||||||
|
|
|
@ -41,8 +41,8 @@ copy .circleci\bazel.windows.rc ${Env:USERPROFILE}\.bazelrc
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
# Install specific version of node.
|
# Install specific version of node.
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
nvm install 12.14.1
|
nvm install 14.16.1
|
||||||
nvm use 12.14.1
|
nvm use 14.16.1
|
||||||
|
|
||||||
# These Bazel prereqs aren't needed because the CircleCI image already includes them.
|
# These Bazel prereqs aren't needed because the CircleCI image already includes them.
|
||||||
# choco install yarn --version 1.16.0 --no-progress
|
# choco install yarn --version 1.16.0 --no-progress
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Image metadata and config.
|
# Image metadata and config.
|
||||||
# Ideally, the Node.js version should match what we use on CI.
|
# Ideally, the Node.js version should match what we use on CI.
|
||||||
# See `executors > default-executor` in `.circleci/config.yml`.
|
# See `executors > default-executor` in `.circleci/config.yml`.
|
||||||
FROM circleci/node:12-browsers
|
FROM circleci/node:14-browsers
|
||||||
|
|
||||||
|
|
||||||
LABEL name="Angular dev environment" \
|
LABEL name="Angular dev environment" \
|
||||||
|
|
|
@ -21,7 +21,7 @@ check_rules_nodejs_version(minimum_version_string = "2.2.0")
|
||||||
|
|
||||||
# Setup the Node.js toolchain
|
# Setup the Node.js toolchain
|
||||||
node_repositories(
|
node_repositories(
|
||||||
node_version = "12.14.1",
|
node_version = "14.16.1",
|
||||||
package_json = ["//:package.json"],
|
package_json = ["//:package.json"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
},
|
},
|
||||||
"//engines-comment": "Keep this in sync with /package.json and /aio/tools/examples/shared/package.json",
|
"//engines-comment": "Keep this in sync with /package.json and /aio/tools/examples/shared/package.json",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.19.0 <16.0.0",
|
"node": ">=12.14.1 <16.0.0",
|
||||||
"yarn": ">=1.22.4 <2",
|
"yarn": ">=1.22.4 <2",
|
||||||
"npm": "Please use yarn instead of NPM to install dependencies"
|
"npm": "Please use yarn instead of NPM to install dependencies"
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,10 +12,9 @@
|
||||||
},
|
},
|
||||||
"//engines-comment": "Keep this in sync with /package.json and /aio/package.json",
|
"//engines-comment": "Keep this in sync with /package.json and /aio/package.json",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.19.0 <16.0.0",
|
"node": ">=12.14.1 <16.0.0",
|
||||||
"yarn": ">=1.21.1 <2",
|
"yarn": ">=1.21.1 <2",
|
||||||
"npm": "Please use yarn instead of NPM to install dependencies"
|
"npm": "Please use yarn instead of NPM to install dependencies"
|
||||||
|
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|
|
@ -26,8 +26,7 @@ load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install
|
||||||
# Setup the Node.js toolchain
|
# Setup the Node.js toolchain
|
||||||
node_repositories(
|
node_repositories(
|
||||||
# Use same node version as root angular WORKSPACE since
|
# Use same node version as root angular WORKSPACE since
|
||||||
# we share node_module packages and some require node >= 10.15.0
|
node_version = "14.16.1",
|
||||||
node_version = "12.14.1",
|
|
||||||
yarn_version = "1.12.1",
|
yarn_version = "1.12.1",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"//engines-comment": "Keep this in sync with /aio/package.json and /aio/tools/examples/shared/package.json",
|
"//engines-comment": "Keep this in sync with /aio/package.json and /aio/tools/examples/shared/package.json",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.19.0 <16.0.0",
|
"node": ">=12.14.1 <16.0.0",
|
||||||
"yarn": ">=1.22.4 <2",
|
"yarn": ">=1.22.4 <2",
|
||||||
"npm": "Please use yarn instead of NPM to install dependencies"
|
"npm": "Please use yarn instead of NPM to install dependencies"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue