Skip to content

fix: refresh hoisted local npm dependencies in workspaces - #986

Open
buffbiryani wants to merge 6 commits into
aws:developfrom
buffbiryani:fix/npm-workspace-dependency-refresh
Open

buffbiryani wants to merge 6 commits into
aws:developfrom
buffbiryani:fix/npm-workspace-dependency-refresh

Conversation

@buffbiryani

Copy link
Copy Markdown

Issue #, if available: aws/aws-sam-cli#7546

Description of changes

Extends the single-project local npm dependency refresh fix in #983 to support npm workspaces.

  • Refreshes hoisted local dependencies in individual workspace builds and shared project preparation.
  • Supports both file-prefixed and bare local dependency paths.
  • Supports copied and symlinked dependency layouts across npm versions.
  • Protects original source directories, symbolic links, unrelated dependencies, and lockfiles.
  • Adds debug logging when workspace refresh cannot safely proceed.
  • Documents hidden lockfile staleness behavior.
  • Adds unit and parameterized integration tests across supported Node.js runtimes.

This contribution was separated from #983 as requested during review and depends on that PR.

Description of how you validated changes

  • 1,252 unit and functional tests passed.
  • 64 additional subtests passed.
  • All 306 Node.js integration tests passed under npm 10.9.2.
  • All 306 Node.js integration tests passed under npm 11.21.3.
  • Achieved 94.38% code coverage, exceeding the required 94%.
  • Passed Ruff, Black, and Git diff checks.
  • Verified individual and shared workspace builds with and without lockfiles.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@buffbiryani
buffbiryani requested a review from a team as a code owner December 1, 2026 22:34
@github-actions github-actions Bot added area/workflow/node_npm pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/workflow/node_npm pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant