Skip to content

Commit

Permalink
Merge pull request #237 from kwonoj/fix-bin-expr-child
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj authored Jul 4, 2024
2 parents 64c2cbe + 9c7c3f8 commit f8557e9
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 11 deletions.
6 changes: 3 additions & 3 deletions 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ resolver = "2"
#lto = true

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

getrandom = { version = "0.2.15" }
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swc-plugin-coverage-instrument",
"version": "0.0.22",
"version": "0.0.23",
"description": "SWC coverage instrumentation plugin",
"main": "./target/wasm32-wasi/release/swc_plugin_coverage.wasm",
"napi": {
Expand Down
2 changes: 1 addition & 1 deletion packages/istanbul-oxide/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
license = "MIT"
name = "istanbul-oxide"
repository = "https://github.com/kwonoj/swc-coverage-instrument"
version = "0.0.22"
version = "0.0.23"

[dependencies]
indexmap = { workspace = true, features = ["serde"] }
Expand Down
2 changes: 1 addition & 1 deletion packages/swc-coverage-instrument/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
license = "MIT"
name = "swc-coverage-instrument"
repository = "https://github.com/kwonoj/swc-coverage-instrument"
version = "0.0.22"
version = "0.0.23"

[dependencies]
istanbul-oxide = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ macro_rules! instrumentation_branch_wrap_counter_helper {
// replace init with increase expr + init seq
*expr = paren_expr;
} else {
expr.visit_mut_children_with(self);
self.replace_expr_with_branch_counter(expr, branch);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/swc-plugin-coverage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
license = "MIT"
name = "swc-plugin-coverage"
repository = "https://github.com/kwonoj/swc-coverage-instrument"
version = "0.0.22"
version = "0.0.23"

[lib]
crate-type = ["cdylib"]
Expand Down
18 changes: 18 additions & 0 deletions spec/fixtures/issue-233.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: issue 233
code: |
let i = 0;
const t = true && {
renderFn: () => {
i++
},
}
t.renderFn();
tests:
- name: covers right bin expr fn
lines: {'1': 1, '3': 1, '5': 1, '9': 1}
branches: {'0': [1, 1]}
statements: {'0': 1, '1': 1, '2': 1, '3': 1}
functions: {'0': 1}
2 changes: 1 addition & 1 deletion spec/swc-coverage-custom-transform/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ napi-derive = { version = "2.12.3", default-features = false, features = [
] }
serde = { version = "1.0.160", features = ["derive"] }
serde_json = { version = "1.0.96", features = ["unbounded_depth"] }
swc-coverage-instrument = { version = "0.0.22", path = "../../packages/swc-coverage-instrument" }
swc-coverage-instrument = { version = "0.0.23", path = "../../packages/swc-coverage-instrument" }

swc_core = { version = "0.96.2", features = [
"common_concurrent",
Expand Down

0 comments on commit f8557e9

Please sign in to comment.