I was trying out Yarn V2 and put one of the dependencies in one workspace into the peerDependency
section. But Yarn always modifies the version of the dependency to *
no matter what version I wrote. Like this:
package.json (before)
{ "peerDependencies": { "packageA": "workspace:^0.0.1" } }
package.json (after)
{ "peerDependencies": { "packageA": "*" } }
where packageA
is another local workspace managed by the monorepo. Doesn't *
mean any version would satisfy? If this is a known Yarn feature, how could I specify a version in peer dependencies?
question from:
https://stackoverflow.com/questions/65881330/why-does-yarn-modify-package-version-in-peer-dependencies 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…