From 376f0199a99ab7963b5c9892b3e28f825af5658b Mon Sep 17 00:00:00 2001 From: Elliott Kember Date: Fri, 1 Nov 2024 12:02:59 +1300 Subject: [PATCH 1/3] Update applyPatches.ts --- src/applyPatches.ts | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/applyPatches.ts b/src/applyPatches.ts index 1a50d094..4843098a 100644 --- a/src/applyPatches.ts +++ b/src/applyPatches.ts @@ -270,15 +270,19 @@ export function applyPatchesForPackage({ // yay patch was applied successfully // print warning if version mismatch if (installedPackageVersion !== version) { - warnings.push( - createVersionMismatchWarning({ - packageName: name, - actualVersion: installedPackageVersion, - originalVersion: version, - pathSpecifier, - path, - }), - ) + if (version.includes('+') && version.split('+')[0] === installedPackageVersion) { + console.log("Ignoring multi-patch version mismatch for", pathSpecifier); + } else { + warnings.push( + createVersionMismatchWarning({ + packageName: name, + actualVersion: installedPackageVersion, + originalVersion: version, + pathSpecifier, + path, + }), + ) + } } logPatchApplication(patchDetails) } else if (patches.length > 1) { From 8416c7df78eb5439b9de53ae2e7e81cb0eb424dc Mon Sep 17 00:00:00 2001 From: Elliott Kember Date: Fri, 1 Nov 2024 12:02:59 +1300 Subject: [PATCH 2/3] Update applyPatches.ts --- src/applyPatches.ts | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/applyPatches.ts b/src/applyPatches.ts index 1a50d094..4843098a 100644 --- a/src/applyPatches.ts +++ b/src/applyPatches.ts @@ -270,15 +270,19 @@ export function applyPatchesForPackage({ // yay patch was applied successfully // print warning if version mismatch if (installedPackageVersion !== version) { - warnings.push( - createVersionMismatchWarning({ - packageName: name, - actualVersion: installedPackageVersion, - originalVersion: version, - pathSpecifier, - path, - }), - ) + if (version.includes('+') && version.split('+')[0] === installedPackageVersion) { + console.log("Ignoring multi-patch version mismatch for", pathSpecifier); + } else { + warnings.push( + createVersionMismatchWarning({ + packageName: name, + actualVersion: installedPackageVersion, + originalVersion: version, + pathSpecifier, + path, + }), + ) + } } logPatchApplication(patchDetails) } else if (patches.length > 1) { From a4aa01b2c8e988e43fdd8dc77aa81424478c5bf0 Mon Sep 17 00:00:00 2001 From: Elliott Kember Date: Fri, 1 Nov 2024 12:08:00 +1300 Subject: [PATCH 3/3] Update comment, formatting --- src/applyPatches.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/applyPatches.ts b/src/applyPatches.ts index 4843098a..d406f0de 100644 --- a/src/applyPatches.ts +++ b/src/applyPatches.ts @@ -270,8 +270,11 @@ export function applyPatchesForPackage({ // yay patch was applied successfully // print warning if version mismatch if (installedPackageVersion !== version) { - if (version.includes('+') && version.split('+')[0] === installedPackageVersion) { - console.log("Ignoring multi-patch version mismatch for", pathSpecifier); + if ( + version.includes("+") && + version.split("+")[0] === installedPackageVersion + ) { + console.log("Multiple patch version matches for", pathSpecifier) } else { warnings.push( createVersionMismatchWarning({