Skip to content

Commit fa3aacc

Browse files
authored
feat(bindings): Introduce AST Viewer to improve debugging experience (#10963)
**Related issue:** - #10747
1 parent 6152958 commit fa3aacc

File tree

19 files changed

+635
-3
lines changed

19 files changed

+635
-3
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
swc_core: patch
3+
swc_ecma_parser: patch
4+
---
5+
6+
feat(bindings): Introduce AST Viewer to improve debugging experience

.github/workflows/CI.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ jobs:
152152
- binding_core_wasm
153153
- binding_minifier_wasm
154154
- binding_typescript_wasm
155+
- binding_es_ast_viewer
155156
steps:
156157
- uses: actions/checkout@v4
157158

.github/workflows/publish-npm-package.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,10 @@ jobs:
617617
npm: "@swc\\/wasm-typescript-esm"
618618
build: "./scripts/esm.sh"
619619
out: "esm"
620+
- crate: "binding_es_ast_viewer"
621+
npm: "@swc\\/es-ast-viewer"
622+
build: "./scripts/build.sh"
623+
out: "pkg"
620624

621625
steps:
622626
- uses: actions/checkout@v5

bindings/Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindings/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
members = [
33
"binding_core_node",
44
"binding_core_wasm",
5+
"binding_es_ast_viewer",
56
"binding_html_node",
67
"binding_minifier_node",
78
"binding_minifier_wasm",
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[package]
2+
authors = ["강동윤 <[email protected]>"]
3+
edition = "2021"
4+
license = { workspace = true }
5+
name = "binding_es_ast_viewer"
6+
publish = false
7+
repository = { workspace = true }
8+
version = "1.13.3"
9+
10+
[dependencies]
11+
anyhow = { workspace = true }
12+
wasm-bindgen = { workspace = true }
13+
14+
[dependencies.swc_core]
15+
features = [
16+
"ecma_ast",
17+
"common",
18+
"ecma_visit",
19+
"ecma_transforms",
20+
"ecma_parser_unstable",
21+
]
22+
workspace = true
23+
24+
[dependencies.swc_error_reporters]
25+
workspace = true
26+
27+
28+
[lib]
29+
crate-type = ["cdylib", "rlib"]
30+
31+
[[example]]
32+
name = "cli"
33+
path = "examples/cli.rs"
34+
35+
[profile.release]
36+
codegen-units = 1
37+
debug = false # set to `true` for debug information
38+
lto = true
39+
opt-level = "s"
40+
panic = "abort" # Let it crash and force ourselves to write safe Rust.
41+
strip = "symbols" # set to `false` for debug information
42+
43+
[package.metadata.wasm-pack.profile.release]
44+
wasm-opt = false

0 commit comments

Comments
 (0)