E583
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 239377b commit e9c590eCopy full SHA for e9c590e
doc/api/n-api.md
@@ -189,6 +189,7 @@ tied to the life cycle of the Agent.
189
### napi_set_instance_data
190
<!-- YAML
191
added: REPLACEME
192
+napiVersion: 6
193
-->
194
195
```C
@@ -216,6 +217,7 @@ by the previous call, it will not be called.
216
217
### napi_get_instance_data
218
219
220
221
222
223
@@ -1375,10 +1377,9 @@ the `napi_value` in question is of the JavaScript type expected by the API.
1375
1377
#### napi_key_collection_mode
1376
1378
1379
1380
1381
1382
-> Stability: 1 - Experimental
-
1383
1384
typedef enum {
1385
napi_key_include_prototypes,
@@ -1397,10 +1398,9 @@ of the objects's prototype chain as well.
1397
1398
#### napi_key_filter
1399
1400
1401
1402
1403
1404
1405
1406
napi_key_all_properties = 0,
@@ -1417,10 +1417,9 @@ Property filter bits. They can be or'ed to build a composite filter.
1417
#### napi_key_conversion
1418
1419
1420
1421
1422
1423
1424
1425
1426
napi_key_keep_numbers,
@@ -1940,10 +1939,9 @@ The JavaScript `Number` type is described in
1940
1939
#### napi_create_bigint_int64
1941
1942
added: v10.7.0
1943
1944
1945
1946
1947
1948
napi_status napi_create_bigint_int64(napi_env env,
1949
int64_t value,
@@ -1961,10 +1959,9 @@ This API converts the C `int64_t` type to the JavaScript `BigInt` type.
1961
1959
#### napi_create_bigint_uint64
1962
1960
1963
1964
1965
1966
1967
1968
1969
napi_status napi_create_bigint_uint64(napi_env env,
1970
uint64_t value,
@@ -1982,10 +1979,9 @@ This API converts the C `uint64_t` type to the JavaScript `BigInt` type.
1982
1979
#### napi_create_bigint_words
1983
1980
1984
1981
1985
1986
1987
1988
1989
1990
napi_status napi_create_bigint_words(napi_env env,
1991
int sign_bit,
@@ -2319,10 +2315,9 @@ This API returns the C double primitive equivalent of the given JavaScript
2319
2315
#### napi_get_value_bigint_int64
2320
2316
2321
2317
2318
2322
2323
2324
2325
2326
2327
napi_status napi_get_value_bigint_int64(napi_env env,
2328
napi_value value,
@@ -2347,10 +2342,9 @@ This API returns the C `int64_t` primitive equivalent of the given JavaScript
2347
2342
#### napi_get_value_bigint_uint64
2348
2343
2349
2344
2345
2350
2346
2351
2352
2353
2354
2355
napi_status napi_get_value_bigint_uint64(napi_env env,
2356
@@ -2375,10 +2369,9 @@ This API returns the C `uint64_t` primitive equivalent of the given JavaScript
2375
2369
#### napi_get_value_bigint_words
2376
2370
2377
2371
2372
2378
2373
2379
2374
2380
2381
2382
2383
napi_status napi_get_value_bigint_words(napi_env env,
2384
@@ -3189,10 +3182,9 @@ included.
3189
3182
#### napi_get_all_property_names
3190
3183
3191
3184
3185
3192
3186
3193
3187
3194
3195
3196
3188
3197
napi_get_all_property_names(napi_env env,
3198
napi_value object,
src/node_api.h
@@ -10,7 +10,7 @@
10
#define NAPI_VERSION 2147483647
11
#else
12
// The baseline version for N-API
13
-#define NAPI_VERSION 5
+#define NAPI_VERSION 6
14
#endif
15
16
@@ -699,7 +699,7 @@ NAPI_EXTERN napi_status napi_add_finalizer(napi_env env,
699
700
#endif // NAPI_VERSION >= 5
701
702
-#ifdef NAPI_EXPERIMENTAL
+#if NAPI_VERSION >= 6
703
704
// BigInt
705
NAPI_EXTERN napi_status napi_create_bigint_int64(napi_env env,
@@ -745,7 +745,7 @@ napi_get_all_property_names(napi_env env,
745
napi_key_conversion key_conversion,
746
napi_value* result);
747
748
-#endif // NAPI_EXPERIMENTAL
+#endif // NAPI_VERSION >= 6
749
750
EXTERN_C_END
751
src/node_api_types.h
@@ -147,7 +147,7 @@ typedef struct {
147
const char* release;
148
} napi_node_version;
149
150
151
152
153
napi_key_own_only
@@ -166,6 +166,6 @@ typedef enum {
166
167
napi_key_numbers_to_strings
168
} napi_key_conversion;
169
-#endif
170
171
#endif // SRC_NODE_API_TYPES_H_
src/node_version.h
@@ -113,7 +113,8 @@
113
*/
114
#define NODE_MODULE_VERSION 64
115
116
-// the NAPI_VERSION provided by this version of the runtime
117
-#d B3F0 efine NAPI_VERSION 5
+// The NAPI_VERSION provided by this version of the runtime. This is the version
+// which the Node binary being built supports.
118
119
120
#endif // SRC_NODE_VERSION_H_
test/addons-napi/test_bigint/test_bigint.c
@@ -1,5 +1,3 @@
1
-#define NAPI_EXPERIMENTAL
2
3
#include <inttypes.h>
4
#include <stdio.h>
5
#include <node_api.h>
test/addons-napi/test_general/test.js
@@ -34,7 +34,7 @@ assert.notStrictEqual(test_general.testGetPrototype(baseObject),
34
35
// test version management functions
36
// expected version is currently 4
37
-assert.strictEqual(test_general.testGetVersion(), 5);
+assert.strictEqual(test_general.testGetVersion(), 6);
38
39
const [ major, minor, patch, release ] = test_general.testGetNodeVersion();
40
assert.strictEqual(process.version.split('-')[0],
test/addons-napi/test_instance_data/test_instance_data.c
@@ -1,7 +1,6 @@
#include <stdlib.h>
#include <uv.h>
6
#include "../common.h"
7
test/addons-napi/test_object/test_object.c
@@ -1,4 +1,3 @@
#include <string.h>