Search code examples
javascriptnpmagenda

Making Changes to Underlying npm Package


I am using an npm package called agendash as part of my Node project that uses agenda.js. I am now in the process of extending agendash so that it meets the needs we have for the project. My question is, when you're extending a pre-existing npm package like this, how should one go about that? If I use as is then I assume my work could be wiped out the next time an update to the underlying package happens.

Should I just lock the package version? Or should I fork it? If the latter is the case, how does one go about doing that? Or is there a better way altogether of handling this?


Solution

  • Locking the version is not enough. If someone else will try to setup the project, npm will download the unmodified version of the package. You should probably fork the project and use github name in package.json.