How to use bin-version-check - 1 common examples

To help you get started, we’ve selected a few bin-version-check examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github babel / babel / packages / babel-cli / src / babel-doctor / rules / npm-3.js View on Github external
return new Promise(function (resolve) {
    binVersionCheck("npm", ">=3.3.0", function (err) {
      if (err) {
        let message = `Your npm version is outdated. Upgrade to the latest version by running:\n$ ${chalk.magenta("npm install -g npm")}.`;
        if (process.platform === "win32") {
          message += ` See this guide if you are having trouble upgrading: ${chalk.underline.blue("https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows")}`;
        }
        resolve([false, message]);
      } else {
        resolve([true, "You're on npm >=3.3.0"]);
      }
    });
  });
}

bin-version-check

Check whether a binary version satisfies a semver range

MIT
Latest version published 1 month ago

Package Health Score

55 / 100
Full package analysis

Popular bin-version-check functions