syncpack
syncpack copied to clipboard
feat(version): try to support the query language within pnpm.overrides
Description
Ref: https://pnpm.io/package_json#pnpmoverrides
You may specify the package the overriden dependency belongs to by separating the package selector from the dependency selector with a ">", for example qar@1>zoo will only override the zoo dependency of qar@1, not for any other dependencies.
We currently override a dependency of a specific package using pnpm.overrides.
In our syncpack config, we require exact dependency versions with this config:
When we run syncpack lint, we get the following error:
Suggested Solution
It seems like maybe syncpack doesn't understand this format yet? The current workaround we have is:
Hey @mlahargou, slow reply here but that's exactly right – work is needed to understand and resolve the clever > syntax inside the name. It'll be possible but will take some time as it's pretty involved.
Hey @zkochan 👋
If you have a moment, would you mind sharing any links you have of relevant tests or specs for the syntax pnpm overrides supports? Such as [email protected]>bar and $foo? I can use that to try and also support that within syncpack.
Thanks a lot.
Here are the docs: https://pnpm.io/settings#overrides
Thanks, I have the docs already, are there any tests or anything more detailed that might help me understand what is possible more deeply? If not, no worries.
https://github.com/pnpm/pnpm/blob/main/config/parse-overrides/test/index.ts
Thanks a lot that's great