0.0.7 • Published 9 months ago

node-package-version v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

node-package-version

This is small tool will check the engines.node version and uses nvm or n to install the latest version matching the string. If it's a pretty open range like >=18.0.0 for example. It will determine and install node LTS.

Usage

$ npm install -g node-package-version
$ npv COMMAND
running command...
$ npv (--version)
node-package-version/0.0.7 darwin-x64 node-v16.20.2
$ npv --help [COMMAND]
USAGE
  $ npv COMMAND
...

Commands

npv fix

Fix node version by using nvm or n based on package.json

USAGE
  $ npv fix

DESCRIPTION
  Fix node version by using nvm or n based on package.json

See code: dist/commands/fix/index.ts

npv help [COMMANDS]

Display help for npv.

USAGE
  $ npv help [COMMANDS] [-n]

ARGUMENTS
  COMMANDS  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for npv.

See code: @oclif/plugin-help

Use as pre command with zsh

Just add this code at the end of your .zshrc file.

precmd(){
    npv fix
}

If you go into a new terminal in vscode or cd into a project, it will check the node version and will switch it.

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.1

9 months ago