Backport (3-0-x) - fix: deprecate properties in app.getAppMetrics() (#13453)
* fix: deprecate properties in app.getAppMetrics() * address feedback from review * fix deprecated property location * simplify test
This commit is contained in:
parent
ec993214a2
commit
93edf2edd3
4 changed files with 47 additions and 6 deletions
|
@ -88,8 +88,14 @@ deprecate.getHandler = () => deprecationHandler
|
|||
// }
|
||||
// }
|
||||
|
||||
// Deprecate the old name of a property
|
||||
deprecate.property = (object, deprecatedName, newName) => {
|
||||
deprecate.removeProperty = (object, deprecatedName) => {
|
||||
if (!process.noDeprecation) {
|
||||
deprecate.log(`The '${deprecatedName}' property has been deprecated.`)
|
||||
}
|
||||
}
|
||||
|
||||
// Replace the old name of a property
|
||||
deprecate.renameProperty = (object, deprecatedName, newName) => {
|
||||
let warned = false
|
||||
let warn = () => {
|
||||
if (!(warned || process.noDeprecation)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue