You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A package.json file can have an engines section where Node.js and npm required versions can be defined, it would be great if check-dependencies supported this.
The above is what I plan on changing a few projects I work on and if grunt-check-dependencies were to then throw a warning that a user has an older npm 3.x or 4.x, 5.0.x or 5.1.x installed that would be fantastic.
The text was updated successfully, but these errors were encountered:
I think I'd be fine with such a feature. A few notes, though, before anyone tries to have a shot at this:
This should be hidden behind an option as not all people will need it.
I'm worried about performance. You can check the current Node version quickly by reading process.versions.node but with npm you'll have to spawn npm --version or use its kinda inofficial Node API. That will require require('npm'), though, not sure how quick it is. The whole purpose of this package was to make checking for the packages quick. On an average project with 30 dependencies, all correctly installed check-dependencies currently takes about 0.3s; npm --version itself takes about that much so this could increase the time required for check-dependencies to finish which is worrying.
A
package.json
file can have anengines
section where Node.js and npm required versions can be defined, it would be great if check-dependencies supported this.Ref: https://docs.npmjs.com/files/package.json#engines
Example:
The above is what I plan on changing a few projects I work on and if
grunt-check-dependencies
were to then throw a warning that a user has an older npm 3.x or 4.x, 5.0.x or 5.1.x installed that would be fantastic.The text was updated successfully, but these errors were encountered: