mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-27 10:30:58 -04:00
fix: disable global virtual store during pnpm deploy (#10577)
This commit is contained in:
8
.changeset/bold-words-give.md
Normal file
8
.changeset/bold-words-give.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-installation": patch
|
||||
"@pnpm/plugin-commands-deploy": patch
|
||||
pnpm: patch
|
||||
---
|
||||
|
||||
When the [`enableGlobalVirtualStore`](https://pnpm.io/settings#enableglobalvirtualstore) option is set, the `pnpm deploy` command would incorrectly create symlinks to the global virtual store. To keep the deploy directory self-contained, `pnpm deploy` now ignores this setting and always creates a localized virtual store within the deploy directory.
|
||||
|
||||
@@ -274,6 +274,7 @@ export type InstallCommandOptions = Pick<Config,
|
||||
| 'deployAllFiles'
|
||||
| 'depth'
|
||||
| 'dev'
|
||||
| 'enableGlobalVirtualStore'
|
||||
| 'engineStrict'
|
||||
| 'excludeLinksFromLockfile'
|
||||
| 'frozenLockfile'
|
||||
|
||||
@@ -57,6 +57,7 @@ export type InstallDepsOptions = Pick<Config,
|
||||
| 'dedupePeerDependents'
|
||||
| 'depth'
|
||||
| 'dev'
|
||||
| 'enableGlobalVirtualStore'
|
||||
| 'engineStrict'
|
||||
| 'excludeLinksFromLockfile'
|
||||
| 'global'
|
||||
|
||||
@@ -170,6 +170,9 @@ export async function handler (opts: DeployOptions, params: string[]): Promise<v
|
||||
// the deploy directory. It's also just weird to include empty importers
|
||||
// that don't matter to the filtered lockfile generated for pnpm deploy.
|
||||
pruneLockfileImporters: true,
|
||||
// The node_modules for a pnpm deploy should be self-contained. The global
|
||||
// virtual store would create symlinks outside of the deploy directory.
|
||||
enableGlobalVirtualStore: false,
|
||||
depth: Infinity,
|
||||
hooks: {
|
||||
...opts.hooks,
|
||||
@@ -266,6 +269,9 @@ async function deployFromSharedLockfile (
|
||||
allProjectsGraph: undefined,
|
||||
selectedProjectsGraph: undefined,
|
||||
rootProjectManifest: deployFiles.manifest,
|
||||
// The node_modules for a pnpm deploy should be self-contained. The global
|
||||
// virtual store would create symlinks outside of the deploy directory.
|
||||
enableGlobalVirtualStore: false,
|
||||
rootProjectManifestDir: deployDir,
|
||||
dir: deployDir,
|
||||
lockfileDir: deployDir,
|
||||
|
||||
Reference in New Issue
Block a user