Skip to content

Commit

Permalink
fix: remove handling of alias in peerDependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
EWhite613 committed Apr 10, 2024
1 parent e15a921 commit 7d88b5a
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pkg-manifest/exportable-manifest/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,6 @@ async function makePublishPeerDependency (depName: string, depSpec: string, dir:
return depSpec.replace(workspaceSemverRegex, `${semverRangeToken}${manifest.version}`)
}

if (depSpec.includes('workspace:./') || depSpec.includes('workspace:../')) {
const manifest = await resolveManifest(depName, path.join(dir, depSpec.replace('workspace:', '')))

if (manifest.name !== depName) {
throw new PnpmError('DO_NOT_SUPPORT_ALIAS_IN_PEER_DEPENDENCIES', `Workspace protocol for peerDependencies does not support aliasing of "${depName}" to "${manifest.name}"`)
}
return `${manifest.version}`
}

depSpec = depSpec.replace('workspace:', '')

return depSpec
Expand Down

0 comments on commit 7d88b5a

Please sign in to comment.