Skip to content
This repository was archived by the owner on Nov 3, 2022. It is now read-only.

Conversation

jumoel
Copy link

@jumoel jumoel commented Jul 1, 2022

What

Add the ability to deprecate single values for options, instead of just whole options.

Allows definitions to have a deprecatedValues array, that lists the values that are deprecated.

Why

Allows for instance the --auth-type configuration option to have non-deprecated as well as deprecated values.

References

@jumoel jumoel force-pushed the jumoel/deprecate-singular-config-values branch 2 times, most recently from 65af934 to 77e4d70 Compare July 1, 2022 10:10
@jumoel jumoel force-pushed the jumoel/deprecate-singular-config-values branch from 77e4d70 to b619bc8 Compare July 1, 2022 10:10
// XXX(npm9+) make this throw an error
if (this.deprecated[key]) {
const value = obj[key]
const hasDeprecatedValues = Array.isArray(this.deprecatedValues[key])
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should deprecatedValues perhaps be a function instead, to make it more generic and work on arbitrary types like Number?

@hfaulds
Copy link

hfaulds commented Jul 13, 2022

Superseded by npm/cli#5149

@hfaulds hfaulds closed this Jul 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants