Skip to content

Commit 4e38a5e

Browse files
committed
build: update node and yarn to latest stable versions
Some CI jobs currently fail because db283f1 removed Node v11 from the supported node versions. Some of CI jobs use Node V11 though, so they currently fail. e.g. https://circleci.com/gh/angular/components/89692. In order to fix this, we ensure that we use consistent versions. For Node, we use the current active LTS version (v12). And for Yarn, we use the latest stable yarn version.
1 parent d6e7893 commit 4e38a5e

File tree

4 files changed

+26
-88
lines changed

4 files changed

+26
-88
lines changed

.circleci/config.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,76 +7,74 @@
77
# To validate changes, use an online parser, eg.
88
# http://yaml-online-parser.appspot.com/
99

10-
var_1: &docker_image circleci/node:10.16
10+
var_1: &docker_image circleci/node:12.9.1
11+
var_2: &docker-firefox-image
12+
# TODO(devversion): Temporarily use a image that includes Firefox 62 because the
13+
# ngcontainer image does include an old Firefox version that does not support headless.
14+
- image: circleci/node:12.9.1-browsers
1115

1216
# **Note**: When updating the beginning of the cache key, also update the cache key to match
1317
# the new cache key prefix. This allows us to take advantage of CircleCI's fallback caching.
1418
# Read more here: https://circleci.com/docs/2.0/caching/#restoring-cache.
15-
var_2: &cache_key v4-ng-mat-{{ checksum "WORKSPACE" }}-{{ checksum "yarn.lock" }}
16-
var_3: &cache_fallback_key v4-ng-mat-
19+
var_3: &cache_key v4-ng-mat-{{ checksum "WORKSPACE" }}-{{ checksum "yarn.lock" }}
20+
var_4: &cache_fallback_key v4-ng-mat-
1721

1822
# Settings common to each job
19-
var_4: &job_defaults
23+
var_5: &job_defaults
2024
working_directory: ~/ng
2125
docker:
2226
- image: *docker_image
2327

2428
# Job step for checking out the source code from GitHub. This also ensures that the source code
2529
# is rebased on top of master.
26-
var_5: &checkout_code
30+
var_6: &checkout_code
2731
checkout:
2832
# After checkout, rebase on top of master. By default, PRs are not rebased on top of master,
2933
# which we want. See https://discuss.circleci.com/t/1662
3034
post: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge"
3135

3236
# Restores the cache that could be available for the current Yarn lock file. The cache usually
3337
# includes the node modules and the Bazel repository cache.
34-
var_6: &restore_cache
38+
var_7: &restore_cache
3539
restore_cache:
3640
keys:
3741
- *cache_key
3842
- *cache_fallback_key
3943

4044
# Saves the cache for the current Yarn lock file. We store the node modules and the Bazel
4145
# repository cache in order to make subsequent builds faster.
42-
var_7: &save_cache
46+
var_8: &save_cache
4347
save_cache:
4448
key: *cache_key
4549
paths:
4650
- "node_modules"
4751
- "~/bazel_repository_cache"
4852

4953
# Decryption token that is used to decode the GCP credentials file in ".circleci/gcp_token".
50-
var_8: &gcp_decrypt_token "angular"
54+
var_9: &gcp_decrypt_token "angular"
5155

5256
# Job step that ensures that the node module dependencies are installed and up-to-date. We use
5357
# Yarn with the frozen lockfile option in order to make sure that lock file and package.json are
5458
# in sync. Unlike in Travis, we don't need to manually purge the node modules if stale because
5559
# CircleCI automatically discards the cache if the checksum of the lock file has changed.
56-
var_9: &yarn_install
60+
var_10: &yarn_install
5761
run:
5862
name: "Installing project dependencies"
5963
command: yarn install --frozen-lockfile --non-interactive
6064

