Avatar for the web-infra-dev user
web-infra-dev
rspack
BlogDocsChangelog

Swc macro

#10920
Comparing
swc-macro
(
19f3dc7
) with
main
(
91dc2db
)
CodSpeed Performance Gauge
0%
Improvements
0
Regressions
0
Untouched
16
New
0
Dropped
0
Ignored
0

Benchmarks

Passed

js@is css mod
tests/bench/ts-react.bench.ts::TypeScript React project::js@is css mod
CodSpeed Performance Gauge
+1%
92.7 µs
92.2 µs
bundle@threejs-production
xtask/benchmark/benches/groups/bundle.rs::bundle::bundle_benchmark::bundle::bundle@threejs-production
CodSpeed Performance Gauge
0%
1.8 s
1.8 s
js@record chunk group
tests/bench/ts-react.bench.ts::TypeScript React project::js@record chunk group
CodSpeed Performance Gauge
0%
83.4 µs
83.1 µs
js@Traverse module graph by dependencies
tests/bench/ts-react.bench.ts::TypeScript React project::js@Traverse module graph by dependencies
CodSpeed Performance Gauge
0%
567.3 µs
566.2 µs
js@stats.toJson()
tests/bench/ts-react.bench.ts::TypeScript React project::js@stats.toJson()
CodSpeed Performance Gauge
0%
25.5 ms
25.4 ms
bundle@basic-react-production-sourcemap
xtask/benchmark/benches/groups/bundle.rs::bundle::bundle_benchmark::bundle::bundle@basic-react-production-sourcemap
CodSpeed Performance Gauge
0%
841.4 ms
840.6 ms
js@record module
tests/bench/ts-react.bench.ts::TypeScript React project::js@record module
CodSpeed Performance Gauge
0%
2 ms
2 ms
js@collect imported identifiers
tests/bench/ts-react.bench.ts::TypeScript React project::js@collect imported identifiers
CodSpeed Performance Gauge
0%
217.7 µs
217.8 µs
bundle@basic-react-production
xtask/benchmark/benches/groups/bundle.rs::bundle::bundle_benchmark::bundle::bundle@basic-react-production
CodSpeed Performance Gauge
0%
642.8 ms
643 ms
js@Traverse compilation.modules
tests/bench/ts-react.bench.ts::TypeScript React project::js@Traverse compilation.modules
CodSpeed Performance Gauge
0%
71.5 µs
71.6 µs
bundle@threejs-development
xtask/benchmark/benches/groups/bundle.rs::bundle::bundle_benchmark::bundle::bundle@threejs-development
CodSpeed Performance Gauge
0%
926 ms
927.5 ms
bundle@threejs-production-sourcemap
xtask/benchmark/benches/groups/bundle.rs::bundle::bundle_benchmark::bundle::bundle@threejs-production-sourcemap
CodSpeed Performance Gauge
0%
2.4 s
2.4 s
rust@build_chunk_graph_parallel
xtask/benchmark/benches/groups/build_chunk_graph.rs::chunk_graph::build_chunk_graph_benchmark::rust@build_chunk_graph_parallel
CodSpeed Performance Gauge
0%
80.3 ms
80.5 ms
js@Traverse module graph by connections
tests/bench/ts-react.bench.ts::TypeScript React project::js@Traverse module graph by connections
CodSpeed Performance Gauge
0%
286.4 µs
287.3 µs
bundle@basic-react-development
xtask/benchmark/benches/groups/bundle.rs::bundle::bundle_benchmark::bundle::bundle@basic-react-development
CodSpeed Performance Gauge
0%
434.9 ms
437.1 ms
rust@build_chunk_graph
xtask/benchmark/benches/groups/build_chunk_graph.rs::chunk_graph::build_chunk_graph_benchmark::rust@build_chunk_graph
CodSpeed Performance Gauge
-1%
91.2 ms
91.7 ms

Commits

