Search code examples
javascripttypescriptnpmyarnpkg

How to quickfix and build a bug in an NPM package, so it's available to the build server?


Maybe this question is a bit off the rules. I'm using an npm package, with built-in type definitions for TypeScript. Unfortunately, there is a bug in the definitions, which I can easily fix.

I want to make this new version of the package available to my build server. At first, I thought I could just fork the repository on Github and add this repository as the source in my package.json, but then I realized that this package needs to be built.

So my question is, where should I go from here? Of course, I've sent a pull request, but what can I do until this is merged and released? Should I clone the package and publish it by myself?


Solution

  • I just forked the repo and build it with my fix included. Then i used my github-fork in the package json. (you can use github links with branch or tag annotations)

    As soon as the merge was made i switched back to the original package.