The best way to do it now is through catalogs.
In pnpm-workspace.yaml
:
packages:
- packages/*
# Define a catalog of version ranges.
catalog:
typescript: ^5.4.2
Then in example/package.json
{
"name": "example",
"dependencies": {
"typescript": "catalog:"
}
}