5

I would like to install a package from npm ng2-table, but with a pull request that is not merged to master.
There is anyway to add this pull request on my package.jsonto install this commit instead master master on my application?

jhpratt
  • 6,841
  • 16
  • 40
  • 50
Felipe Avelar
  • 177
  • 3
  • 14
  • Possible duplicate of [npm install from github pull request](https://stackoverflow.com/questions/33181297/npm-install-from-github-pull-request) – Cortney Thomas Apr 01 '19 at 15:22

1 Answers1

6

You can specify the GitHub URL to the branch or commit that the PR was made from. You should specify the commit hash instead of the branch so that you don't unexpectedly get other (potentially-malicious) changes published to that branch in the future.

For example:

"package": user/repo#commit

Documentation

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964