Skip to content

Conversation

@avivkeller
Copy link
Member

This PR:

  • Fixes the nasty fetch failed issue on deployments by rewriting the fetch statements to .then().catch() format
  • Adds a missing type file
  • Moves a constant to the constants file
  • Simplifies an object creation

Copilot AI review requested due to automatic review settings December 4, 2025 23:29
@avivkeller avivkeller requested a review from a team as a code owner December 4, 2025 23:29
@vercel
Copy link

vercel bot commented Dec 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nodejs-org Ready Ready Preview Dec 7, 2025 8:54pm

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/nodejs-website

Please review the changes when you have a chance. Thank you! 🙏

@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

❌ Patch coverage is 91.48936% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.69%. Comparing base (43ffe41) to head (23ef046).
⚠️ Report is 14 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/site/util/fetch.ts 66.66% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8395      +/-   ##
==========================================
- Coverage   76.40%   73.69%   -2.71%     
==========================================
  Files         118      108      -10     
  Lines        9928     9177     -751     
  Branches      334      309      -25     
==========================================
- Hits         7585     6763     -822     
- Misses       2341     2412      +71     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copilot finished reviewing on behalf of avivkeller December 4, 2025 23:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors data generator functions to use promise chain syntax (.then().catch()) instead of async/await, addressing fetch failures during deployments. The changes improve error handling by ensuring that failed fetch operations return safe default values instead of breaking the build.

Key Changes:

  • Refactored vulnerabilities.mjs and supportersData.mjs generators to use .then().catch() pattern with fallback values
  • Added supporters.ts type definitions file and exported it from the types index
  • Moved OPENCOLLECTIVE_MEMBERS_URL constant from inline definition to centralized next.constants.mjs

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
apps/site/types/supporters.ts Adds type definitions for Supporter and OpenCollectiveSupporter
apps/site/types/index.ts Exports the new supporters type module
apps/site/next.constants.mjs Adds OPENCOLLECTIVE_MEMBERS_URL constant for centralized configuration
apps/site/next-data/generators/vulnerabilities.mjs Refactors async function to arrow function with promise chains and error handling
apps/site/next-data/generators/supportersData.mjs Refactors async function to arrow function with promise chains, uses centralized constant

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

📦 Build Size Comparison

Summary

Metric Value
Old Total Size 4.34 MB
New Total Size 4.34 MB
Delta 0 B (0.00%)

Changes

➕ Added Assets (1)
Name Size
.next/static/chunks/d15ab6b6ef452b75.js 203.83 KB
➖ Removed Assets (1)
Name Size
.next/static/chunks/1ae1c63f826a2719.js 203.83 KB

@avivkeller
Copy link
Member Author

@nodejs/nodejs-website PTAL

@avivkeller
Copy link
Member Author

avivkeller commented Dec 7, 2025

Fetch is still timing out occasionally :-/

https://vercel.com/openjs/nodejs-org/EeD4bMYCN1DPW8Zj3BEaNmq3wv1N

throw e;
}

await setTimeout(delay);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can add a backoff

Copy link
Member Author

Choose a reason for hiding this comment

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

WDYM?

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.

4 participants