Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
714ecad
feat(transformer): support ModuleRunnerTransform
Dunqing Feb 20, 2025
65880db
transform imports
Dunqing Feb 25, 2025
207e304
transform identifier
Dunqing Feb 26, 2025
cfe07b8
transform export named declaration
Dunqing Feb 26, 2025
7eaf913
transform export all declaration
Dunqing Feb 27, 2025
d2f081a
transform export default declaration
Dunqing Feb 27, 2025
b26833c
support hoisting imports
Dunqing Feb 27, 2025
2eee373
transform import meta
Dunqing Feb 27, 2025
89023fb
Use `Atom::new_const` to initialize constant keys
Dunqing Feb 27, 2025
ca75a4b
Simplify methods
Dunqing Feb 27, 2025
ace7e60
transform dynamic import
Dunqing Feb 27, 2025
0c04df4
Add a lot of tests
Dunqing Feb 27, 2025
d076d42
wrap with (0, ...) to avoid method binding `this`
Dunqing Feb 27, 2025
ec98b8c
format tests and fix incorrect tests
Dunqing Feb 27, 2025
f8984b0
Polish and add comments
Dunqing Feb 27, 2025
c5ea472
Fix clippy
Dunqing Feb 27, 2025
9f1c1b4
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 27, 2025
3af4a8d
Remove FIXME
Dunqing Feb 27, 2025
c638e49
Fix unused lint
Dunqing Feb 27, 2025
c8fbb8b
Add documentation at top of file
Dunqing Feb 27, 2025
ed98fd4
Support collect `deps` and `dynamicDeps`
Dunqing Feb 27, 2025
5e270f8
move to plugins module
Dunqing Feb 27, 2025
a18bb3e
derive Debug and Default
Dunqing Feb 27, 2025
39a07ae
Optimize imports hoisting
Dunqing Feb 28, 2025
74df54a
Fix incorrect transform for `export default` anonymous function/class
Dunqing Feb 28, 2025
1779afc
Format a test
Dunqing Feb 28, 2025
84051f7
Add a test "named exports of imported binding"
Dunqing Feb 28, 2025
d939653
Update crates/oxc_transformer/src/plugins/module_runner_transform.rs
Dunqing Feb 28, 2025
d4c10b9
Update crates/oxc_transformer/src/plugins/module_runner_transform.rs
Dunqing Feb 28, 2025
99f2527
Remove redundant semicolon
Dunqing Feb 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions crates/oxc_transformer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ insta = { workspace = true }
oxc_codegen = { workspace = true }
oxc_parser = { workspace = true }
oxc_sourcemap = { workspace = true }
oxc_tasks_common = { workspace = true }
pico-args = { workspace = true }
similar = { workspace = true }

[features]
default = []
Expand Down
4 changes: 2 additions & 2 deletions crates/oxc_transformer/src/decorator/legacy/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ impl<'a> LegacyDecoratorMetadata<'a, '_> {
let binding = MaybeBoundIdentifier::from_identifier_reference(ident, ctx);
let ident1 = binding.create_read_expression(ctx);
let ident2 = binding.create_read_expression(ctx);
let member = create_property_access(ident1, &qualified.right.name, ctx);
let member = create_property_access(SPAN, ident1, &qualified.right.name, ctx);
Self::create_checked_value(ident2, member, ctx)
} else {
// `A.B.C` -> `typeof A !== "undefined" && (_a = A.B) !== void 0 && _a.C`
Expand All @@ -401,7 +401,7 @@ impl<'a> LegacyDecoratorMetadata<'a, '_> {
);

let object = binding.create_read_expression(ctx);
let member = create_property_access(object, &qualified.right.name, ctx);
let member = create_property_access(SPAN, object, &qualified.right.name, ctx);
ctx.ast.expression_logical(SPAN, left, LogicalOperator::And, member)
}
}
Expand Down
2 changes: 2 additions & 0 deletions crates/oxc_transformer/src/plugins/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
mod inject_global_variables;
mod module_runner_transform;
mod replace_global_defines;

pub use inject_global_variables::*;
pub use module_runner_transform::*;
pub use replace_global_defines::*;
Loading
Loading