mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-12 18:49:41 -04:00
feat!: remove deprecated patch options (#10505)
* refactor: remove allowNonAppliedPatches * refactor: remove ignorePatchFailures * refactor: remove `strict` field in groupPatchedDependencies * test: update test failure in package patching * test: fix * docs: update changesets --------- Co-authored-by: Zoltan Kochan <z@kochan.io>
This commit is contained in:
committed by
Zoltan Kochan
parent
f8b4895e0a
commit
7b1c189f2e
@@ -1,9 +1,7 @@
|
||||
import { PnpmError } from '@pnpm/error'
|
||||
import { applyPatch } from '@pnpm/patch-package/dist/applyPatches.js'
|
||||
import { globalWarn } from '@pnpm/logger'
|
||||
|
||||
export interface ApplyPatchToDirOpts {
|
||||
allowFailure?: boolean
|
||||
patchedDir: string
|
||||
patchFilePath: string
|
||||
}
|
||||
@@ -27,12 +25,7 @@ export function applyPatchToDir (opts: ApplyPatchToDirOpts): boolean {
|
||||
process.chdir(cwd)
|
||||
}
|
||||
if (!success) {
|
||||
const message = `Could not apply patch ${opts.patchFilePath} to ${opts.patchedDir}`
|
||||
if (opts.allowFailure) {
|
||||
globalWarn(message)
|
||||
} else {
|
||||
throw new PnpmError('PATCH_FAILED', message)
|
||||
}
|
||||
throw new PnpmError('PATCH_FAILED', `Could not apply patch ${opts.patchFilePath} to ${opts.patchedDir}`)
|
||||
}
|
||||
return success
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user