-
-
Notifications
You must be signed in to change notification settings - Fork 747
refactor: extract case-sensitive check to plugin #12532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: extract case-sensitive check to plugin #12532
Conversation
- Rename WarnCaseSensitiveModulesPlugin to CaseSensitivePlugin - Move case-sensitive asset check from compiler to plugin - Plugin now handles both module and asset case-sensitive checks - Update test cases to use new plugin
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this 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 the case-sensitive checking logic by extracting it from the compiler core into a dedicated plugin. The WarnCaseSensitiveModulesPlugin has been renamed to CaseSensitivePlugin and now handles both module and asset case-sensitive checks in a unified way.
- Renamed plugin from
WarnCaseSensitiveModulesPlugintoCaseSensitivePluginwith backward compatibility alias - Moved asset case-sensitive check logic from compiler's
emit_assetsmethod to the plugin'semithook - Plugin now handles both module warnings (in
compilation.sealhook) and asset warnings (incompiler.emithook)
Reviewed changes
Copilot reviewed 12 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
crates/rspack_plugin_case_sensitive/src/lib.rs |
Renamed struct, added CompilerEmit hook handler for asset checking, and new create_sensitive_assets_warning method |
crates/rspack_plugin_case_sensitive/Cargo.toml |
Updated package name and description, added itertools dependency |
crates/rspack_core/src/compiler/mod.rs |
Removed inline asset case-sensitive checking logic and related imports |
crates/rspack_binding_api/src/raw_options/raw_builtins/mod.rs |
Updated plugin enum name and import references |
crates/rspack_binding_api/Cargo.toml |
Updated dependency name from rspack_plugin_warn_sensitive_module to rspack_plugin_case_sensitive |
crates/node_binding/napi-binding.d.ts |
Updated TypeScript type definition for enum value |
Cargo.toml |
Updated workspace dependency name |
Cargo.lock |
Reflected dependency name changes |
packages/rspack/src/builtin-plugin/CaseSensitivePlugin.ts |
Renamed export from WarnCaseSensitiveModulesPlugin to CaseSensitivePlugin |
packages/rspack/src/builtin-plugin/index.ts |
Updated export to reference new plugin file |
packages/rspack/src/exports.ts |
Exported CaseSensitivePlugin with backward compatibility alias as WarnCaseSensitiveModulesPlugin |
packages/rspack/etc/core.api.md |
Updated API documentation to reflect plugin rename and alias |
tests/rspack-test/errorCases/error-case-sensitive.js |
Updated diagnostic code in test expectation from "Sensitive Modules Warn" to "Sensitive Warn" |
tests/rspack-test/configCases/errors/case-emit/rspack.config.js |
Added test configuration that explicitly uses CaseSensitivePlugin |
tests/rspack-test/configCases/errors/case-emit/warnings.js |
Added test expectations for asset case-sensitive warnings |
Comments suppressed due to low confidence (1)
crates/rspack_plugin_case_sensitive/src/lib.rs:143
- The comment is outdated and incomplete. It only mentions case sensitive modules and the compilation.seal hook, but the plugin now also handles case sensitive assets in the compiler.emit hook. The comment should be updated to reflect both functionalities.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 1 project with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 ui-componentsPath:
📦 Download Diff Report: ui-components Bundle Diff Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
❌ Size increased by 2.88KB from 47.87MB to 47.87MB (⬆️0.01%) |
CodSpeed Performance ReportMerging #12532 will not alter performanceComparing Summary
Footnotes
|
Summary
relate to web-infra-dev/rslib#1401
This PR refactors the case-sensitive checking logic by extracting it from the compiler core into a dedicated plugin. The has been renamed to and now handles both module and asset case-sensitive checks in a unified way.
The main changes include:
This refactoring improves code organization by separating concerns and makes the case-sensitive checking functionality more modular and easier to maintain.
Checklist