This repository demonstrates an issue with parsing yarn lockfiles when using custom plugins that transform version ranges. The repository includes:
- A vendored installation of yarn 4.5.1
- The Backstage yarn plugin
- A dependency on an arbitrary
@backstagepackage, using thebackstage:^version range, support for which is provided by the above plugin.- Note that this version range is converted to
backstage:1.32.5in yarn.lock.
- Note that this version range is converted to
To reproduce the issue:
- Clone the repo
yarn installyarn repro(note that this command simply runssrc/index.jswith node)- Note the OutOfSync error.
Note: If you wish to confirm the minified code in this repo is free of malware, you
can recreate the contents of .yarn from scratch by removing the .yarn
directory and running the following commands:
yarn set version stableto vendor the latest stable release of yarnyarn plugin import https://versions.backstage.io/v1/tags/main/yarn-pluginto install the latest stable version of the official Backstage yarn plugin.