Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: account for backports when calculating versions #517

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

mdjermanovic
Copy link
Member

Prerequisites checklist

What is the purpose of this pull request?

Updates logic that calculates ESLint versions for the eslint.org homepage to account for backport versions.

What changes did you make? (Give an overview)

Updated tools/fetch-stats.js to sort fetched releases by semver.rcompare before proceeding with the calculations. This specifically account for the case that the most recently published version is a backport.

Related Issues

eslint/eslint#17966

Is there anything you'd like reviewers to focus on?

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for new-eslint ready!

Name Link
🔨 Latest commit 589c7f8
🔍 Latest deploy log https://app.netlify.com/sites/new-eslint/deploys/65bd09629aa1880008fd30bb
😎 Deploy Preview https://deploy-preview-517--new-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for zh-hans-eslint ready!

Name Link
🔨 Latest commit 589c7f8
🔍 Latest deploy log https://app.netlify.com/sites/zh-hans-eslint/deploys/65bd096214ffbe00088eacea
😎 Deploy Preview https://deploy-preview-517--zh-hans-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for ja-eslint ready!

Name Link
🔨 Latest commit 589c7f8
🔍 Latest deploy log https://app.netlify.com/sites/ja-eslint/deploys/65bd09629fed8f0008ea79bb
😎 Deploy Preview https://deploy-preview-517--ja-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for es-eslint ready!

Name Link
🔨 Latest commit 589c7f8
🔍 Latest deploy log https://app.netlify.com/sites/es-eslint/deploys/65bd0962c4c8ca000808a50e
😎 Deploy Preview https://deploy-preview-517--es-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for pt-br-eslint ready!

Name Link
🔨 Latest commit 589c7f8
🔍 Latest deploy log https://app.netlify.com/sites/pt-br-eslint/deploys/65bd09621581ac0008964801
😎 Deploy Preview https://deploy-preview-517--pt-br-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for hi-eslint ready!

Name Link
🔨 Latest commit 589c7f8
🔍 Latest deploy log https://app.netlify.com/sites/hi-eslint/deploys/65bd096201defb000802576e
😎 Deploy Preview https://deploy-preview-517--hi-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for fr-eslint ready!

Name Link
🔨 Latest commit 589c7f8
🔍 Latest deploy log https://app.netlify.com/sites/fr-eslint/deploys/65bd096262c4ad0008f962b7
😎 Deploy Preview https://deploy-preview-517--fr-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for de-eslint ready!

Name Link
🔨 Latest commit 589c7f8
🔍 Latest deploy log https://app.netlify.com/sites/de-eslint/deploys/65bd09622bbe840008e9667d
😎 Deploy Preview https://deploy-preview-517--de-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -57,8 +57,12 @@ async function fetchStatsFromGitHubAPI() {
}
});

const [currentRelease] = repository.releases.nodes;
const latestRelease = repository.releases.nodes.find(({ isPrerelease }) => !isPrerelease);
const releases = repository.releases.nodes.toSorted(
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a comment explaining why we're doing this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've now added a comment explaining this.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@nzakas nzakas merged commit 915e59d into main Feb 2, 2024
37 checks passed
@nzakas nzakas deleted the fetch-stats-support-backports branch February 2, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

None yet

3 participants