yarn-plugin: rewrite using reduceDependency hook
Switching to using the reduceDependency hook simplifies the plugin, since we can do all the work in one go. It also means that the yarn.lock file doesn't need to change when adding and removing the yarn plugin, which avoids unintentionally unlocking packages versions. As part of this change, the descriptor emitted by the plugin has been changed from `npm:<manifest-version>` to `npm:^<manifest-version>`, to match the range emitted when packing packages. This ensures good interoperability with the `backstage-cli build-workspace`, which packs packages into a new workspace and copies yarn.lock across. Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
"@backstage/backend-test-utils": "workspace:^",
|
||||
"@backstage/cli": "workspace:^",
|
||||
"@yarnpkg/builder": "^4.0.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"nodemon": "^3.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user