Skip to content

fix: should rename global in node#12102

Merged
ahabhgk merged 1 commit intomainfrom
fix/rename-global
Nov 6, 2025
Merged

fix: should rename global in node#12102
ahabhgk merged 1 commit intomainfrom
fix/rename-global

Conversation

@LingyuCoder
Copy link
Copy Markdown
Contributor

Summary

Should rename global variable to __webpack_require__.g in node. Align with webapck.

Related links

Checklist

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

Copilot AI review requested due to automatic review settings November 6, 2025 05:52
@netlify
Copy link
Copy Markdown

netlify bot commented Nov 6, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit e92a5fe
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/690c37a28eb290000946c34f

@github-actions github-actions bot added release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack. labels Nov 6, 2025
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 fixes a test case for handling the global identifier in web target with node options enabled. The test was previously marked as "FIXME" and is now working correctly.

  • Adds rename method to NodeStuffPlugin to properly handle the global identifier when it's being renamed
  • Removes the test filter that was blocking the test from running
  • Cleans up import statements in the plugin file

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/rspack-test/configCases/web/node-source-global/test.filter.js Removes the test filter that was blocking the test, allowing it to run now that the functionality is fixed
crates/rspack_plugin_javascript/src/parser_plugin/node_stuff_plugin.rs Adds rename method to handle global identifier renaming and cleans up imports

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 6, 2025

📦 Binary Size-limit

Comparing e92a5fe to fix(rstest): should only handles JavaScript module (#12068) by Wei

❌ Size increased by 768bytes from 47.87MB to 47.87MB (⬆️0.00%)

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Nov 6, 2025

CodSpeed Performance Report

Merging #12102 will not alter performance

Comparing fix/rename-global (e92a5fe) with main (c714bc8)

Summary

✅ 17 untouched

@LingyuCoder LingyuCoder requested a review from ahabhgk November 6, 2025 06:42
@ahabhgk ahabhgk merged commit 2c7823a into main Nov 6, 2025
76 of 79 checks passed
@ahabhgk ahabhgk deleted the fix/rename-global branch November 6, 2025 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants