I realised that by default the `Plugin` type from `@yarnpkg/core` sets the type of the `hooks` property to `any`. This meant that there wasn't any restriction on the hooks that could be passed, and introduced the risk that a typo in the `beforeWorkspacePacking` name could lead to the hook being skipped. This commit pulls in the appropriate type for Hooks to verify the name and signature of the hook. Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
yarn-plugin-backstage
This yarn plugin adds a backstage: version protocol to yarn, which replaces
specific version ranges for @backstage/ packages. The only version range
supported by this plugin is backstage:^, which has similar semantics to the
corresponding workspace range when using
workspace dependencies; locally, the package will always resolve to the exact
version specified in the manifest for the Backstage release listed in
backstage.json. If the dependent package is published, this version will be
prefixed by ^.
Detailed instructions for using the plugin can be found in the docs.
Installation
yarn plugin import https://versions.backstage.io/v1/tags/main/yarn-plugin
The resulting changes in the file system should be committed to your repo.
Usage
The yarn plugin recognizes the version string "backstage:^", and replaces it
with the appropriate version based on the overall Backstage version in
backstage.json.