* refactor: factor out a `getRealNameAndSpec` function
* test: `pnpm add` does not modify existing catalog entries
* fix: resolve preferred version without mutating bare specifier
close#9759
* refactor: factor out a `getRealNameAndSpec` function
* fix: handle npm aliases without a bare specifier in `unwrapPackageName`
* Fix formatting in unwrapPackageName.ts
* feat: enable injected local packages to work with global virtual store
by leveraging `pkgLocationsByDepPath` for `file:` dependencies.
* fix: populate `pkgLocationsByDepPath` directly for directory dependencies in the graph builder
* refactor: store directory dependencies as a Map instead of an object
* refactor: improve file: dependency target directory resolution
by prioritizing `directoryDepsByDepPath` and providing a lockfile fallback.
* refactor: remove `pkgLocationsByDepPath` from hoisted dependency graph generation parameters
* test: fix
* test: fix
* refactor: simplify directory lookup for injected workspace packages
by directly using the dependency graph
* refactor: move extendProjectsWithTargetDirs to headless module and update imports
* refactor: make `directoryDepsByDepPath` required
in `LockfileToDepGraphOptions` and remove its nullish coalescing in headless
* refactor: directory dependency tracking
by renaming `directoryDepsByDepPath` to `injectionTargetsByDepPath`
and extracting related logic, and remove an unused export.
* docs: add changesets
* fix: implemented CR suggestions
* feat: enhance `store prune` to clean global virtual store
`pnpm store prune` will now clean the global virtual store
via a new project registry and mark-and-sweep garbage collection.
* test: add store prune test for transitive dependency preservation
* refactor: extract global virtual store pruning logic to a new file
* fix: improve symlink handling in global virtual store pruning
* fix: optimize removal of unreachable packages in global virtual store
* fix: refine project registry error handling
Throw `PnpmError` for inaccessible projects
and specifically clean up stale symlinks for `ENOENT` errors.
* test: create virtual store with install command
* refactor: standardize global virtual store directory structure
by placing unscoped packages under an `@` scope.
* test: update store prune tests to use `toContain` and `not.toContain` assertions`
* fix: linting issues
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: implemented CR suggestions
* fix: revert not needed change
* fix: use `is-subdir` to accurately determine if symlink targets
are within the global virtual store.
* revert: changes in package.json files
* test: add `--config.ci=false` to store prune tests
* fix(git-fetcher): ensure the specified commit is used after checkout
* fix(git-resolver): always resolve to a full commit
* chore: add changeset heavy-dragons-start
* test: fix related test case
* test: fix some other test that gets stuck
* Update heavy-dragons-start.md with PR reference
Add reference to pull request #10310 for clarity.
* fix(tarball-resolver): add integrity hash to HTTP tarball dependencies
* Refactor to download tarball just once
* Fix tests
* fix: only calc hash when it is not passed in to the fetcher
* docs: update changesets