Skip to content

refactor(binding): consolidate module property definitions - #14365

Merged
SyMind merged 2 commits into
mainfrom
refactor-js-module
Jun 11, 2026
Merged

SyMind merged 2 commits into
mainfrom
refactor-js-module

Conversation

@SyMind

@SyMind SyMind commented Jun 11, 2026 •

Copy link
Copy Markdown
Member

Summary

Consolidate common JS Module property definitions in rspack_binding_api.

  • Extract shared module property registration into define_module_properties.
  • Introduce DerivedModule::as_module so derived module wrappers can reuse the same base Module property implementation.
  • Simplify impl_module_methods! by removing duplicated context, layer, useSourceMap, useSimpleSourceMap, factoryMeta, buildInfo, and buildMeta logic.
  • Rename module instance creation helpers from custom_into_instance to into_module_instance for clearer semantics.
  • Update NormalModule module-instance coverage to assert source map getter behavior.

Related links

Checklist

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

@SyMind
SyMind marked this pull request as ready for review June 11, 2026 10:56
Copilot AI review requested due to automatic review settings June 11, 2026 10:56
@github-actions

github-actions Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing c3f4b82 to fix: remove webpackSource webpackDefer magic comments (#14364) by Gengkun

🎉 Size decreased by 36.00KB from 62.65MB to 62.61MB (⬇️0.06%)

@SyMind
SyMind force-pushed the refactor-js-module branch from 2721949 to 27c96b9 Compare June 11, 2026 11:05
@SyMind
SyMind force-pushed the refactor-js-module branch from 27c96b9 to c3f4b82 Compare June 11, 2026 11:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@codspeed

codspeed Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 52 untouched benchmarks
⏩ 40 skipped benchmarks1


Comparing refactor-js-module (c3f4b82) with main (91c386b)2

Open in CodSpeed

Footnotes

  1. 40 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (b20f06a) during the generation of this report, so 91c386b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@SyMind
SyMind merged commit 20eb043 into main Jun 11, 2026
38 checks passed
@SyMind
SyMind deleted the refactor-js-module branch June 11, 2026 11:40
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.

3 participants

⌂ 换网址