๐ชUpgrading Yarn Scripts
Upgrading your Yarn Spinner 1.x scripts to Yarn Spinner 2.x is easy.
The Yarn Spinner Console (ysc
) can upgrade your older .yarn
scripts to the latest syntax.
The Yarn Spinner Console (ysc
) is in heavy development, and is likely to have its own complete section here, in the documentation, before long. Until then, find further initial documentation via its GitHub project.
To upgrade your scripts:
Install the version of Yarn Spinner Console that matches your version of Yarn Spinner. You can do this via the Yarn Spinner Console GitHub Project. Choose Releases in the sidebar, and download the appropriate binary for your platform. If you just want the latest release, you can find it here.
Run the upgrader on your scripts. To upgrade, you must run ysc
on your command-line/terminal with the upgrade
parameter and a path to a yarn file:
You can also run the upgrade on multiple scripts at once. To do this, you can pass in as many .yarn
files as you want:
By default, ysc
will replace the existing .yarn
files you've passed in, as part of the upgrade. If you don't want it to do this, either make sure you have a backup, or pass in the --output-directory
option, after the upgrade
parameter. For example:
Last updated