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

node-vers

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-vers

Grab a full list of node versions and associated metadata

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

Node Vers

Gives a listing of all Node versions

Usage:

You can use node-vers as a module or a CLI utility.

Using as a module:

var nodevers = require('node-vers');

nodevers.list(null, function(err, result) {
  if (err) {
    console.error("Error occurred: " + err);
  } else {
    console.log(result);
  }
});

You can also exclude certain fields from the resulting JSON, if you don't need them:

var options = { "blacklist" : ["files", "openssl", "modules", "uv", "zlib"] };
nodevers.list(options, function(err, result) {
    console.log(result);
});

And you can indicate to only get single (latest) value for each minor version:

var options = { "latest_only" : true 
              , "blacklist" : ["files", "openssl", "modules", "uv", "zlib"] };
nodevers.list(options, function(err, result) {
    console.log(result);
});

Using as a CLI utility

> npm install -g node-vers
> node-vers

Alternatives:

  • NV: https://github.com/evanlucas/node-versions

Differences:

  • NV caches static list of node versions and you need to run an update script if you want to get the latest list. Node-vers does a live lookup every time.

  • NV grabs the list of versions by looking at the list of tags in Node's github repo. This is pretty cool, but it means: git must be installed wherever you want to use this module + you may get something weird if somebody over at Node accidentally creates a stray git tag.

  • NV only returns the list of versions, while Node-Vers returns an object, for each version, containing following kind of metadata:

    {   version: 'v5.6.0',
        date: '2016-02-09',
        files: 'headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi',
        npm: '3.6.0',
        v8: '4.6.85.31',
        uv: '1.8.0',
        zlib: '1.2.8',
        openssl: '1.0.2f',
        modules: '47' }
    
  • NV supports both Node.js and IO.js. Since IO.js was merged back into Node, I had no interest in supporting io.js

FAQs

Package last updated on 15 Feb 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