Release independent packages
- napi@3.0.0-alpha.0 - napi-derive@3.0.0-alpha.0
This commit is contained in:
parent
e2b1a3e3d9
commit
2a7c000275
6 changed files with 13 additions and 23 deletions
|
@ -7,7 +7,7 @@ name = "napi-derive-backend"
|
|||
readme = "README.md"
|
||||
repository = "https://github.com/napi-rs/napi-rs"
|
||||
rust-version = "1.65"
|
||||
version = "1.0.62"
|
||||
version = "2.0.0-alpha.0"
|
||||
|
||||
[package.metadata.workspaces]
|
||||
independent = true
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "napi-derive"
|
|||
readme = "README.md"
|
||||
repository = "https://github.com/napi-rs/napi-rs"
|
||||
rust-version = "1.65"
|
||||
version = "2.16.0"
|
||||
version = "3.0.0-alpha.0"
|
||||
|
||||
[package.metadata.workspaces]
|
||||
independent = true
|
||||
|
@ -23,7 +23,7 @@ type-def = ["napi-derive-backend/type-def"]
|
|||
|
||||
[dependencies]
|
||||
convert_case = "0.6"
|
||||
napi-derive-backend = { version = "1.0.62", path = "../backend" }
|
||||
napi-derive-backend = { version = "2.0.0-alpha.0", path = "../backend" }
|
||||
proc-macro2 = "1"
|
||||
quote = "1"
|
||||
syn = { version = "2", features = ["fold", "full", "extra-traits"] }
|
||||
|
|
|
@ -8,7 +8,7 @@ name = "napi"
|
|||
readme = "README.md"
|
||||
repository = "https://github.com/napi-rs/napi-rs"
|
||||
rust-version = "1.65"
|
||||
version = "2.16.0"
|
||||
version = "3.0.0-alpha.0"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
@ -78,7 +78,6 @@ optional = true
|
|||
version = "0.4"
|
||||
|
||||
[target.'cfg(target_family = "wasm")'.dependencies]
|
||||
napi-derive = { path = "../macro", version = "2.10.1", default-features = false }
|
||||
tokio = { version = "1", optional = true, features = ["rt", "sync"] }
|
||||
|
||||
[target.'cfg(not(target_family = "wasm"))'.dependencies]
|
||||
|
|
|
@ -115,8 +115,8 @@ name = "awesome"
|
|||
crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
napi = "2"
|
||||
napi-derive = "2"
|
||||
napi = "3"
|
||||
napi-derive = "3"
|
||||
|
||||
[build-dependencies]
|
||||
napi-build = "1"
|
||||
|
|
|
@ -242,6 +242,7 @@ impl<'scope, Args: JsValuesTupleIntoVec, Return: FromNapiValue> Function<'scope,
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "napi4")]
|
||||
pub struct ThreadsafeFunctionBuilder<
|
||||
Args: JsValuesTupleIntoVec,
|
||||
Return,
|
||||
|
@ -254,6 +255,7 @@ pub struct ThreadsafeFunctionBuilder<
|
|||
_return: std::marker::PhantomData<Return>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "napi4")]
|
||||
impl<
|
||||
Args: JsValuesTupleIntoVec,
|
||||
Return: FromNapiValue,
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
use super::*;
|
||||
use crate::{
|
||||
bindgen_runtime::{FromNapiValue, Function},
|
||||
threadsafe_function::UnknownReturnValue,
|
||||
};
|
||||
use crate::bindgen_runtime::{FromNapiValue, Function, Unknown};
|
||||
|
||||
pub struct JsGlobal(pub(crate) Value);
|
||||
|
||||
|
@ -28,12 +25,8 @@ impl JSON {
|
|||
}
|
||||
|
||||
impl JsGlobal {
|
||||
pub fn set_interval(
|
||||
&self,
|
||||
handler: Function<(), UnknownReturnValue>,
|
||||
interval: f64,
|
||||
) -> Result<JsTimeout> {
|
||||
let func: Function<(Function<(), UnknownReturnValue>, f64), JsTimeout> =
|
||||
pub fn set_interval(&self, handler: Function<(), Unknown>, interval: f64) -> Result<JsTimeout> {
|
||||
let func: Function<(Function<(), Unknown>, f64), JsTimeout> =
|
||||
self.get_named_property_unchecked("setInterval")?;
|
||||
func.call((handler, interval))
|
||||
}
|
||||
|
@ -44,12 +37,8 @@ impl JsGlobal {
|
|||
func.call(timer)
|
||||
}
|
||||
|
||||
pub fn set_timeout(
|
||||
&self,
|
||||
handler: Function<(), UnknownReturnValue>,
|
||||
interval: f64,
|
||||
) -> Result<JsTimeout> {
|
||||
let func: Function<(Function<(), UnknownReturnValue>, f64), JsTimeout> =
|
||||
pub fn set_timeout(&self, handler: Function<(), Unknown>, interval: f64) -> Result<JsTimeout> {
|
||||
let func: Function<(Function<(), Unknown>, f64), JsTimeout> =
|
||||
self.get_named_property_unchecked("setTimeout")?;
|
||||
func.call((handler, interval))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue