node.js - Node module update install -
i using mozila makeapi popcorn maker. saves data elasticsearch. added , saved new column in elastic search. retrieval, not able column value. update node module makeapi_client.
my question is, approach good? because might case if user updates npm. in case happen code wrote in it.
"patching" library in way not recommended. next time update makeapi changes overridden. have few options:
- submit pull request - clone original repository, make changes, , create pull request. pull request request make original library authors merge changes canonical library. in essence, you'll fixing library everyone!
make patch in different file - nothing stopping doing this:
var client = require('makeapi').makeapi_client; client.prototype.somenewmethod = function() {};
or similar. in essence, creating patch in different file can check version control, won't overridden changes.
please note updates library may still break changes.
Comments
Post a Comment