mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-31 13:32:18 -04:00
fix: disable global virtual store during pnpm deploy (#10577)
This commit is contained in:
committed by
Zoltan Kochan
parent
c02513b58b
commit
4794c61dd1
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.
|
||||
|
||||
@@ -285,6 +285,7 @@ export type InstallCommandOptions = Pick<Config,
|
||||
| 'deployAllFiles'
|
||||
| 'depth'
|
||||
| 'dev'
|
||||
| 'enableGlobalVirtualStore'
|
||||
| 'engineStrict'
|
||||
| 'excludeLinksFromLockfile'
|
||||
| 'frozenLockfile'
|
||||
|
||||
@@ -59,6 +59,7 @@ export type InstallDepsOptions = Pick<Config,
|
||||
| 'dedupePeerDependents'
|
||||
| 'depth'
|
||||
| 'dev'
|
||||
| 'enableGlobalVirtualStore'
|
||||
| 'engineStrict'
|
||||
| 'excludeLinksFromLockfile'
|
||||
| 'global'
|
||||
|
||||
@@ -168,6 +168,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,
|
||||
@@ -257,6 +260,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