This is PR involves an improvement when declare a workspace project as the peer dependency.
We don't need to declare a actual version number when using a workspace project as the peer dependency. Since when using workspace: protocol, PNPM will always using the symlink installation (or hardlink in injected installation case) for that project. Also, when publish projects that including workspace: protocol to NPM registry, PNPM will also replace it with actual version number. (Learn more: https://pnpm.io/workspaces#publishing-workspace-packages)
How it was tested
Manually tested with Monorepo locally.
Also, run pnpm pack locally, to check that workspace: protocol can be replaced with a actual version number during publishing process.
Summary
This is PR involves an improvement when declare a workspace project as the peer dependency.
We don't need to declare a actual version number when using a workspace project as the peer dependency. Since when using
workspace:
protocol, PNPM will always using the symlink installation (or hardlink in injected installation case) for that project. Also, when publish projects that includingworkspace:
protocol to NPM registry, PNPM will also replace it with actual version number. (Learn more: https://pnpm.io/workspaces#publishing-workspace-packages)How it was tested
Manually tested with Monorepo locally. Also, run
pnpm pack
locally, to check thatworkspace:
protocol can be replaced with a actual version number during publishing process.