Click on a commit to change the comparison range
Base
main
91dc2db
0%
fix: Group 1 incremental merge - foundation & infrastructure - Fix compilation errors in flag_dependency_usage_plugin.rs - Update ExportInfoSetter API calls to use instance methods - Fix Queue parameter mismatches using batch Vec instead - Remove missing module references from mod.rs - Fix PrefetchExportsInfoMode enum variants (AllExports -> Full) - Comment out unavailable plugin references - Add incremental merge plan documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
b9d10d3
11 days ago
by ScriptedAlchemy
0%
fix: resolve dead code warnings - Prefix unused function process_object_literal_with_usage with underscore - Prefix unused field enable_export_usage_tracking with underscore 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
7cb8e68
11 days ago
by ScriptedAlchemy
0%
fix: resolve clippy errors in tree-shaking macro implementation - Use inline format string variables instead of separate arguments - Fix collapsible else-if blocks - Replace unwrap() with expect() for better error messages - Remove unnecessary reference in method call 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
22f8cb4
11 days ago
by ScriptedAlchemy
0%
fix: use shared_key instead of consume_shared_info for all shared modules - Update ESMExportExpressionDependency to check shared_key everywhere - This ensures both regular shared modules and ConsumeShared modules get tree-shaking macros - Add debug logging for no-declaration case 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
8a5a746
11 days ago
by ScriptedAlchemy
0%
fix: remove debug tracing and merge main branch - Remove all debug tracing statements from ESMExportExpressionDependency - Merge latest changes from main branch - Resolve pnpm-lock.yaml conflict 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
c8096eb
11 days ago
by ScriptedAlchemy
0%
fix: use actual shared keys instead of placeholder in CommonJS exports parser - Updated detect_shared_module_key to check BuildMeta for shared_key and consume_shared_key - Removed hardcoded "placeholder" value - Fixed access to correct BuildMeta fields 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
c73e1b1
11 days ago
by ScriptedAlchemy
0%
feat: add tree-shaking macros to ConsumeShared fallback modules - Implemented NormalModuleFactoryModule hook in ConsumeSharedPlugin to set consume_shared_key before parsing - Extract share key from ConsumeShared module identifier and apply to fallback modules - Fixed timing issue where shared keys were set after parsing - Updated test snapshots to reflect tree-shaking macros in CJS modules This ensures CommonJS modules used as Module Federation shared modules get proper tree-shaking macros with their actual share keys (e.g., cjs-pure-helper, cjs-legacy-utils). 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
823e4a9
11 days ago
by ScriptedAlchemy
0%
test: update expectations after tree-shaking macro implementation - Update chunk size expectations in StatsAPI test (841 -> 812 bytes) - Remove PURE annotation expectation in require-as-expression test The size changes are due to tree-shaking macros being added to shared modules. The PURE annotation removal is a side effect of our implementation changes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
6cf10f4
11 days ago
by ScriptedAlchemy
0%
fix: resolve Rust compilation warnings and clippy issues - Remove unused import of `rspack_sources::Source` - Remove unused function `source_range_between` - Remove unused import of `Span` - Fix collapsible else-if blocks in esm_export_expression_dependency 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
10f831c
11 days ago
by ScriptedAlchemy
0%
feat: re-enable PURE annotations for shared module descendants - Re-enabled PURE annotations on __webpack_require__ calls for descendants of shared modules - Added is_consume_shared_descendant function to check if a module is a shared module or descendant - Checks for both ConsumeShared and ProvideShared module types - Also checks for shared_key and consume_shared_key in BuildMeta - PURE annotations now appear on imports within shared modules like lodash-es This ensures better tree-shaking for shared modules in Module Federation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
f9d4265
10 days ago
by ScriptedAlchemy
0%
test: update Module Federation tests to validate PURE annotations - Added afterBuild hook to validate PURE annotations in output - Added shareKey configuration to shared modules - Added imports between shared modules to test PURE annotation generation - Created validate-output.js to check for PURE annotations and tree-shaking macros - Simplified runtime tests as output validation is now done in afterBuild The tests now verify that: 1. PURE annotations are added to __webpack_require__ calls in shared modules 2. Tree-shaking macros are generated with proper share keys (not placeholders) 3. Basic functionality of shared modules still works correctly 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
0c2f259
10 days ago
by ScriptedAlchemy
-22%
fix: exclude examples directory from biome linting - Added examples/**/* to biome.jsonc ignore lists - Prevents linting failures on generated/test files in examples - Resolves CI lint failures 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
0179505
3 days ago
by ScriptedAlchemy
0%
fix: remove [RT1] and [RT2] debug markers from runtime template - Removed [RT1] and [RT2] debug markers from ESM import comments - Prevents snapshot test failures caused by debug output - Maintains clean runtime code generation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
beb6dd5
3 days ago
by ScriptedAlchemy
+21%
fix: update binding.d.ts to include new BuildMeta fields Update TypeScript definitions to include the new BuildMeta fields added for the Module Federation shared detection optimization: - isSharedDescendant?: boolean - Cached result of shared descendant check - effectiveSharedKey?: string - Unified shared key for ESM and CommonJS modules These fields enable O(1) lookups instead of expensive O(V+E) BFS traversals for Module Federation shared module detection, improving performance while maintaining full CommonJS tree-shaking macro support. This resolves the CI build failure where binding.d.ts was modified during the build process due to the new Rust struct fields not being reflected in the TypeScript definitions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
3366557
2 days ago
by ScriptedAlchemy
-22%
chore: remove redundant test files from basic example Remove development test files that are now covered by proper test suite: - Comprehensive coverage exists in packages/rspack-test-tools/tests/configCases/container-1-5/shared-modules-macro/ - These test files were development artifacts and debugging scripts - The proper test suite validates tree-shaking macros, PURE annotations, and Module Federation shared modules
c508b2f
2 days ago
by ScriptedAlchemy
0%
fix: resolve CI failures for spell check and rust check - Replace 'metalness' with 'metallic' in Three.js benchmarks to fix spell check - Remove unnecessary assert\!(true) and fix underscore variable binding in rust tests - Clean up clippy warnings in runtime_template.rs
4663c36
2 days ago
by ScriptedAlchemy
0%
chore: clean up repository and consolidate tests - Reset .typos.toml to main branch version - Remove profiling and benchmark shell scripts not on main branch - Remove redundant test files from examples/basic - Consolidate test coverage into proper test suite: - Enhanced shared-modules-macro test with fixed exports - Added comprehensive shared-modules-macro-syntax test - Preserve run-build.sh script for development workflow - Remove ~100 redundant test files while maintaining coverage 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
b40732d
2 days ago
by ScriptedAlchemy
0%
fix: remove redundant test function in consume_shared_plugin - Remove test_mark_shared_descendants_function_exists test - The test was redundant as compilation validates function signature - Fixes clippy warning about assert\!(true) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
83da5cd
2 days ago
by ScriptedAlchemy
0%
Merge branch 'main' into swc-macro
25fd937
2 days ago
by ScriptedAlchemy
+40%
Merge branch 'main' into swc-macro - resolve conflicts by taking main's pnpm-lock.yaml
65be29f
2 days ago
by ScriptedAlchemy
-54%
feat: Add comprehensive tests for ShareUsagePlugin with strict module ID validation - Remove metadata wrapper from JSON output for cleaner structure - Add 7 comprehensive unit tests covering serialization, validation, and edge cases - Add integration test infrastructure following rspack test conventions - Implement strict validation that fails if entry_module_id is not set - Add snapshot testing with expected JSON structure - Ensure module IDs are properly validated as strings/numbers - Test covers both normal (ID present) and edge (ID null) scenarios 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
9bcfbf7
2 days ago
by ScriptedAlchemy
+36%
chore: clean up unnecessary descriptive comments Removed redundant comments that explained what was already clear from the code: - ShareUsagePlugin: Removed explanatory comments for obvious code patterns - Test files: Removed file header comments and obvious pattern descriptions - Kept essential comments that provide important context 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
d1802b2
1 day ago
by ScriptedAlchemy
0%
perf: optimize ShareUsagePlugin binary size - Remove unit tests to reduce binary size - Use HashSet instead of Vec for imports to improve performance - Simplify dependency type matching logic - Optimize string allocations and comparisons These changes reduce the plugin's contribution to binary size while maintaining full functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
19f3dc7
1 day ago
by ScriptedAlchemy
© 2025 CodSpeed Technology
Home Terms Privacy Docs