Skip to content

Commit

Permalink
feat(transformer): make Targets public (#5335)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Aug 30, 2024
1 parent 8334bd4 commit 3d4a64c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion crates/oxc_transformer/src/env/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ mod data;
mod options;
mod targets;

pub use self::{data::can_enable_plugin, options::EnvOptions, targets::Versions};
pub use self::{
data::can_enable_plugin,
options::EnvOptions,
targets::{Targets, Versions},
};
2 changes: 1 addition & 1 deletion crates/oxc_transformer/src/env/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn default_as_true() -> bool {
#[serde(default, rename_all = "camelCase", deny_unknown_fields)]
pub struct EnvOptions {
#[serde(default)]
targets: Targets,
pub targets: Targets,

#[serde(default = "default_as_true")]
pub bugfixes: bool,
Expand Down
1 change: 1 addition & 0 deletions crates/oxc_transformer/src/env/targets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use serde::Deserialize;

use self::version::Version;

pub use self::query::Targets;
pub mod query;
pub mod version;

Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_transformer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use oxc_traverse::{traverse_mut, Traverse, TraverseCtx};

pub use crate::{
compiler_assumptions::CompilerAssumptions,
env::EnvOptions,
env::{EnvOptions, Targets},
es2015::{ArrowFunctionsOptions, ES2015Options},
options::{BabelOptions, TransformOptions},
react::{ReactJsxRuntime, ReactOptions, ReactRefreshOptions},
Expand Down

0 comments on commit 3d4a64c

Please sign in to comment.