/
๐Ÿ“

YARN

note
On this page
  • Using & to run scripts in parallel
  • Using && to run scripts in serial
  • For Performance
  • package.json
  • Resources

Using & to run scripts in parallel

Using && to run scripts in serial

For Performance

yml
# .yarnrc.yml
compressionLevel: 0
nmMode: hardlinks-local
enableGlobalCache: true
save-prefix: "" # "~" or "^"

package.json

  • Caret (^): matches the most recent major version (the first number). ^1.2.3 will match any 1.x.x release including 1.3.0, but will hold off on 2.0.0.
  • Tilde (~): matches the most recent `minor
  • version (the middle number).~1.2.3will match all1.2.xversions but will miss1.3.0`.

So for version zero software, the caret behaves like the tilde.

Both ~0.1.2 and ^0.1.2 will match the most recent 0.1 software, but ignore 0.2.x since it could be incompatible.

Resources

  • Migrating our Monorepo to Yarn 2
Edit this page
logo
Code-related notes and snippets