Skip to content

Commit 8c08fd5

Browse files
committed
docs: include called method name in deprecation message
some users were reporting it was difficult to find what method was called, especially in the case where there is no replacement there are few clues as to the location of deprecation
1 parent 70c57f4 commit 8c08fd5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/app/lib/common/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,12 @@ export function createMessage(
251251
const replacementMethodName = instance[methodName];
252252

253253
if (replacementMethodName !== NO_REPLACEMENT) {
254-
return modularDeprecationMessage + ` Please use \`${replacementMethodName}\` instead.`;
254+
return (
255+
modularDeprecationMessage +
256+
`. Method called was \`${methodName}\`. Please use \`${replacementMethodName}\` instead.`
257+
);
255258
} else {
256-
return modularDeprecationMessage;
259+
return modularDeprecationMessage + `. Method called was \`${methodName}\``;
257260
}
258261
}
259262
}

packages/firestore/__tests__/firestore.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ describe('Firestore', function () {
949949
collectionRefV9Deprecation(
950950
() => getCountFromServer(query),
951951
() => query.countFromServer(),
952-
'count',
952+
'countFromServer',
953953
);
954954
});
955955

0 commit comments

Comments
 (0)