Skip to content

Upgrade yarn to v1.15.2

Luke Bennett requested to merge update-yarn-1-15-2 into master

What does this MR do?

CE port: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26233

Use yarn v1.15.2.

https://github.com/yarnpkg/yarn/blob/master/CHANGELOG.md

Uses yarn policies set-version to set latest version.

Removed the yarn package.json engine property because yarn policies packages the right version of yarn for everyone to use.

https://yarnpkg.com/lang/en/docs/cli/policies/

In order to alleviate this issue, you can specify the required Yarn version inside the package.json file, which will prompt your colleagues to use the same version as you. Unfortunately, while technically strong, this technique adds an unwanted burden on them - given that the Yarn binary is typically global, switching from a branch to another might be particularly annoying if they change the version.

To fix that, yarn policies set-version offers a simple way to checkin your Yarn release within your repository. Once you run it, your configuration will be updated in such a way that anyone running a Yarn command inside the project will always use the version you set - and this transparently.

...

Under the hood, the command will simply download the single-file release from the GitHub repository, store it inside your project (inside the .yarn/releases folder), then finally update your configuration to point to the new file (using yarn-path).

Add .yarnrc as FE file for danger: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26232

What are the relevant issue numbers?

Helps with https://gitlab.com/gitlab-org/gitlab-ee/issues/10403

Does this MR meet the acceptance criteria?

Edited by Luke Bennett

Merge request reports