Conversation
✅ Deploy Preview for rspack canceled.
|
There was a problem hiding this comment.
Pull Request Overview
This PR ports webpack support for the JavaScript "using" declaration feature from webpack/webpack#19626. The changes implement parsing and handling of both using and await using declarations in JavaScript code, which are part of the ECMAScript explicit resource management proposal.
- Adds test infrastructure to detect "using" declaration support in JavaScript engines
- Implements parsing for using declarations in variable declaration contexts (for loops, statements)
- Updates the JavaScript parser to handle using declarations alongside traditional var/let/const declarations
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/webpack-test/helpers/supportsUsing.js | Runtime detection utility for using declaration support |
| tests/webpack-test/cases/parsing/using/* | Test cases for using declaration parsing and functionality |
| tests/webpack-test/configCases/source-map/exclude-modules-source-map/index.js | Updated test expectations for source map generation |
| crates/rspack_plugin_javascript/src/visitors/dependency/parser/estree.rs | Core abstraction for variable declarations including using declarations |
| crates/rspack_plugin_javascript/src/visitors/dependency/parser/walk*.rs | Parser walker implementations updated for using declarations |
| crates/rspack_plugin_javascript/src/parser_plugin/*.rs | Plugin interfaces updated to handle new variable declaration types |
| crates/rspack_plugin_javascript/src/parser_and_generator/mod.rs | Enables explicit resource management in parser configuration |
| crates/rspack_plugin_devtool/src/*.rs | Source map generation fixes for block-scoped code |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
📦 Binary Size-limit
❌ Size increased by 1.63KB from 47.59MB to 47.59MB (⬆️0.00%) |
CodSpeed Performance ReportMerging #11395 will not alter performanceComparing 🎉 Hooray!
|
Summary
Added support for Explicit Resource Management.
Port webpack/webpack#19626
Related links
Checklist