Adds an additional check during pack which walks all the
dependencies in the manifest, and verifies that
there are no remaining `backstage:` versions.
I'm not aware of any realistic cases where the
code that does the replacement would be expected
to fail, but since a backstage:^ package in the
manifest will break the release, it seems prudent
to double check and fail fast to allow us to catch
unexpected results.
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
It turns out this method is called for
`backstage:` descriptors during `yarn dedupe`, so
we need to implement it.
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
Previously this method only worked in the
workspace root. A bit verbose and manual to make
this work, because it needs to be synchronous.
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
Yarn does not support protocols other than npm and
workspace for peerDependencies - any other
protocols will produce an error and be converted
to '*' when running yarn. This change matches that
limitation in the beforeWorkspacePacking hook.
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit introduces a beforeWorkspacePacking
hook which converts `backstage:` versions back
into `npm:`` versions when packages are packed for
publish. This allows the `backstage:` protocol to
be used even for packages that are intended to
themselves be published (such as packages in
third-party Backstage plugin monorepos outside
core).
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>