0.0.23 • Published 6 months ago

pinyarn v0.0.23

Weekly downloads
4
License
MIT
Repository
github
Last release
6 months ago

pinyarn

npm version Twitter Follow

pinyarn determines Yarn and Yarn plugins version used in the project and creates a script that downloads exactly this version from official Yarn repository even when global one changes.

Usage

npx pinyarn

or if Yarn 2 is already used with the project

yarn dlx pinyarn

or

yarn dlx pinyarn 2

to use latest stable version 2

or

yarn dlx pinyarn master

to use latest version of Yarn 2 from master

or

yarn dlx pinyarn 1030

to use Yarn 2 version from latest commit to the Pull Request 1030

or

yarn dlx pinyarn 4cd0bba

to use Yarn 2 from commit sha 4cd0bba

How it works

pinyarn computes URLs of Yarn and its plugins from where they can be downloaded and generates two files:

  • .pinyarn.js - a script to download Yarn and plugins from these URLs
  • .pinyarn.json - configuration file with URLs and GitHub access tokens having public_repo permission

GitHub access tokens used only when you use unreleased Yarn 2 version from GitHub Actions build artifacts. You can generate your own list of GitHub access tokens, the only requirement to them is that they have public_repo permission. Please note that each token must be split into two or more pieces to prevent GitHub to autorevoke it. .yarnrc.js will pick the token from the list at random each time it will be needed to lower down chance of GitHub request throttling.

pinyarn modifies your .yarnrc.yml by setting yarnPath to point to .pinyarn.js. Each time Yarn is run it launches the script pointed to by yarnPath. .pinyarn.js thus receives the control first and checks whether correct version of Yarn and plugins have been downloaded and if not downloads them, removes incorrect versions if any and passes control to Yarn binary.

License

Copyright © 2020 SysGears (Cyprus) Limited. This source code is licensed under the MIT license.

0.0.23

6 months ago

0.0.20

1 year ago

0.0.21

1 year ago

0.0.22

1 year ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.14

3 years ago

0.0.15

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago