Patch-package should aggregate all errors for failing patches.

Open
#565 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
nodejs, typescript

Research direction

Start with src/patch/read.ts at the linked line and compare its failure handling with the changes introduced on the ^8.1.0-canary.1 branch. Trace the other patch-failure paths to identify which ones still exit immediately. Done means failing patches are aggregated and can be targeted by package, with a consistent package-specific error indication.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
11.2k
Forks
325
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ds300/patch-package

All issues in ds300/patch-package

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.