Skip to content

fix: preserve pnpm package source aliases#824

Open
V1RE wants to merge 1 commit into
fallow-rs:mainfrom
V1RE:fix/pnpm-package-source-aliases
Open

fix: preserve pnpm package source aliases#824
V1RE wants to merge 1 commit into
fallow-rs:mainfrom
V1RE:fix/pnpm-package-source-aliases

Conversation

@V1RE
Copy link
Copy Markdown

@V1RE V1RE commented May 31, 2026

What

Preserves declared import/package names when pnpm package sources resolve to a differently named package in .pnpm.

Adds regression coverage for pnpm package source forms from the pnpm docs:

  • npm registry/range
  • JSR
  • workspace
  • local directory
  • local tarball
  • remote tarball
  • git URL
  • hosted git shorthand
  • npm:<actual>@<version> alias

Why

Closes #823.

pnpm package sources can map a declared dependency name to a different resolved source package, e.g. jsr: or npm:<actual>@<version>.

Fallow should credit the declared/imported package name for unused/unlisted dependency analysis, rather than reporting the declared dependency as unused and the resolved source package as unlisted.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace

@V1RE V1RE requested a review from BartWaardenburg as a code owner May 31, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False positives for pnpm package source aliases

1 participant