mirror of
https://github.com/pnpm/pnpm.git
synced 2026-01-31 10:12:38 -05:00
fix: correctly detect the active Node js version during headless installation (#7801)
close #5266 --------- Co-authored-by: Zoltan Kochan <z@kochan.io>
This commit is contained in:
6
.changeset/nasty-goats-care.md
Normal file
6
.changeset/nasty-goats-care.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/core": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Correctly detect the active Node.js version during headless installation [#7801](https://github.com/pnpm/pnpm/pull/7801).
|
||||
@@ -90,4 +90,4 @@ export function checkPackage (
|
||||
pnpm: options.pnpmVersion,
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export function filterLockfileByEngine (
|
||||
|
||||
export interface FilterLockfileOptions {
|
||||
currentEngine: {
|
||||
nodeVersion: string
|
||||
nodeVersion?: string
|
||||
pnpmVersion: string
|
||||
}
|
||||
engineStrict: boolean
|
||||
@@ -92,7 +92,7 @@ function pickPkgsWithAllDeps (
|
||||
importerIdSet: Set<string>,
|
||||
opts: {
|
||||
currentEngine: {
|
||||
nodeVersion: string
|
||||
nodeVersion?: string
|
||||
pnpmVersion: string
|
||||
}
|
||||
engineStrict: boolean
|
||||
@@ -119,7 +119,7 @@ function pkgAllDeps (
|
||||
parentIsInstallable: boolean,
|
||||
opts: {
|
||||
currentEngine: {
|
||||
nodeVersion: string
|
||||
nodeVersion?: string
|
||||
pnpmVersion: string
|
||||
}
|
||||
engineStrict: boolean
|
||||
|
||||
@@ -66,7 +66,7 @@ export interface StrictInstallOptions {
|
||||
onlyBuiltDependenciesFile?: string
|
||||
nodeExecPath?: string
|
||||
nodeLinker: 'isolated' | 'hoisted' | 'pnp'
|
||||
nodeVersion: string
|
||||
nodeVersion?: string
|
||||
packageExtensions: Record<string, PackageExtension>
|
||||
ignoredOptionalDependencies: string[]
|
||||
pnpmfile: string
|
||||
@@ -187,7 +187,7 @@ const defaults = (opts: InstallOptions) => {
|
||||
},
|
||||
lockfileDir: opts.lockfileDir ?? opts.dir ?? process.cwd(),
|
||||
lockfileOnly: false,
|
||||
nodeVersion: process.version,
|
||||
nodeVersion: opts.nodeVersion,
|
||||
nodeLinker: 'isolated',
|
||||
overrides: {},
|
||||
ownLifecycleHooksStdio: 'inherit',
|
||||
|
||||
@@ -102,7 +102,7 @@ export interface HeadlessOptions {
|
||||
childConcurrency?: number
|
||||
currentLockfile?: Lockfile
|
||||
currentEngine: {
|
||||
nodeVersion: string
|
||||
nodeVersion?: string
|
||||
pnpmVersion: string
|
||||
}
|
||||
dedupeDirectDeps?: boolean
|
||||
|
||||
@@ -154,7 +154,7 @@ export interface ResolutionContext {
|
||||
preferWorkspacePackages?: boolean
|
||||
readPackageHook?: ReadPackageHook
|
||||
engineStrict: boolean
|
||||
nodeVersion: string
|
||||
nodeVersion?: string
|
||||
pnpmVersion: string
|
||||
registries: Registries
|
||||
resolutionMode?: 'highest' | 'time-based' | 'lowest-direct'
|
||||
|
||||
@@ -84,7 +84,7 @@ export interface ResolveDependenciesOptions {
|
||||
hooks: {
|
||||
readPackage?: ReadPackageHook
|
||||
}
|
||||
nodeVersion: string
|
||||
nodeVersion?: string
|
||||
registries: Registries
|
||||
patchedDependencies?: Record<string, PatchFile>
|
||||
pnpmVersion: string
|
||||
|
||||
Reference in New Issue
Block a user