Code Monkey home page Code Monkey logo

assert-npm-version's Introduction

assert-npm-version

NPM version build status Downloads js-standard-style

Assert that npm is at least a certain version.

Installation

$ npm install assert-npm-version

Usage

cli

$ assert-npm-version >=2.0.0

package.json

{
  "scripts": {
    "prepublish": "assert-npm-version >=2.0.0"
  }
}

Why?

When working with multiple people and / or node versions, it can quickly become confusing what features npm has, or doesn't have. By asserting that npm is at least a certain version, at least some npm related issues can be caught early.

License

MIT

assert-npm-version's People

Contributors

hughsk avatar yoshuawuyts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hughsk

assert-npm-version's Issues

Cannot supply an upper range limit

For instance we want to ensure that no Dev is using version 7.0.0 and up
We tried this

"scripts": {
"prepublish": "assert-npm-version >=6.0.0 <6.9.9"
}

but the build run time things that '<' this is a command line pipe, so we get this error

sh: 6.9.9: No such file or directory

We tried with surrounding single quote or double quotes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.