New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

version-update

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

version-update

for npm module update

latest
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

version-update

for npm module update

Build Status Coverage Status

usage

  • parameter: options = {}
  options = {
    moduleName, // module name to update
    version,// optional, module version you want to update
    path,//module path, if is not module path, ergodic sub dir to update module path 
   }
  • return:
    • Object: if input path is module path, return object
  {
     status, // 0 is success, -1 is failed
     path,
     moduleName, 
     oldVersion, // only success have this property
     newVersion // only success have this property
  }
- Array: if input path not module path. will update sub file recursively, return array
  [
    obj, // object is the same as the above
  ]
  • example
const updateMain = require('version-update');
updateMain({
   moduleName: 'lodash',
   version: '4.0.0',
   path: path
}).then((data) => {
      // data
};

test

npm test

test coverage

npm run cov

FAQs

Package last updated on 31 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts