Skip to content

Updated oldDataWarning function to display how many months old caniuse-lite is.#849

Merged
ai merged 2 commits intobrowserslist:mainfrom
mezhnin:main
Oct 21, 2024
Merged

Updated oldDataWarning function to display how many months old caniuse-lite is.#849
ai merged 2 commits intobrowserslist:mainfrom
mezhnin:main

Conversation

@mezhnin
Copy link
Contributor

@mezhnin mezhnin commented Oct 21, 2024

No description provided.

node.js Outdated

console.warn(
'Browserslist: caniuse-lite is outdated. Please run:\n' +
'Browserslist: caniuse-lite is '+ monthPassed +' month old. Please run:\n' +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need plural form month/months and tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, let me fix it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

node.js Outdated
@@ -419,8 +429,10 @@ module.exports = {
var halfYearAgo = Date.now() - TIME_TO_UPDATE_CANIUSE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you need halfYearAgo if you already calculated month?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@ai ai merged commit c017b81 into browserslist:main Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants