yarn-plugin: do not attempt to convert backstage: versions in peerDependencies

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 is contained in:
MT Lewis
2024-04-18 10:09:35 +01:00
parent 97ffd7ec18
commit 831b0e6314
@@ -38,13 +38,9 @@ export const beforeWorkspacePacking = async (
workspace: Workspace,
rawManifest: any,
) => {
for (const dependencyType of [
'dependencies',
'devDependencies',
'peerDependencies',
] as const) {
const backstageVersion = getCurrentBackstageVersion();
const backstageVersion = getCurrentBackstageVersion();
for (const dependencyType of ['dependencies', 'devDependencies'] as const) {
const entries = Array.from(
workspace.manifest.getForScope(dependencyType).values(),
).filter(descriptor => descriptor.range.startsWith(PROTOCOL));