npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nvm-test

v2.0.3

Published

Test using differents Node versions with nvm

Downloads

16

Readme

nvm-test

Test using differents Node versions with nvm.

Configurable & Extensible npm test using differents Node versions with nvm.

NPM Package Stats
NPM Version Build Status Code Climate Coverage Status
JS Style Dependencies Dev Dependencies

Usage:
  nvm-test [versions] [options]  Test using Node [versions]
  nvm-test <command>  [options]  Execute the <command> plugin

Options:
  -h, --help       Show help                                          [boolean]
  -i, --install    Specify the install command                         [string]
  -t, --test       Specify the test command                            [string]
  -D, --dry-run    Dry run the test                                   [boolean]
  -L, --log-level  Set the log level                                   [string]
  -v, --version    Show version number                                [boolean]

By default it runs 2 (configurable) sub commands as Promises:

  • install command: nvm which $version || nvm install $version
    Which silently install the specified $version if needed.

  • test command: npm test
    Which run the configured test npm scripts.
    The command is always preceded by nvm use $version in order to make the Node $version used before the test.

Install

Prefer global install:
npm install nvm-test -g

Or simply install as per project dev dependencies:
npm install --save-dev nvm-test

CLI usage

nvm-test [versions] [options]

Test using Node [versions]

Testing stable and v4 Node versions:

$ nvm-test stable v4 [options]

Test using the Node version from .nvmrc file (default nvm behavior):

$ nvm-test [options]

nvm-test <command> [options]

Execute the <command> plugin

Therefore the plugin must be available and installed in your project.
For example, install the travis plugin:

$ npm install nvm-test-plugin-travis

Add it to your .nvmrc.test.json project file:

{
  "plugins": ["travis"]
}

Then run the test using the Node versions from your .travis.yml file:

$ nvm-test travis [options]

CLI options

-i, --install

Specify the install command

$ nvm-test -i "nvm install $version" [versions]
$ nvm-test --install "nvm install $version" [versions]

Default: nvm which $version &> /dev/null || nvm install $version
The Node version will be silently installed if needed.

-t, --test

Specify the test command

$ nvm-test -t "npm test" [versions]
$ nvm-test --test "npm test" [versions]

Default: npm test
Just run the npm test script.

-D, --dry-run

Dry run the test
Just echoes the test command option for now

$ nvm-test -D [versions]
$ nvm-test --dry-run [versions]

-L, --log-level

Set the log level

$ nvm-test -L info [versions]
$ nvm-test --log-level info [versions]

Default: info, silly w/ NODE_ENV=development
Can be one of: silent, error, warn, info, verbose, or silly

-h, --help

Show help

$ nvm-test -h
$ nvm-test --help

Show the <command> plugin help

$ nvm-test <command> -h
$ nvm-test <command> --help

-v, --version

Show nvm-test version number

$ nvm-test -v
$ nvm-test --version

JavaScript API usage

See the API documentation on GitHub