mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-30 04:52:04 -04:00
6
.changeset/heavy-dolls-itch.md
Normal file
6
.changeset/heavy-dolls-itch.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-deploy": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
The deploy command should not ask for confirmation to purge the `node_modules` directory [#6510](https://github.com/pnpm/pnpm/issues/6510).
|
||||
6
.changeset/neat-zoos-glow.md
Normal file
6
.changeset/neat-zoos-glow.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/get-context": minor
|
||||
"@pnpm/core": minor
|
||||
---
|
||||
|
||||
New option added: confirmModulesPurge.
|
||||
@@ -123,6 +123,7 @@ export interface StrictInstallOptions {
|
||||
dedupePeerDependents: boolean
|
||||
extendNodePath: boolean
|
||||
excludeLinksFromLockfile: boolean
|
||||
confirmModulesPurge: boolean
|
||||
}
|
||||
|
||||
export type InstallOptions =
|
||||
@@ -139,6 +140,7 @@ const defaults = async (opts: InstallOptions) => {
|
||||
allowNonAppliedPatches: false,
|
||||
autoInstallPeers: true,
|
||||
childConcurrency: 5,
|
||||
confirmModulesPurge: !opts.force,
|
||||
depth: 0,
|
||||
enablePnp: false,
|
||||
engineStrict: false,
|
||||
|
||||
@@ -67,7 +67,7 @@ test('do not fail on non-compatible node_modules when forced with a named instal
|
||||
|
||||
await install({}, {
|
||||
...opts,
|
||||
force: true, // Don't ask for prompt
|
||||
confirmModulesPurge: false,
|
||||
})
|
||||
})
|
||||
|
||||
@@ -96,7 +96,7 @@ test('do not fail on non-compatible store when forced during named installation'
|
||||
|
||||
await install({}, {
|
||||
...opts,
|
||||
force: true, // Don't ask for prompt
|
||||
confirmModulesPurge: false,
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ test('fail if installing different types of dependencies in a project that uses
|
||||
await project.hasNot('once')
|
||||
|
||||
const newOpts = await testDefaults({
|
||||
force: true, // Don't ask for prompt
|
||||
confirmModulesPurge: false,
|
||||
include: {
|
||||
dependencies: true,
|
||||
devDependencies: true,
|
||||
|
||||
@@ -1063,7 +1063,7 @@ test('lockfile is not getting broken if the used registry changes', async () =>
|
||||
rootDir: process.cwd(),
|
||||
}, {
|
||||
...newOpts,
|
||||
force: true, // Don't ask for prompt
|
||||
confirmModulesPurge: false,
|
||||
})
|
||||
await addDependenciesToPackage(manifest, ['is-negative@1'], newOpts)
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ interface HookOptions {
|
||||
|
||||
export interface GetContextOptions {
|
||||
allProjects: Array<ProjectOptions & HookOptions>
|
||||
confirmModulesPurge?: boolean
|
||||
force: boolean
|
||||
forceNewModules?: boolean
|
||||
forceSharedLockfile: boolean
|
||||
@@ -116,7 +117,7 @@ export async function getContext (
|
||||
registries: opts.registries,
|
||||
storeDir: opts.storeDir,
|
||||
virtualStoreDir,
|
||||
confirmModulesPurge: !opts.force && !isCI,
|
||||
confirmModulesPurge: opts.confirmModulesPurge && !isCI,
|
||||
|
||||
forceHoistPattern: opts.forceHoistPattern,
|
||||
hoistPattern: opts.hoistPattern,
|
||||
@@ -408,6 +409,7 @@ export async function getContextForSingleImporter (
|
||||
force: boolean
|
||||
forceNewModules?: boolean
|
||||
forceSharedLockfile: boolean
|
||||
confirmModulesPurge?: boolean
|
||||
extraBinPaths: string[]
|
||||
extendNodePath?: boolean
|
||||
lockfileDir: string
|
||||
@@ -472,7 +474,7 @@ export async function getContextForSingleImporter (
|
||||
registries: opts.registries,
|
||||
storeDir: opts.storeDir,
|
||||
virtualStoreDir,
|
||||
confirmModulesPurge: !opts.force && !isCI,
|
||||
confirmModulesPurge: opts.confirmModulesPurge && !isCI,
|
||||
|
||||
forceHoistPattern: opts.forceHoistPattern,
|
||||
hoistPattern: opts.hoistPattern,
|
||||
|
||||
@@ -305,6 +305,7 @@ export type InstallCommandOptions = Pick<Config,
|
||||
saveLockfile?: boolean
|
||||
workspace?: boolean
|
||||
includeOnlyPackageFiles?: boolean
|
||||
confirmModulesPurge?: boolean
|
||||
} & Partial<Pick<Config, 'modulesCacheMaxAge' | 'pnpmHomeDir' | 'preferWorkspacePackages'>>
|
||||
|
||||
export async function handler (
|
||||
|
||||
@@ -78,6 +78,7 @@ export async function handler (
|
||||
await copyProject(deployedDir, deployDir, { includeOnlyPackageFiles })
|
||||
await install.handler({
|
||||
...opts,
|
||||
confirmModulesPurge: false,
|
||||
depth: Infinity,
|
||||
hooks: {
|
||||
...opts.hooks,
|
||||
|
||||
Reference in New Issue
Block a user