Skip to content

fix: replace hardcoded Node.js built-ins with builtinModules#6865

Merged
chenjiahan merged 1 commit intomainfrom
builtin_modules_1230
Dec 30, 2025
Merged

fix: replace hardcoded Node.js built-ins with builtinModules#6865
chenjiahan merged 1 commit intomainfrom
builtin_modules_1230

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Replaced the hardcoded nodeBuiltins set with the builtinModules array from the Node.js module package, improving maintainability and accuracy.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings December 30, 2025 07:31
@netlify
Copy link
Copy Markdown

netlify bot commented Dec 30, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 3ed66af
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/69537fded86db00008d90b03
😎 Deploy Preview https://deploy-preview-6865--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 66 (🔴 down 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

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

Copy link
Copy Markdown
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 replaces a hardcoded list of Node.js built-in module names with the official builtinModules array from Node.js's module package. This improves maintainability by relying on Node.js's own list rather than manually maintaining a potentially outdated hardcoded list.

Key changes:

  • Imports builtinModules from node:module package
  • Removes the hardcoded nodeBuiltins Set containing 45 module names
  • Simplifies the module check logic by using builtinModules.includes()

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

@chenjiahan chenjiahan merged commit f471402 into main Dec 30, 2025
18 checks passed
@chenjiahan chenjiahan deleted the builtin_modules_1230 branch December 30, 2025 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants