Updated redirects todo to be a deprecation notice

- When we have todos related to deprecations, we should use @deprecated instead
- @deprecated notices should say when a feature was deprecated, not when it was removed
This commit is contained in:
Hannah Wolfe 2022-09-09 15:49:29 +01:00
parent 352b4ad537
commit 6741f139d5
No known key found for this signature in database
GPG Key ID: AB586C3B5AE5C037

View File

@ -12,9 +12,7 @@ module.exports = {
value() {
return redirects.api.getRedirectsFilePath()
.then((filePath) => {
// TODO: Default file type is .json for backward compatibility.
// When .yaml becomes default or .json is removed at v4,
// This part should be changed.
// @deprecated: .json was deprecated in v4.0 but is still the default for backwards compat
return filePath === null || path.extname(filePath) === '.json'
? 'redirects.json'
: 'redirects.yaml';