6165
# Anchor that can be used to download and install Yarn globally in the bash environment.
62-
var_10: &yarn_download
66+
var_11: &yarn_download
6367
run:
6468
name: "Downloading and installing Yarn"
6569
command: |
6670
touch $BASH_ENV
6771
curl -o- -L https://yarnpkg.com/install.sh | PROFILE=$BASH_ENV bash -s -- --version "1.17.3"
6872
# Sets up the Bazel config which is specific for CircleCI builds.
69-
var_11: &setup_bazel_ci_config
73+
var_12: &setup_bazel_ci_config
7074
run:
7175
name: "Setting up Bazel configuration for CI"
7276
command: |
7377
echo "import %workspace%/.circleci/bazel.rc" >> ./.bazelrc
74-
# Sets up a different Docker image that includes a moe recent Firefox version which
75-
# is needed for headless testing.
76-
var_12: &docker-firefox-image
77-
# TODO(devversion): Temporarily use a image that includes Firefox 62 because the
78-
# ngcontainer image does include an old Firefox version that does not support headless.
79-
- image: circleci/node:11.4.0-browsers
8078
8179
# Attaches the release output which has been stored in the workspace to the current job.
8280
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs

WORKSPACE

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,16 @@ check_bazel_version("0.27.0")
2626

2727
node_repositories(
2828
# For deterministic builds, specify explicit NodeJS and Yarn versions.
29-
node_version = "10.16.0",
29+
node_version = "12.9.1",
30+
node_repositories = {
31+
"12.9.1-darwin_amd64": ("node-v12.9.1-darwin-x64.tar.gz", "node-v12.9.1-darwin-x64", "9aaf29d30056e2233fd15dfac56eec12e8342d91bb6c13d54fb5e599383dddb9"),
32+
"12.9.1-linux_amd64": ("node-v12.9.1-linux-x64.tar.xz", "node-v12.9.1-linux-x64", "680a1263c9f5f91adadcada549f0a9c29f1b26d09658d2b501c334c3f63719e5"),
33+
"12.9.1-windows_amd64": ("node-v12.9.1-win-x64.zip", "node-v12.9.1-win-x64", "6a4e54bda091bd02dbd8ff1b9f6671e036297da012a53891e3834d4bf4bed297"),
34+
},
3035
yarn_repositories = {
31-
"1.17.3": ("yarn-v1.17.3.tar.gz", "yarn-v1.17.3", "e3835194409f1b3afa1c62ca82f561f1c29d26580c9e220c36866317e043c6f3"),
36+
"1.19.1": ("yarn-v1.19.1.tar.gz", "yarn-v1.19.1", "34293da6266f2aae9690d59c2d764056053ff7eebc56b80b8df05010c3da9343"),
3237
},
33-
yarn_version = "1.17.3",
38+
yarn_version = "1.19.1",
3439
)
3540

