Skip to content
SoftwareHow to install
Yarnhttps://yarnpkg.com/getting-started/install
Rust / Rustuphttps://rust-lang.org/tools/install

Clone the ZPM repository and cd into it:

Terminal window
git clone https://github.com/yarnpkg/zpm.git
cd zpm

You should now be able to build the project:

Terminal window
cargo build --release -p zpm-switch -p zpm

We tend to build Yarn in release mode, even in development, because Rust is known to be significantly slower in debug mode. Regardless of whether you want to use the release or debug version, create a symbolic link named local pointing to the binary you just created:

Terminal window
ln -s target/release local

Also configure your system’s Yarn Switch to use this local version when working on the project:

Terminal window
yarn switch link target/release/yarn-bin

One of the reasons why the migration from the Classic codebase to the Berry one was so painful was that we lost all our testing framework. All Classic tests were written using internal primitives, so they couldn’t be reused after the redesign.

We learned from that mistake, and the Berry tests were written using the regular CLI as interface. This means it’s easy to swap the binary from Berry to ZPM and run the full Yarn testsuite!

Start by cloning the Berry repository:

Terminal window
git clone https://github.com/yarnpkg/berry.git ~/berry

Export a BERRY_DIR environment variable pointing to the Berry repository:

Terminal window
export BERRY_DIR=~/berry

Then run the yarn berry command from the ZPM repository:

Terminal window
yarn berry test:integration commands/add.test