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

chore: avoid extra request when checking for MUSL builds #2032

Merged
merged 1 commit into from
Feb 15, 2024
Merged

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Feb 14, 2024

Description

Avoid the extra network call per version as we have all the info needed from the index.json file.

Motivation and Context

See #2031

Testing Details

// tested in repl which has TLA
const { Octokit } = require('@octokit/rest');

const github = new Octokit();

const { data: unofficialBuildsIndexText } = await github.request('https://unofficial-builds.nodejs.org/download/release/index.json');

const buildVersion = unofficialBuildsIndexText.find(indexVersion => indexVersion.version === 'v20.0.0');

console.log(buildVersion?.files.includes('linux-x64-musl'));
console.log(buildVersion?.security);

Example Output(if appropriate)

Types of changes

  • Documentation
  • Version change (Update, remove or add more Node.js versions)
  • Variant change (Update, remove or add more variants, or versions of variants)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (none of the above)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • All new and existing tests passed.

@ttshivers ttshivers linked an issue Feb 14, 2024 that may be closed by this pull request
@SimenB
Copy link
Member Author

SimenB commented Feb 14, 2024

(I'll land this after today's security release, just in case it messes something up)

@SimenB SimenB merged commit a7c34a2 into main Feb 15, 2024
1 check passed
@SimenB SimenB deleted the SimenB-patch-1 branch February 15, 2024 23:47
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.

Minor change in unofficial-builds workflow
2 participants