3641
yarn_install(

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"license": "MIT",
1111
"engines": {
12-
"node": "^10.13.0",
12+
"node": "^12.0.0",
1313
"yarn": ">= 1.17.3"
1414
},
1515
"scripts": {
@@ -134,7 +134,7 @@
134134
"minimist": "^1.2.0",
135135
"mock-fs": "^4.7.0",
136136
"moment": "^2.18.1",
137-
"node-sass": "^4.11.0",
137+
"node-sass": "^4.12.0",
138138
"parse5": "^5.0.0",
139139
"protractor": "^5.4.2",
140140
"resolve-bin": "^0.4.0",

yarn.lock

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -7253,11 +7253,6 @@ lodash._shimkeys@~2.4.1:
72537253
dependencies:
72547254
lodash._objecttypes "~2.4.1"
72557255

7256-
lodash.assign@^4.2.0:
7257-
version "4.2.0"
7258-
resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7"
7259-
integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=
7260-
72617256
lodash.clonedeep@^4.3.2:
72627257
version "4.5.0"
72637258
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
@@ -7397,11 +7392,6 @@ lodash.keys@~2.4.1:
73977392
lodash._shimkeys "~2.4.1"
73987393
lodash.isobject "~2.4.1"
73997394

7400-
lodash.mergewith@^4.6.0:
7401-
version "4.6.1"
7402-
resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927"
7403-
integrity sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==
7404-
74057395
lodash.noop@^3.0.1:
74067396
version "3.0.1"
74077397
resolved "https://registry.yarnpkg.com/lodash.noop/-/lodash.noop-3.0.1.tgz#38188f4d650a3a474258439b96ec45b32617133c"
@@ -8185,11 +8175,6 @@ [email protected]:
81858175
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
81868176
integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=
81878177

8188-
nan@^2.10.0:
8189-
version "2.11.1"
8190-
resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766"
8191-
integrity sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==
8192-
81938178
nan@^2.12.1:
81948179
version "2.13.2"
81958180
resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7"
@@ -8336,7 +8321,7 @@ node-releases@^1.1.23:
83368321
dependencies:
83378322
semver "^5.3.0"
83388323

8339-
node-sass@^4.10.0:
8324+
node-sass@^4.10.0, node-sass@^4.12.0, node-sass@^4.8.3:
83408325
version "4.12.0"
83418326
resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.12.0.tgz#0914f531932380114a30cc5fa4fa63233a25f017"
83428327
integrity sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ==
@@ -8359,56 +8344,6 @@ node-sass@^4.10.0:
83598344
stdout-stream "^1.4.0"
83608345
"true-case-path" "^1.0.2"
83618346

8362-
node-sass@^4.11.0:
8363-
version "4.11.0"
8364-
resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.11.0.tgz#183faec398e9cbe93ba43362e2768ca988a6369a"
8365-
integrity sha512-bHUdHTphgQJZaF1LASx0kAviPH7sGlcyNhWade4eVIpFp6tsn7SV8xNMTbsQFpEV9VXpnwTTnNYlfsZXgGgmkA==
8366-
dependencies:
8367-
async-foreach "^0.1.3"
8368-
chalk "^1.1.1"
8369-
cross-spawn "^3.0.0"
8370-
gaze "^1.0.0"
8371-
get-stdin "^4.0.1"
8372-
glob "^7.0.3"
8373-
in-publish "^2.0.0"
8374-
lodash.assign "^4.2.0"
8375-
lodash.clonedeep "^4.3.2"
8376-
lodash.mergewith "^4.6.0"
8377-
meow "^3.7.0"
8378-
mkdirp "^0.5.1"
8379-
nan "^2.10.0"
8380-
node-gyp "^3.8.0"
8381-
npmlog "^4.0.0"
8382-
request "^2.88.0"
8383-
sass-graph "^2.2.4"
8384-
stdout-stream "^1.4.0"
8385-
"true-case-path" "^1.0.2"
8386-
8387-
node-sass@^4.8.3:
8388-
version "4.10.0"
8389-
resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.10.0.tgz#dcc2b364c0913630945ccbf7a2bbf1f926effca4"
8390-
integrity sha512-fDQJfXszw6vek63Fe/ldkYXmRYK/QS6NbvM3i5oEo9ntPDy4XX7BcKZyTKv+/kSSxRtXXc7l+MSwEmYc0CSy6Q==
8391-
dependencies:
8392-
async-foreach "^0.1.3"
8393-
chalk "^1.1.1"
8394-
cross-spawn "^3.0.0"
8395-
gaze "^1.0.0"
8396-
get-stdin "^4.0.1"
8397-
glob "^7.0.3"
8398-
in-publish "^2.0.0"
8399-
lodash.assign "^4.2.0"
8400-
lodash.clonedeep "^4.3.2"
8401-
lodash.mergewith "^4.6.0"
8402-
meow "^3.7.0"
8403-
mkdirp "^0.5.1"
8404-
nan "^2.10.0"
8405-
node-gyp "^3.8.0"
8406-
npmlog "^4.0.0"
8407-
request "^2.88.0"
8408-
sass-graph "^2.2.4"
8409-
stdout-stream "^1.4.0"
8410-
"true-case-path" "^1.0.2"
8411-
84128347
node-source-walk@^4.0.0, node-source-walk@^4.2.0:
84138348
version "4.2.0"
84148349
resolved "https://registry.yarnpkg.com/node-source-walk/-/node-source-walk-4.2.0.tgz#c2efe731ea8ba9c03c562aa0a9d984e54f27bc2c"

0 commit comments

Comments
 (0)