Skip to content

Commit dfef8b5

Browse files
committed
feat(transformer): enable using by default (#10333)
1 parent 1e683f9 commit dfef8b5

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

crates/oxc_transformer/src/options/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl TransformOptions {
8989
..JsxOptions::default()
9090
},
9191
env: EnvOptions::enable_all(/* include_unfinished_plugins */ false),
92-
proposals: ProposalOptions { explicit_resource_management: true },
92+
proposals: ProposalOptions::default(),
9393
helper_loader: HelperLoaderOptions {
9494
mode: HelperLoaderMode::Runtime,
9595
..Default::default()
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
#[derive(Debug, Default, Clone, Copy)]
1+
#[derive(Debug, Clone, Copy)]
22
pub struct ProposalOptions {
33
pub explicit_resource_management: bool,
44
}
5+
6+
impl Default for ProposalOptions {
7+
fn default() -> Self {
8+
Self { explicit_resource_management: true }
9+
}
10+
}

napi/transform/src/transformer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ impl TryFrom<TransformOptions> for oxc::transformer::TransformOptions {
174174
None => oxc::transformer::JsxOptions::enable(),
175175
},
176176
env,
177-
proposals: ProposalOptions { explicit_resource_management: true },
177+
proposals: ProposalOptions::default(),
178178
helper_loader: options
179179
.helpers
180180
.map_or_else(HelperLoaderOptions::default, HelperLoaderOptions::from),

0 commit comments

Comments
 (0)