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:

  1. 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!
  2. 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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -