One of my node projects depends on a package A, and package A depends on package B; There is a BUG in package B, how can I quickly ensure the normal operation of my project after modifying and PR to package B?

  node.js, question

For example:

One of my projects must rely on package a, package a depends on package b; (Neither of these two bags was built by myself);

But the test found a BUG in package B, and now after modification, PR; However, who knows when the author of Package B can merge my PR;

Now, how do I configure package.json to quickly take effect after I modify the B package? Is there any way?

  1. Modify the local B package directly. Do not update the B package until the original author accepts your pr.

  2. Fork B package, changed its name to B-fix, modified the bug and released it to npm. then the project will use this B-fix package later. when the author of the b package accepts your pr, you will exchange the b package back.