mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-26 00:28:10 -05:00
fix: pass resolveSymlinks to directory-fetcher (#5644)
This commit is contained in:
7
.changeset/warm-lizards-agree.md
Normal file
7
.changeset/warm-lizards-agree.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"@pnpm/core": minor
|
||||
"@pnpm/headless": minor
|
||||
"@pnpm/lifecycle": minor
|
||||
---
|
||||
|
||||
New option added: resolveSymlinksInInjectedDirs.
|
||||
@@ -116,6 +116,7 @@ export interface StrictInstallOptions {
|
||||
patchedDependencies?: Record<string, string>
|
||||
|
||||
allProjects: ProjectOptions[]
|
||||
resolveSymlinksInInjectedDirs: boolean
|
||||
}
|
||||
|
||||
export type InstallOptions =
|
||||
@@ -199,6 +200,7 @@ const defaults = async (opts: InstallOptions) => {
|
||||
workspacePackages: {},
|
||||
enableModulesDir: true,
|
||||
modulesCacheMaxAge: 7 * 24 * 60,
|
||||
resolveSymlinksInInjectedDirs: false,
|
||||
} as StrictInstallOptions
|
||||
}
|
||||
|
||||
|
||||
@@ -245,6 +245,7 @@ export async function mutateModules (
|
||||
extraBinPaths: opts.extraBinPaths,
|
||||
extraEnv: opts.extraEnv,
|
||||
rawConfig: opts.rawConfig,
|
||||
resolveSymlinksInInjectedDirs: opts.resolveSymlinksInInjectedDirs,
|
||||
scriptsPrependNodePath: opts.scriptsPrependNodePath,
|
||||
scriptShell: opts.scriptShell,
|
||||
shellEmulator: opts.shellEmulator,
|
||||
|
||||
@@ -144,6 +144,7 @@ export interface HeadlessOptions {
|
||||
wantedLockfile?: Lockfile
|
||||
ownLifecycleHooksStdio?: 'inherit' | 'pipe'
|
||||
pendingBuilds: string[]
|
||||
resolveSymlinksInInjectedDirs?: boolean
|
||||
skipped: Set<string>
|
||||
enableModulesDir?: boolean
|
||||
nodeLinker?: 'isolated' | 'hoisted' | 'pnp'
|
||||
@@ -194,6 +195,7 @@ export async function headlessInstall (opts: HeadlessOptions) {
|
||||
extraBinPaths: opts.extraBinPaths,
|
||||
extraEnv: opts.extraEnv,
|
||||
rawConfig: opts.rawConfig,
|
||||
resolveSymlinksInInjectedDirs: opts.resolveSymlinksInInjectedDirs,
|
||||
scriptsPrependNodePath: opts.scriptsPrependNodePath,
|
||||
scriptShell: opts.scriptShell,
|
||||
shellEmulator: opts.shellEmulator,
|
||||
|
||||
@@ -11,6 +11,7 @@ export type RunLifecycleHooksConcurrentlyOptions = Omit<RunLifecycleHookOptions,
|
||||
| 'pkgRoot'
|
||||
| 'rootModulesDir'
|
||||
> & {
|
||||
resolveSymlinksInInjectedDirs?: boolean
|
||||
storeController: StoreController
|
||||
}
|
||||
|
||||
@@ -53,7 +54,7 @@ export async function runLifecycleHooksConcurrently (
|
||||
await runLifecycleHook(stage, manifest, runLifecycleHookOpts)
|
||||
}
|
||||
if (targetDirs == null || targetDirs.length === 0) return
|
||||
const filesResponse = await fetchFromDir(rootDir, {})
|
||||
const filesResponse = await fetchFromDir(rootDir, { resolveSymlinks: opts.resolveSymlinksInInjectedDirs })
|
||||
await Promise.all(
|
||||
targetDirs.map(async (targetDir) => {
|
||||
const targetModulesDir = path.join(targetDir, 'node_modules')
|
||||
|
||||
Reference in New Issue
Block a user