Commonly, npm modules are source controlled using a single dedicated repo for each module. When forking and patching such an existing npm module, typical approaches are either:
- reference a specific git commit in your forked repo
"dependencies": {
"patchedmodule": "git+https://github.com/myuser/patchedmodule.git#mypatch"
}
- reference a downloadable tarball containing the same, as described in this post on {debuggable}