Skip to content

Commit

Permalink
chore: update swc to v1.10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nodejs-github-bot authored and marco-ippolito committed Jan 6, 2025
1 parent 9538187 commit af1fd9c
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 49 deletions.
87 changes: 47 additions & 40 deletions deps/swc/Cargo.lock

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

8 changes: 4 additions & 4 deletions deps/swc/bindings/Cargo.lock

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

2 changes: 1 addition & 1 deletion deps/swc/bindings/binding_core_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "Apache-2.0"
name = "binding_core_wasm"
publish = false
repository = "https://github.com/swc-project/swc.git"
version = "1.10.3"
version = "1.10.4"

[lib]
bench = false
Expand Down
2 changes: 1 addition & 1 deletion deps/swc/bindings/binding_minifier_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "Apache-2.0"
name = "binding_minifier_wasm"
publish = false
repository = "https://github.com/swc-project/swc.git"
version = "1.10.3"
version = "1.10.4"

[lib]
bench = false
Expand Down
2 changes: 1 addition & 1 deletion deps/swc/bindings/binding_typescript_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "Apache-2.0"
name = "binding_typescript_wasm"
publish = false
repository = "https://github.com/swc-project/swc.git"
version = "1.10.3"
version = "1.10.4"

[lib]
bench = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`transform in strip-only mode should not emit 'Caused by: failed to parse' 1`] = `
" x await isn't allowed in non-async function
,----
1 | function foo() { await Promise.resolve(1); }
: ^^^^^^^
\`----
"
`;

exports[`transform in strip-only mode should remove declare enum 1`] = `
{
"code": " ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,13 @@ describe("transform", () => {
})
).rejects.toMatchSnapshot();
});

it("should not emit 'Caused by: failed to parse'", async () => {
await expect(
swc.transform("function foo() { await Promise.resolve(1); }", {
mode: "strip-only",
})
).rejects.toMatchSnapshot();
});
});
});
2 changes: 1 addition & 1 deletion deps/swc/bindings/binding_typescript_wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ fn operate(input: String, options: Options) -> Result<TransformOutput, Error> {
}

pub fn convert_err(err: Error) -> wasm_bindgen::prelude::JsValue {
format!("{:?}", err).into()
format!("{}", err).into()
}
2 changes: 1 addition & 1 deletion deps/swc/bindings/swc_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"]
license = "Apache-2.0"
name = "swc_cli"
repository = "https://github.com/swc-project/swc.git"
version = "0.91.457"
version = "0.91.459"

[[bin]]
bench = false
Expand Down

0 comments on commit af1fd9c

Please sign in to comment.