Remove always-auth config option - #211
Conversation
- option gone since 2021 / npm v7, see npm/cli@72a7eeb - https://docs.npmjs.com/cli/v6/using-npm/config is the last legacy version supporting this - npm 12.x does warn about this with: npm warn Unknown user config "always-auth" ... This will stop working in the next major version of npm. ...
|
What about old npm versions? I mean I have an old NodeJS 5.x project. Is backward compatbile? |
The option never did in the first place what it should, see upstream change:
So if you really still use such an old npm version and it was used in an undocumented manner, you need to stay with an old version of this plugin - it is not backward compatible (if the plugin does use semantic versioning, this would mean a new major version). But if you want to support this, I could revert the change and add a whole new checkbox like the "force npm 9 format" one. Question would be what would be the default? Default to generate that legacy option to be backward compatible or default to omit it, so that users of that old version need to check it and all users of current versions just have nothing to do? PS: Using the version of Node.js to make this decision is not sufficient, because the used Node.js installation could use a different version of npm (different from what upstream did default package), so letting the user, who knows which npm version is used in the pipeline, is imho the better approach. |
|
the option was introduced to authenticate against private repository that worked in a different way than npm registry. Those variables indeed are included in the .npmrc file. |
I do use Node.js 24 with npm 12.0.2 (Artifactory) and I don't use that It is not a blocking issue now, but with the release of npm 13 it will be (and the whole option does not exist anymore since 5 years / npm 7.x - which would be Node.js 14 with npm 6.x if we take the default packaging) - so it should never have been generated in the first place anymore for npm 7+ imho:
|
|
In version 11 was the same warning, it's just a message to say "hey i have said that, i'm justified to run exception". https://jfrog.com/help/r/artifactory-changes-to-the-login-behavior-in-npm-v9/artifactory-changes-to-the-login-behavior-in-npm-v9 |
Yeah, they changed the format of the npmrc file - which demanded a switch here. But why would you generate a config option which is not valid anymore for npm 7+? I just don't think we should wait until it breaks, we could just remove / omit it already for non ancient versions of Node.js (npm) - but your decision ;) PS: Btw, npm 12.0.x has those engines defined: So running e.g. Node.js 24.x with npm 12.x is not unexpected imho. |
option gone since 2021 / npm v7, see npm/cli@72a7eeb
https://docs.npmjs.com/cli/v6/using-npm/config is the last legacy version supporting this
npm 12.x does warn about this with:
npm warn Unknown user config "always-auth" ... This will stop working in the next major version of npm. ...
Testing done
mvn clean installdid run successfully.There is no test, I removed the option and the test for that option.
Submitter checklist