Skip to content

Commit f8557e9

Browse files
authored
Merge pull request #237 from kwonoj/fix-bin-expr-child
2 parents 64c2cbe + 9c7c3f8 commit f8557e9

File tree

10 files changed

+30
-11
lines changed

10 files changed

+30
-11
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ resolver = "2"
1212
#lto = true
1313

1414
[workspace.dependencies]
15-
istanbul-oxide = { path = "./packages/istanbul-oxide", version = "0.0.22" }
15+
istanbul-oxide = { path = "./packages/istanbul-oxide", version = "0.0.23" }
1616
swc-coverage-instrument = { path = "./packages/swc-coverage-instrument" }
1717

1818
getrandom = { version = "0.2.15" }

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "swc-plugin-coverage-instrument",
3-
"version": "0.0.22",
3+
"version": "0.0.23",
44
"description": "SWC coverage instrumentation plugin",
55
"main": "./target/wasm32-wasi/release/swc_plugin_coverage.wasm",
66
"napi": {

packages/istanbul-oxide/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55
license = "MIT"
66
name = "istanbul-oxide"
77
repository = "https://github.com/kwonoj/swc-coverage-instrument"
8-
version = "0.0.22"
8+
version = "0.0.23"
99

1010
[dependencies]
1111
indexmap = { workspace = true, features = ["serde"] }

packages/swc-coverage-instrument/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55
license = "MIT"
66
name = "swc-coverage-instrument"
77
repository = "https://github.com/kwonoj/swc-coverage-instrument"
8-
version = "0.0.22"
8+
version = "0.0.23"
99

1010
[dependencies]
1111
istanbul-oxide = { workspace = true }

packages/swc-coverage-instrument/src/macros/instrumentation_counter_helper.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ macro_rules! instrumentation_branch_wrap_counter_helper {
118118
// replace init with increase expr + init seq
119119
*expr = paren_expr;
120120
} else {
121+
expr.visit_mut_children_with(self);
121122
self.replace_expr_with_branch_counter(expr, branch);
122123
}
123124
}

packages/swc-plugin-coverage/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55
license = "MIT"
66
name = "swc-plugin-coverage"
77
repository = "https://github.com/kwonoj/swc-coverage-instrument"
8-
version = "0.0.22"
8+
version = "0.0.23"
99

1010
[lib]
1111
crate-type = ["cdylib"]

spec/fixtures/issue-233.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: issue 233
3+
code: |
4+
let i = 0;
5+
6+
const t = true && {
7+
renderFn: () => {
8+
i++
9+
},
10+
}
11+
12+
t.renderFn();
13+
tests:
14+
- name: covers right bin expr fn
15+
lines: {'1': 1, '3': 1, '5': 1, '9': 1}
16+
branches: {'0': [1, 1]}
17+
statements: {'0': 1, '1': 1, '2': 1, '3': 1}
18+
functions: {'0': 1}

spec/swc-coverage-custom-transform/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ napi-derive = { version = "2.12.3", default-features = false, features = [
2121
] }
2222
serde = { version = "1.0.160", features = ["derive"] }
2323
serde_json = { version = "1.0.96", features = ["unbounded_depth"] }
24-
swc-coverage-instrument = { version = "0.0.22", path = "../../packages/swc-coverage-instrument" }
24+
swc-coverage-instrument = { version = "0.0.23", path = "../../packages/swc-coverage-instrument" }
2525

2626
swc_core = { version = "0.96.2", features = [
2727
"common_concurrent",

0 commit comments

Comments
 (0)