Current behavior
New options, introduced during the lifetime of npm 11.x, cause false positive errors when used on earlier versions of npm 11.x - for instance min-release-age-exclude introduced in npm@11.17.0 but not yet bundled into a Node.js 24 Active LTS release.
Applying this setting to .npmrc and then running under Node.js 24.18.0 with bundled npm 11.16.0 results in:
npm warn Unknown project config "min-release-age-exclude". This will stop working in the next major version of npm. See npm help npmrc for supported config options.
Clearly the following statement is untrue and misleading:
"This will stop working in the next major version of npm. See npm help npmrc for supported config options."
This is a barrier to adding options that could be used across different versions of npm. When npm packages specify an engines field for node in their package.json, they are also implicitly specifying a range of packaged npm versions that are supported. That shouldn't cause incorrect warnings to be output.
Secondly, the documentation https://docs.npmjs.com/cli/v11/using-npm/config#min-release-age-exclude does not mention that this option requires a minimum of npm 11.17.0. It shouldn't really require researching npm releases to find this out. The CHANGELOG.md also appears to have gaps in it and jumps from 11.12.1 to 12.00-pre.0.0.0.
Desired behavior
- Stop stating that new options "... will stop working in the next major version of npm", when that is not the plan.
- Add information to config documentation that makes it clear what the minimum version is for a particular option if it was introduced during the lifetime of the npm major version.
Related
Current behavior
New options, introduced during the lifetime of npm 11.x, cause false positive errors when used on earlier versions of npm 11.x - for instance min-release-age-exclude introduced in npm@11.17.0 but not yet bundled into a Node.js 24 Active LTS release.
Applying this setting to
.npmrcand then running under Node.js 24.18.0 with bundled npm 11.16.0 results in:Clearly the following statement is untrue and misleading:
"This will stop working in the next major version of npm. See
npm help npmrcfor supported config options."This is a barrier to adding options that could be used across different versions of npm. When npm packages specify an engines field for
nodein theirpackage.json, they are also implicitly specifying a range of packaged npm versions that are supported. That shouldn't cause incorrect warnings to be output.Secondly, the documentation https://docs.npmjs.com/cli/v11/using-npm/config#min-release-age-exclude does not mention that this option requires a minimum of npm 11.17.0. It shouldn't really require researching npm releases to find this out. The CHANGELOG.md also appears to have gaps in it and jumps from 11.12.1 to 12.00-pre.0.0.0.
Desired behavior
Related
.npmrc#9699