Skip to content

Commit 7493b8a

Browse files
ocombealexeagle
authored andcommitted
build: upgrade yarn to 1.3.2 (angular#21406)
Fixes angular#20566 PR Close angular#21406
1 parent c4f02e2 commit 7493b8a

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

aio/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"test": "yarn check-env && ng test",
2020
"pree2e": "yarn check-env && yarn ~~update-webdriver",
2121
"e2e": "ng e2e --no-webdriver-update",
22+
"preinstall": "node ../tools/yarn/check-yarn.js",
2223
"presetup": "yarn install --frozen-lockfile && yarn ~~check-env && yarn boilerplate:remove",
2324
"setup": "yarn aio-use-npm && yarn example-use-npm",
2425
"postsetup": "yarn boilerplate:add && yarn build-ie-polyfills && yarn generate-plunkers && yarn generate-zips && yarn docs",
@@ -60,7 +61,7 @@
6061
},
6162
"engines": {
6263
"node": ">=8.9.1 <9.0.0",
63-
"yarn": ">=1.0.2 <2.0.0"
64+
"yarn": ">=1.3.2 <2.0.0"
6465
},
6566
"private": true,
6667
"dependencies": {

aio/tools/examples/shared/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
"http-server": "http-server",
88
"protractor": "protractor",
99
"webdriver:update": "webdriver-manager update --standalone false --gecko false $CHROMEDRIVER_VERSION_ARG",
10+
"preinstall": "node ../../../../tools/yarn/check-yarn.js",
1011
"postinstall": "yarn webdriver:update"
1112
},
13+
"engines": {
14+
"node": ">=8.9.1 <9.0.0",
15+
"yarn": ">=1.3.2 <2.0.0"
16+
},
1217
"keywords": [],
1318
"author": "",
1419
"license": "MIT",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"license": "MIT",
1010
"engines": {
1111
"node": ">=8.9.1 <9.0.0",
12-
"yarn": ">=1.0.2 <2.0.0"
12+
"yarn": ">=1.3.2 <2.0.0"
1313
},
1414
"repository": {
1515
"type": "git",
@@ -20,7 +20,7 @@
2020
"skylint": "find . -type f -name \"*.bzl\" ! -path \"*/node_modules/*\" ! -path \"./dist/*\" | xargs $(bazel info bazel-bin)/external/io_bazel/src/tools/skylark/java/com/google/devtools/skylark/skylint/Skylint",
2121
"prebuildifier": "bazel build --noshow_progress @com_github_bazelbuild_buildtools//buildifier",
2222
"buildifier": "find . -type f \\( -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs $(bazel info bazel-bin)/external/com_github_bazelbuild_buildtools/buildifier/buildifier",
23-
"preinstall": "node -e \"if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('Please use Yarn instead of NPM to install dependencies. See: https://yarnpkg.com/lang/en/docs/install/')\"",
23+
"preinstall": "node tools/yarn/check-yarn.js",
2424
"postinstall": "yarn update-webdriver",
2525
"update-webdriver": "webdriver-manager update --gecko false $CHROMEDRIVER_VERSION_ARG",
2626
"check-env": "gulp check-env"

scripts/ci/env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fi
3535
#######################
3636

3737
setEnvVar NODE_VERSION 8.9.1
38-
setEnvVar YARN_VERSION 1.0.2
38+
setEnvVar YARN_VERSION 1.3.2
3939
# Pin to a Chromium version that does not cause the aio e2e tests to flake. (See https://github.com/angular/angular/pull/20403.)
4040
# Revision 494239 (which was part of Chrome 62.0.3186.0) is the last version that does not cause flakes. (Latest revision checked: 508578)
4141
setEnvVar CHROMIUM_VERSION 494239 # Chrome 62 linux stable, see https://www.chromium.org/developers/calendar

tools/yarn/check-yarn.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
'use strict';
10+
11+
if (process.env.npm_execpath.indexOf('yarn') === -1) {
12+
throw new Error(
13+
'Please use Yarn instead of NPM to install dependencies. See: https://yarnpkg.com/lang/en/docs/install/');
14+
}

0 commit comments

Comments
 (0)