I'd like to introduce a new "deprecations" JS/JSON endpoint that both people and robots can read to understand what's both being planned for deprecation and what has been actually removed in each release. For instance:
// deprecations.js
module.exports = {
planned: {
// we're planning to deprecate these in the next major version
selectors: {
'.btn-purple': 'Purple buttons have been officially deprecated',
'.btn-orange': 'Orange buttons will be removed because of accessibility issues.',
},
// we actually _did_ deprecate these in a recent release 😬
variables: {
'$blue-450': 'Please use the $blue-mktg variable instead',
'$green-450': 'Please use the $green-mktg variable instead'
}
},
// then, when we follow through, we move them into a versioned key:
'11.0.0': {
selectors: {
'.BtnGroup-form': 'Please use the "BtnGroup-parent" class instead.',
'.avatar-stack': 'Please use the "Avatar-Stack" class instead.'
}
}
}
Other types of things we'd want to list will probably include files (when we rename a file) and bundles (for instance, if "marketing-utilities" went away).
I think we would serialize this into JSON (as dist/deprecations.json) when we publish so that it can be read more easily by other tools, such as our forthcoming coverage tool.
I'd like to introduce a new "deprecations" JS/JSON endpoint that both people and robots can read to understand what's both being planned for deprecation and what has been actually removed in each release. For instance:
Other types of things we'd want to list will probably include files (when we rename a file) and bundles (for instance, if "marketing-utilities" went away).
I think we would serialize this into JSON (as
dist/deprecations.json
) when we publish so that it can be read more easily by other tools, such as our forthcoming coverage tool.