Skip to content

Commit

Permalink
chore(deps): update napi to v2.16.0 (#5811)
Browse files Browse the repository at this point in the history
* chore(deps): update napi to v2.16.0

* fix: fix object check on JsRegExp

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Hana <andywangsy@gmail.com>
  • Loading branch information
renovate[bot] and h-a-n-a committed Mar 5, 2024
1 parent 39db88a commit 3c707f0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Expand Up @@ -54,9 +54,9 @@ ustr = { package = "ustr-fxhash", version = "1.0.0" }
xxhash-rust = { version = "0.8.10" }

# Pinned
napi = { version = "=2.15.4" }
napi = { version = "=2.16.0" }
napi-build = { version = "=2.1.2" }
napi-derive = { version = "=2.15.3" }
napi-derive = { version = "=2.16.0" }
napi-sys = { version = "=2.3.0" }
tikv-jemallocator = { version = "=0.5.4", features = ["disable_initial_exec_tls"] }

Expand Down
3 changes: 2 additions & 1 deletion crates/rspack_napi_shared/src/utils.rs
Expand Up @@ -14,7 +14,8 @@ unsafe fn object_prototype_to_string_call<T: NapiRaw>(
let env = Env::from(raw_env);
let s: JsString = env
.get_global()?
.get_named_property::<JsObject>("Object")?
// `Object` is a function, but we want to use it as an JSObject.
.get_named_property_unchecked::<JsObject>("Object")?
.get_named_property::<JsObject>("prototype")?
.get_named_property::<JsFunction>("toString")?
.call_without_args(Some(
Expand Down

1 comment on commit 3c707f0

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Benchmark detail: Open

Name Base (2024-03-05 debe2bc) Current Change
10000_development-mode + exec 1.71 s ± 22 ms 1.71 s ± 30 ms +0.49 %
10000_development-mode_hmr + exec 707 ms ± 5.7 ms 715 ms ± 9 ms +1.11 %
10000_production-mode + exec 2.63 s ± 17 ms 2.74 s ± 24 ms +3.90 %
arco-pro_development-mode + exec 2.39 s ± 21 ms 2.44 s ± 30 ms +2.15 %
arco-pro_development-mode_hmr + exec 510 ms ± 4 ms 508 ms ± 5 ms -0.21 %
arco-pro_development-mode_hmr_intercept-plugin + exec 524 ms ± 5.4 ms 523 ms ± 15 ms -0.17 %
arco-pro_development-mode_intercept-plugin + exec 3.16 s ± 35 ms 3.31 s ± 31 ms +4.73 %
arco-pro_production-mode + exec 4.01 s ± 63 ms 4.11 s ± 69 ms +2.42 %
arco-pro_production-mode_intercept-plugin + exec 4.87 s ± 45 ms 5 s ± 53 ms +2.70 %
threejs_development-mode_10x + exec 1.94 s ± 31 ms 1.94 s ± 23 ms +0.01 %
threejs_development-mode_10x_hmr + exec 720 ms ± 5.4 ms 722 ms ± 4.7 ms +0.27 %
threejs_production-mode_10x + exec 5.9 s ± 70 ms 5.7 s ± 29 ms -3.37 %

Please sign in to comment.