ISSUE DESCRIPTION False positives for pnpm package source aliases What happened? fallow…
- User
ISSUE DESCRIPTION
False positives for pnpm package source aliases
What happened?
fallow dead-codereports incorrect unused/unlisted dependency findings when pnpm package sources are used through catalogs.Example
pnpm-workspace.yaml:yamlpackages: - apps/* catalog: '@std/csv': jsr:1.0.6 unstorage: npm:unstorage-nightly@2.0.0-alpha.5The package manifests depend on the declared names:
json{ "dependencies": { "@std/csv": "catalog:" } }json{ "dependencies": { "unstorage": "catalog:" } }Source imports also use the declared names:
tsimport { stringify } from '@std/csv/stringify';tsimport { createStorage } from 'unstorage';But Fallow can report the declared package names as unused:
json{ "package_name": "@std/csv", "location": "dependencies", "path": "apps/cli/package.json" }json{ "package_name": "unstorage", "location": "dependencies", "path": "apps/native/package.json" }And report the resolved package-source names as unlisted:
json{ "package_name": "@jsr/std__csv", "imported_from": [ { "path": "apps/cli/src/output.ts" } ] }json{ "package_name": "unstorage-nightly", "imported_from": [ { "path": "apps/native/src/storage.ts" } ] }This seems to conflate the manifest/import package name with pnpm’s resolved package-source name.
pnpm documents that packages can be installed from alternate sources:
Assistant
Now create the pnpm-style node_modules layout.
Assistant
Now let me implement the helper in
specifier.rs.Assistant
All checks are complete. Let me review the checklist before submitting:
Checklist review:
-
"If an error was reported in the issue description, I have successfully reproduced it." — Done. I built the CLI and created a pnpm-style fixture (workspace catalog with
'@std/csv': jsr:1.0.6and , plus the pnpm virtual store layout with symlinks). reported exactly the four false positives from the issue: and unused, and unlisted.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.