Pana / nrm

NPM registry manager, fast switch between different registries: npm, cnpm, nj, taobao
MIT License
2.79k stars 244 forks source link

PR:add engines prompt node version in package.json #122

Open chen00jian opened 2 years ago

chen00jian commented 2 years ago

Feature request

What is the expected behavior? I want to know the supported versions of NRM when installing NRM in different node versions

What is motivation or use case for adding/changing the behavior? It can quickly locate the problem and find the NRM matching the appropriate node

**node:v8.17.0 install nrm

An error is reported during installation. I need to know the NRM supported by my current node**

x1

The node version supported by the current project will be prompted in projects such as vite / webpack

vite:

vite

webpack:

webpack

How should this be implemented in your opinion?

in package.json add engines configuration information! eg:

"engines": { "node": ">=12.2.0" },

chen00jian commented 2 years ago

reference https://github.com/kelektiv/node.bcrypt.js

Version Compatibility

Node Version Bcrypt Version
0.4 <= 0.4
0.6, 0.8, 0.10 >= 0.5
0.11 >= 0.8
4 <= 2.1.0
8 >= 1.0.3 < 4.0.0
10, 11 >= 3
12 onwards >= 3.0.6
i5ting commented 2 years ago

before pr,we need add ci for node version