Release independent packages

- napi@3.0.0-alpha.29
- napi-derive@3.0.0-alpha.27
This commit is contained in:
LongYinan 2025-02-21 12:53:55 +08:00
parent 1868bad8a8
commit 6ecc4503b5
No known key found for this signature in database
4 changed files with 9 additions and 5 deletions

View File

@ -7,7 +7,7 @@ name = "napi-derive-backend"
readme = "README.md"
repository = "https://github.com/napi-rs/napi-rs"
rust-version = "1.80"
version = "2.0.0-alpha.26"
version = "2.0.0-alpha.27"
[package.metadata.workspaces]
independent = true

View File

@ -8,7 +8,7 @@ name = "napi-derive"
readme = "README.md"
repository = "https://github.com/napi-rs/napi-rs"
rust-version = "1.80"
version = "3.0.0-alpha.26"
version = "3.0.0-alpha.27"
[package.metadata.workspaces]
independent = true
@ -23,7 +23,7 @@ type-def = ["napi-derive-backend/type-def"]
[dependencies]
convert_case = "0.7"
napi-derive-backend = { version = "2.0.0-alpha.26", path = "../backend" }
napi-derive-backend = { version = "2.0.0-alpha.27", path = "../backend" }
proc-macro2 = "1"
quote = "1"
syn = { version = "2", features = ["fold", "full", "extra-traits"] }

View File

@ -8,7 +8,7 @@ name = "napi"
readme = "README.md"
repository = "https://github.com/napi-rs/napi-rs"
rust-version = "1.80"
version = "3.0.0-alpha.28"
version = "3.0.0-alpha.29"
[lib]
doctest = false

View File

@ -428,6 +428,10 @@ pub unsafe extern "C" fn napi_register_module_v1(
#[cfg(feature = "napi4")]
let current_thread_id = std::thread::current().id();
#[cfg(feature = "napi4")]
let wrapped_object = Box::into_raw(Box::new(current_thread_id)).cast();
#[cfg(not(feature = "napi4"))]
let wrapped_object = Box::into_raw(Box::new(())).cast();
// attach cleanup hook to the `module` object
// we don't use the `napi_add_env_cleanup_hook` because it's required napi3
@ -437,7 +441,7 @@ pub unsafe extern "C" fn napi_register_module_v1(
sys::napi_wrap(
env,
exports,
Box::into_raw(Box::new(current_thread_id)).cast(),
wrapped_object,
Some(thread_cleanup),
ptr::null_mut(),
ptr::null_mut(),