JamieMason / JamieMason/syncpack

feat(version): try to support the query language within pnpm.overrides

Open
#231 7 comments 3 reactions 0 assignees View on GitHub
Priority: Low Type: Feat
Dominant language
Rust
Stars
2.1k
Forks
72
PR merge metrics
No merged PRs in 30d

Description

## Description

Ref: https://pnpm.io/next/settings#overrides

> 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`.

![image](https://github.com/JamieMason/syncpack/assets/29667789/4dcf48b0-5181-42e0-936e-cc685f4fea66)

In our syncpack config, we require exact dependency versions with this config:

![image](https://github.com/JamieMason/syncpack/assets/29667789/5eff0a76-2a30-47f6-a08b-72a6219c9b27)

When we run `syncpack lint`, we get the following error:

![image](https://github.com/JamieMason/syncpack/assets/29667789/f0d8c9b6-acd3-44c4-981c-d800840d8da3)

## Suggested Solution

It seems like maybe syncpack doesn't understand this format yet? The current workaround we have is:

![image](https://github.com/JamieMason/syncpack/assets/29667789/80ec9290-5270-4717-a4f0-ad1623c53f00)

Contributor guide

Open the contributing guide

Research direction

Start with the syncpack lint reproduction and the pnpm.overrides documentation linked in the issue, focusing on the package-selector syntax separated by ">". Done means syncpack accepts valid pnpm override selectors while retaining exact dependency-version checks, without requiring the documented workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.