Skip to content

fix: update unscoped package storage location in virtual global store#10363

Merged
zkochan merged 2 commits intomainfrom
change-virtual-store
Dec 25, 2025
Merged

fix: update unscoped package storage location in virtual global store#10363
zkochan merged 2 commits intomainfrom
change-virtual-store

Conversation

@zkochan
Copy link
Copy Markdown
Member

@zkochan zkochan commented Dec 25, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 25, 2025 19:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the storage location for unscoped packages in the virtual global store by adding an @/ prefix to maintain a uniform 4-level directory depth structure across both scoped and unscoped packages.

Key changes:

  • Modified calcGraphNodeHash to prepend @/ to unscoped package paths
  • Updated test expectations to verify the new path structure includes the @/ directory

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/calc-dep-state/src/index.ts Implements the @/ prefix logic for unscoped packages in the hash path generation, ensuring uniform 4-level directory depth
pkg-manager/core/test/install/nodeRuntime.ts Updates two test assertions to expect the new path structure with @/ prefix for the node runtime package
.changeset/hip-jars-boil.md Documents the semi-breaking change with appropriate version bumps (major for calc-dep-state, minor for pnpm)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +124 to +128
// Use @/ prefix for unscoped packages to maintain uniform 4-level directory depth
// Scoped: @scope/pkg/version/hash
// Unscoped: @/pkg/version/hash
const prefix = name.startsWith('@') ? '' : '@/'
return `${prefix}${name}/${version}/${hexDigest}`
Copy link

Copilot AI Dec 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new prefix logic for unscoped packages lacks direct unit test coverage. Consider adding tests for the calcGraphNodeHash function that verify both scoped packages (returning paths like @scope/pkg/version/hash) and unscoped packages (returning paths like @/pkg/version/hash) to ensure the prefix logic works correctly for both cases.

Copilot uses AI. Check for mistakes.
@zkochan zkochan merged commit c4045fc into main Dec 25, 2025
13 checks passed
@zkochan zkochan deleted the change-virtual-store branch December 25, 2025 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants