Skip to content

Preserve npm workspace links as path sources - #150

Draft
sundaysebasidian-byte wants to merge 1 commit into
git-pkgs:mainfrom
sundaysebasidian-byte:fix/npm-workspace-links
Draft

sundaysebasidian-byte wants to merge 1 commit into
git-pkgs:mainfrom
sundaysebasidian-byte:fix/npm-workspace-links

Conversation

@sundaysebasidian-byte

Copy link
Copy Markdown

Fixes #114.

npm lockfile links now expose their resolved local path through SourcePath rather than RegistryURL. Workspace target records are excluded from installed dependencies, while nested node_modules entries remain included. Missing link versions remain empty rather than being inferred from target records.

Adds public Parse regression coverage for package-lock.json and npm-shrinkwrap.json, lockfile versions 2 and 3, and compact and indented JSON. The cases cover scoped workspaces, external links, dependency scopes, direct flags, registry packages, and nested installations. Updates the existing fixture expectations and documents the behavior.

Validation on macOS arm64 with Go 1.27.3:

  • All 8 regression subcases fail on the baseline and pass with the patch.
  • go build -v ./... passed.
  • go test -v -race ./... passed across 50 packages (810 passing test/subtest log entries).
  • golangci-lint v2.15.0 reported 0 issues.
  • A separate AI review exercised 16 additional probes: baseline 0/16, patched 16/16.

AI assistance was used for implementation, tests, and independent review. No human review is claimed. Linux CI has not been run locally; this is a draft pending maintainer review and upstream CI.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Preserve npm workspace links without emitting spurious dependencies

1 participant