Skip to content
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

bundler: fix extra bugs #1127

Merged
merged 6 commits into from
Oct 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 1 deletion ecmascript/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ swc_ecma_ast = {version = "0.32.0", path = "./ast"}
swc_ecma_codegen = {version = "0.36.0", path = "./codegen", optional = true}
swc_ecma_dep_graph = {version = "0.4.0", path = "./dep-graph", optional = true}
swc_ecma_parser = {version = "0.38.0", path = "./parser", optional = true}
swc_ecma_transforms = {version = "0.24.1", path = "./transforms", optional = true}
swc_ecma_transforms = {version = "0.24.4", path = "./transforms", optional = true}
swc_ecma_utils = {version = "0.22.0", path = "./utils", optional = true}
swc_ecma_visit = {version = "0.18.0", path = "./visit", optional = true}

Expand Down
6 changes: 6 additions & 0 deletions ecmascript/transforms/src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ impl MapWithMut for ObjectPatProp {
}
}

impl MapWithMut for PatOrExpr {
fn dummy() -> Self {
PatOrExpr::Pat(Box::new(Pat::Ident(Ident::dummy())))
}
}

pub(crate) trait PatOrExprExt: AsOptExpr {
fn as_ref(&self) -> &PatOrExpr;
fn as_mut(&mut self) -> &mut PatOrExpr;
Expand Down
Loading