patch-package icon indicating copy to clipboard operation
patch-package copied to clipboard

Patch-package should aggregate all errors for failing patches.

Open Swor71 opened this issue 9 months ago • 0 comments

While testing ^8.1.0-canary.1 branch, which introduces changes to how the The patches for <package_name> have changed. errors are aggregated for failing patches, I've noticed there are other ways the patch can fail. For example, the ... could not be parsed. error from read.ts which exits the process altogether.

https://github.com/ds300/patch-package/blob/bd2e9a49d884516199079add143c1649541e8efe/src/patch/read.ts#L63

It would be beneficial to have this error path as well as other ones also receive the treatment from ^8.1.0-canary.1 branch so that the packages for failing patches could be targeted individually instead of having to reinstall node_modules, thus saving time and improving DX. Another idea would be to introduce a part of the error message would be the same for all such errors, e.g. there was a problem with <package_name>, which would help out with getting the correct name for failing patch/package for all the errors.

Swor71 avatar Apr 07 '25 12:04 Swor71