npm version detection is pretty lousy
boneskull opened this issue · 1 comments
boneskull commented
Due to the deprecation of --global-style
in npm
v9, #242 introduced a version check to avoid triggering the warning. However, the version check just looks at the first character of the output from npm --version
and uses --global-style
if it is 7
or 8
.
Given npm v6 and older is unsupported, I'm not sure we need to worry about it. But it could result in a misleading error message if that's indeed the case. Nevermind that this will break again when npm
releases version 70. 😝
I wanted to avoid pulling in all of semver to check the version. Maybe there's something smaller and more robust we could use.
boneskull commented
closing given the plugin-like refactor of the package manager code