Commit graph

182 commits

Author SHA1 Message Date
Stéphan Kochen
50f62f40d7
fix(napi): double allocation in create_buffer 2022-04-01 14:31:29 +08:00
antoniomuso
f783e9537f feat(napi): allow empty enums 2022-03-06 23:12:31 +08:00
LongYinan
71f3c0ef7e
Release independent packages
napi@2.2.0
napi-derive@2.2.0
2022-03-06 14:23:43 +08:00
LongYinan
18afd86a2e fix(napi): missing ValidateNapiValue trait for types 2022-03-06 14:20:36 +08:00
LongYinan
b48a757837 style: clippy fix 2022-03-05 23:05:04 +08:00
LongYinan
1104742983 fix(napi): Buffer value lifetime should align the Rust lifetime 2022-03-05 23:05:04 +08:00
LongYinan
9f3fbaa8e0
fix(napi): race issues with Node.js worker_thread (#1081)
Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
2022-03-05 14:14:32 +08:00
messense
132a9a4ae2 chore: fix clippy::needless_late_init lint 2022-02-28 12:09:40 +08:00
Martin Madsen
e9f43495c2 chore(napi): Mark shutdown_tokio_rt unsafe 2022-02-16 18:02:10 +01:00
Martin Madsen
5a0c1c2af3 fix(napi): cleanup registered hook upon unloading module with tokio_rt 2022-02-16 15:28:16 +01:00
Simon Vandel Sillesen
cb9be7bc6a Merge remote-tracking branch 'origin/main' into chrono_datetime 2022-02-11 07:21:07 +01:00
LongYinan
d55e4f6f1f
style: format toml files 2022-02-11 10:46:17 +08:00
Simon Vandel Sillesen
f3c34cc452 chrono_date implies napi5 2022-02-10 06:44:43 +01:00
Simon Vandel Sillesen
2b2841e8d3 feat: Add support for Date <-> chrono::DateTime<Utc> 2022-02-09 20:59:58 +01:00
LongYinan
e607bc158e
Release independent packages
- napi@2.1.0
- napi-derive@2.1.0
2022-02-09 20:44:53 +08:00
LongYinan
2763a8e7b2
fix(napi): deref from Uint8ClampedArray 2022-02-07 12:24:09 +08:00
LongYinan
80ea0ad78c
fix(napi): re-export JsDate as Date in prelude 2022-02-06 20:42:48 +08:00
LongYinan
5002e782a4
docs(napi): typo 2022-02-06 16:39:11 +08:00
LongYinan
dfd213a1ee
feat(napi): with_value method on Property 2022-02-06 16:26:00 +08:00
AlCalzone
ed12bd76bd
feat: impl FromNapiValue for serde_json::Number, fix it for Null, throw for impossible types (#1052)
fix #1013

Co-authored-by: zeroslope <jsx55242@foxmail.com>
2022-02-06 11:58:17 +08:00
LongYinan
89893cdca3
style: apply clippy suggestion 2022-02-06 10:49:16 +08:00
messense
d3e37a44cb Fix BigInt issue with zero value
Looks like 0 is a special case: 4318b2348d/deps/v8/src/objects/bigint.cc (L1595-L1602)
2022-02-04 21:43:57 +08:00
messense
a1be16530b Fix String roundtrip with interior nul bytes 2022-02-04 16:52:44 +08:00
LongYinan
13533d1a37
feat(napi): re-export tokio and features 2022-01-23 23:04:31 +08:00
LongYinan
16f808276d
feat(napi): implement get_js_function 2022-01-23 23:04:31 +08:00
JoostK
8652019c94
fix(napi-derive): an Option in front of a required parameter is no longer optional in TypeScript
This fixes a bug where having a parameter of type `Option<T>` followed by required parameters
would incorrectly declare the parameter as option in the TypeScript declaration file, resulting
in invalid syntax.
2022-01-23 18:57:01 +08:00
Jose L
40651714c9
feat(napi-derive): add ts_type attribute to override typtescript type for fields in structs 2022-01-23 18:45:41 +08:00
messense
a109c54918 fix(napi): add missing nul byte to noop
Fixes a global-buffer-overflow bug
2022-01-22 12:34:55 +08:00
LongYinan
1238ee0276
Release independent packages
napi@2.0.4
napi-derive@2.0.8
2022-01-18 14:38:34 +08:00
Jose Acevedo
36e808d2a6 feat: add 'coerce_to_object' method to Array 2022-01-17 21:07:25 -08:00
Tim Fish
cdcab888ee
fix(napi-derive): correctly escape backslash in type definition doc comments (#1034) 2022-01-17 12:38:16 +08:00
LongYinan
cbbccf2084
Merge pull request #1029 from napi-rs/fix-clippy
fix(napi): clippy error on 1.58
2022-01-14 11:48:25 +08:00
LongYinan
41bcd9c50b
fix(napi): clippy error on 1.58 2022-01-14 11:21:03 +08:00
Dave Ceddia
1006b3a489 fix(napi): abort threadsafe functions upon env cleanup
This fixes a deadlock/panic in Electron when the window is reloaded.
2022-01-13 10:06:50 -05:00
LongYinan
1768cf69ee
Release independent packages
napi@2.0.3
2022-01-13 14:52:19 +08:00
messense
43fb8edecd chore: forbid unsafe_op_in_unsafe_fn 2022-01-13 11:26:28 +08:00
LongYinan
2de500f33b
fix(napi): invalid memory address in FromNapiValue for &str 2022-01-12 17:08:47 +08:00
LongYinan
645a2e7885
Release independent packages
napi-derive@2.0.7
2022-01-07 14:11:47 +08:00
LongYinan
b53e0e1e95
fix(napi-derive): BigInt in TypeScript should be bigint 2022-01-06 22:33:34 +08:00
LongYinan
581e8cf9f5
Release independent packages
napi-derive@2.0.6
2022-01-06 17:41:02 +08:00
LongYinan
0f5ebc4699
chore(napi-derive-backend): update convert_case 2022-01-06 17:40:25 +08:00
LongYinan
15d2b95687
chore(napi-derive): update convert_case 2022-01-06 16:54:43 +08:00
LongYinan
b6d126db53
fix(napi-derive): implement missing trait for JsClass reference 2022-01-06 16:19:43 +08:00
LongYinan
3565fccdb6
fix(napi-derive): should throw rather than panic if object mismatched 2022-01-06 15:57:41 +08:00
LongYinan
04012915bb
Release independent packages
napi-derive@2.0.5
2022-01-04 11:06:38 +08:00
Flux Xu
881fd52063
fix(napi-derive): unraw rust identifiers before sending it to js. (#987) 2022-01-03 11:28:35 +08:00
LongYinan
556ace8f33
fix(napi-derive,cli): export type alias for original name 2021-12-25 17:36:12 +08:00
LongYinan
66e202e2f2
Release independent packages
napi-derive@2.0.4
2021-12-25 01:44:37 +08:00
LongYinan
f76a12eb5a
fix(napi-derive): ignore warnings on generated fn
Close https://github.com/napi-rs/napi-rs/issues/968
2021-12-25 01:24:58 +08:00
LongYinan
76798a4343
fix(napi-derive): missing wrap in NAPI-RS created class instance 2021-12-24 22:56:16 +08:00