Skip to content

Commit 417def8

Browse files
committed
only mark deprecations as old after 14 months
1 parent d5a76e8 commit 417def8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/blame-deprecations.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ function* deprecationMessages(dir) {
3636
try {
3737
const [_, sha, time, lineNumber] = line.match(blameRegExp);
3838
const date = new Date(time);
39-
// check if it's within the last year
40-
if (date.getTime() >= Date.now() - 365 * 24 * 60 * 60 * 1000) {
39+
// check if it's within the last 14 months (a year, plus 2 months for safety, in case a PR was delayed)
40+
if (date.getTime() >= Date.now() - 14 * 31 * 24 * 60 * 60 * 1000) {
4141
continue;
4242
}
4343
const message = `${file}:${lineNumber} was last updated on ${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`;

0 commit comments

Comments
 (0)