build: vendor yarn using the .yarnrc yarn-path value (#34902)

Rather than enforcing yarn versioning using `package.json`'s
engines value.  We can utilize yarn's `yarn-path` value to
ensure that the version of yarn used at execution time is
consistent for everyone who uses our repo.  This is the first
step in this wider vendoring process.  We will use this same
vendoring mechanism for CI after
https://github.com/bazelbuild/rules_nodejs/pull/1569 lands

PR Close #34902
This commit is contained in:
Joey Perrott 2020-01-22 09:11:34 -08:00 committed by Andrew Kushnir
parent 970b22f98e
commit eb4b7d2d8b
3 changed files with 147333 additions and 0 deletions

13
.yarn/README.md Normal file
View File

@ -0,0 +1,13 @@
# Yarn Vendoring
We utilize Yarn's `yarn-path` configuration in a shared `.yarnrc` file to enforce
everyone using the same version of Yarn. Yarn checks the `.yarnrc` file to
determine if yarn should delegate the command to a vendored version at the
provided path.
## How to update
To update to the latest version of Yarn as our vendored version:
- Run this command
```sh
yarn policies set-version latest
```
- Remove the previous version

147315
.yarn/releases/yarn-1.21.1.js vendored Executable file

File diff suppressed because one or more lines are too long

5
.yarnrc Normal file
View File

@ -0,0 +1,5 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
yarn-path ".yarn/releases/yarn-1.21.1.js"