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:
Johan Quan Vo
2026-01-27 23:07:43 +07:00
committed by Zoltan Kochan
parent f8b4895e0a
commit 7b1c189f2e
21 changed files with 52 additions and 756 deletions

View File

@@ -108,7 +108,6 @@ export async function handler (opts: PatchCommandOptions, params: string[]): Pro
if (!opts.ignoreExisting && opts.patchedDependencies) {
tryPatchWithExistingPatchFile({
allowFailure: patchedDep.applyToAll,
patchedDep,
patchedDir: editDir,
patchedDependencies: opts.patchedDependencies,
@@ -129,13 +128,11 @@ To commit your changes, run:
function tryPatchWithExistingPatchFile (
{
allowFailure,
patchedDep: { applyToAll, alias, bareSpecifier },
patchedDir,
patchedDependencies,
lockfileDir,
}: {
allowFailure: boolean
patchedDep: GetPatchedDependencyResult
patchedDir: string
patchedDependencies: Record<string, string>
@@ -157,5 +154,5 @@ function tryPatchWithExistingPatchFile (
if (!fs.existsSync(existingPatchFilePath)) {
throw new PnpmError('PATCH_FILE_NOT_FOUND', `Unable to find patch file ${existingPatchFilePath}`)
}
applyPatchToDir({ patchedDir, patchFilePath: existingPatchFilePath, allowFailure })
applyPatchToDir({ patchedDir, patchFilePath: existingPatchFilePath })
}