import { type Catalogs } from '@pnpm/catalogs.types'; import { type ProjectOptions } from '@pnpm/get-context'; import { type HoistingLimits } from '@pnpm/headless'; import { type LockfileObject } from '@pnpm/lockfile.fs'; import { type IncludedDependencies } from '@pnpm/modules-yaml'; import { type WorkspacePackages } from '@pnpm/resolver-base'; import { type StoreController } from '@pnpm/store-controller-types'; import { type SupportedArchitectures, type AllowedDeprecatedVersions, type PackageExtension, type PeerDependencyRules, type ReadPackageHook, type Registries, type PrepareExecutionEnv, type TrustPolicy } from '@pnpm/types'; import { type VersionOverride } from '@pnpm/parse-overrides'; import { type ReporterFunction } from '../types.js'; import { type PreResolutionHookContext } from '@pnpm/hooks.types'; export interface StrictInstallOptions { autoInstallPeers: boolean; autoInstallPeersFromHighestMatch: boolean; catalogs: Catalogs; catalogMode: 'strict' | 'prefer' | 'manual'; cleanupUnusedCatalogs: boolean; frozenLockfile: boolean; frozenLockfileIfExists: boolean; enableGlobalVirtualStore: boolean; enablePnp: boolean; extraBinPaths: string[]; extraEnv: Record; hoistingLimits?: HoistingLimits; externalDependencies?: Set; useLockfile: boolean; saveLockfile: boolean; useGitBranchLockfile: boolean; mergeGitBranchLockfiles: boolean; linkWorkspacePackagesDepth: number; lockfileOnly: boolean; forceFullResolution: boolean; fixLockfile: boolean; dedupe: boolean; ignoreCompatibilityDb: boolean; ignoreDepScripts: boolean; ignorePackageManifest: boolean; /** * When true, skip fetching local dependencies (file: protocol pointing to directories). * This is used by `pnpm fetch` which only downloads packages from the registry * and doesn't need local packages that won't be available (e.g., in Docker builds). */ ignoreLocalPackages: boolean; preferFrozenLockfile: boolean; saveWorkspaceProtocol: boolean | 'rolling'; lockfileCheck?: (prev: LockfileObject, next: LockfileObject) => void; lockfileIncludeTarballUrl: boolean; preferWorkspacePackages: boolean; preserveWorkspaceProtocol: boolean; saveCatalogName?: string; scriptsPrependNodePath: boolean | 'warn-only'; scriptShell?: string; shellEmulator: boolean; storeController: StoreController; storeDir: string; reporter: ReporterFunction; force: boolean; forcePublicHoistPattern: boolean; depth: number; lockfileDir: string; modulesDir: string; rawConfig: Record; verifyStoreIntegrity: boolean; engineStrict: boolean; ignoredBuiltDependencies?: string[]; neverBuiltDependencies?: string[]; onlyBuiltDependencies?: string[]; onlyBuiltDependenciesFile?: string; nodeExecPath?: string; nodeLinker: 'isolated' | 'hoisted' | 'pnp'; nodeVersion?: string; packageExtensions: Record; ignoredOptionalDependencies: string[]; pnpmfile: string[] | string; ignorePnpmfile: boolean; packageManager: { name: string; version: string; }; pruneLockfileImporters: boolean; hooks: { readPackage?: ReadPackageHook[]; preResolution?: Array<(ctx: PreResolutionHookContext) => Promise>; afterAllResolved?: Array<(lockfile: LockfileObject) => LockfileObject | Promise>; calculatePnpmfileChecksum?: () => Promise; }; sideEffectsCacheRead: boolean; sideEffectsCacheWrite: boolean; strictPeerDependencies: boolean; include: IncludedDependencies; includeDirect: IncludedDependencies; ignoreCurrentSpecifiers: boolean; ignoreScripts: boolean; childConcurrency: number; userAgent: string; unsafePerm: boolean; registries: Registries; tag: string; overrides: Record; ownLifecycleHooksStdio: 'inherit' | 'pipe'; workspacePackages?: WorkspacePackages; pruneStore: boolean; virtualStoreDir?: string; dir: string; symlink: boolean; enableModulesDir: boolean; modulesCacheMaxAge: number; peerDependencyRules: PeerDependencyRules; allowedDeprecatedVersions: AllowedDeprecatedVersions; ignorePatchFailures?: boolean; allowUnusedPatches: boolean; preferSymlinkedExecutables: boolean; resolutionMode: 'highest' | 'time-based' | 'lowest-direct'; resolvePeersFromWorkspaceRoot: boolean; ignoreWorkspaceCycles: boolean; disallowWorkspaceCycles: boolean; publicHoistPattern: string[] | undefined; hoistPattern: string[] | undefined; forceHoistPattern: boolean; shamefullyHoist: boolean; forceShamefullyHoist: boolean; global: boolean; globalBin?: string; patchedDependencies?: Record; allProjects: ProjectOptions[]; resolveSymlinksInInjectedDirs: boolean; dedupeDirectDeps: boolean; dedupeInjectedDeps: boolean; dedupePeerDependents: boolean; dedupePeers: boolean; extendNodePath: boolean; excludeLinksFromLockfile: boolean; confirmModulesPurge: boolean; /** * Don't relink local directory dependencies if they are not hard linked from the local directory. * * This option was added to fix an issue with Bit CLI. * Bit compile adds dist directories to the injected dependencies, so if pnpm were to relink them, * the dist directories would be deleted. * * The option might be used in the future to improve performance. */ disableRelinkLocalDirDeps: boolean; supportedArchitectures?: SupportedArchitectures; hoistWorkspacePackages?: boolean; virtualStoreDirMaxLength: number; peersSuffixMaxLength: number; prepareExecutionEnv?: PrepareExecutionEnv; returnListOfDepsRequiringBuild?: boolean; injectWorkspacePackages?: boolean; ci?: boolean; minimumReleaseAge?: number; minimumReleaseAgeExclude?: string[]; trustPolicy?: TrustPolicy; trustPolicyExclude?: string[]; trustPolicyIgnoreAfter?: number; blockExoticSubdeps?: boolean; } export type InstallOptions = Partial & Pick; export interface ProcessedInstallOptions extends StrictInstallOptions { readPackageHook?: ReadPackageHook; parsedOverrides: VersionOverride[]; } export declare function extendOptions(opts: InstallOptions): ProcessedInstallOptions;