mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
n-api: define release 6
Mark all N-APIs that have been added since version 5 as stable. PR-URL: https://github.com/nodejs/node/pull/32058 Backport-PR-URL: https://github.com/nodejs/node/pull/32488 Fixes: https://github.com/nodejs/abi-stable-node/issues/393 Co-Authored-By: legendecas <legendecas@gmail.com> Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
1 parent
239377b654
commit
e9c590ea00
8 files changed
+21
-32
No files matched your search
+12
-20
@@ -189,6 +189,7 @@ tied to the life cycle of the Agent.
|
||||
### napi_set_instance_data
|
||||
<!-- YAML
|
||||
added: REPLACEME
|
||||
napiVersion: 6
|
||||
-->
|
||||
|
||||
```C
|
||||
@@ -216,6 +217,7 @@ by the previous call, it will not be called.
|
||||
### napi_get_instance_data
|
||||
<!-- YAML
|
||||
added: REPLACEME
|
||||
napiVersion: 6
|
||||
-->
|
||||
|
||||
```C
|
||||
@@ -1375,10 +1377,9 @@ the `napi_value` in question is of the JavaScript type expected by the API.
|
||||
#### napi_key_collection_mode
|
||||
<!-- YAML
|
||||
added: REPLACEME
|
||||
napiVersion: 6
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
```C
|
||||
typedef enum {
|
||||
napi_key_include_prototypes,
|
||||
@@ -1397,10 +1398,9 @@ of the objects's prototype chain as well.
|
||||
#### napi_key_filter
|
||||
<!-- YAML
|
||||
added: REPLACEME
|
||||
napiVersion: 6
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
```C
|
||||
typedef enum {
|
||||
napi_key_all_properties = 0,
|
||||
@@ -1417,10 +1417,9 @@ Property filter bits. They can be or'ed to build a composite filter.
|
||||
#### napi_key_conversion
|
||||
<!-- YAML
|
||||
added: REPLACEME
|
||||
napiVersion: 6
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
```C
|
||||
typedef enum {
|
||||
napi_key_keep_numbers,
|
||||
@@ -1940,10 +1939,9 @@ The JavaScript `Number` type is described in
|
||||
#### napi_create_bigint_int64
|
||||
<!-- YAML
|
||||
added: v10.7.0
|
||||
napiVersion: 6
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
```C
|
||||
napi_status napi_create_bigint_int64(napi_env env,
|
||||
int64_t value,
|
||||
@@ -1961,10 +1959,9 @@ This API converts the C `int64_t` type to the JavaScript `BigInt` type.
|
||||
#### napi_create_bigint_uint64
|
||||
<!-- YAML
|
||||
added: v10.7.0
|
||||
napiVersion: 6
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
```C
|
||||
napi_status napi_create_bigint_uint64(napi_env env,
|
||||
uint64_t value,
|
||||
@@ -1982,10 +1979,9 @@ This API converts the C `uint64_t` type to the JavaScript `BigInt` type.
|
||||
#### napi_create_bigint_words
|
||||
<!-- YAML
|
||||
added: v10.7.0
|
||||
napiVersion: 6
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
```C
|
||||
napi_status napi_create_bigint_words(napi_env env,
|
||||
int sign_bit,
|
||||
@@ -2319,10 +2315,9 @@ This API returns the C double primitive equivalent of the given JavaScript
|
||||
#### napi_get_value_bigint_int64
|
||||
<!-- YAML
|
||||
added: v10.7.0
|
||||
napiVersion: 6
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
```C
|
||||
napi_status napi_get_value_bigint_int64(napi_env env,
|
||||
napi_value value,
|
||||
@@ -2347,10 +2342,9 @@ This API returns the C `int64_t` primitive equivalent of the given JavaScript
|
||||
#### napi_get_value_bigint_uint64
|
||||
<!-- YAML
|
||||
added: v10.7.0
|
||||
napiVersion: 6
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
```C
|
||||
napi_status napi_get_value_bigint_uint64(napi_env env,
|
||||
napi_value value,
|
||||
@@ -2375,10 +2369,9 @@ This API returns the C `uint64_t` primitive equivalent of the given JavaScript
|
||||
#### napi_get_value_bigint_words
|
||||
<!-- YAML
|
||||
added: v10.7.0
|
||||
napiVersion: 6
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
```C
|
||||
napi_status napi_get_value_bigint_words(napi_env env,
|
||||
napi_value value,
|
||||
@@ -3189,10 +3182,9 @@ included.
|
||||
#### napi_get_all_property_names
|
||||
<!-- YAML
|
||||
added: REPLACEME
|
||||
napiVersion: 6
|
||||
-->
|
||||
|
||||
> Stability: 1 - Experimental
|
||||
|
||||
```C
|
||||
napi_get_all_property_names(napi_env env,
|
||||
napi_value object,
|
||||
|
||||
+3
-3
@@ -10,7 +10,7 @@
|
||||
#define NAPI_VERSION 2147483647
|
||||
#else
|
||||
// The baseline version for N-API
|
||||
#define NAPI_VERSION 5
|
||||
#define NAPI_VERSION 6
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -699,7 +699,7 @@ NAPI_EXTERN napi_status napi_add_finalizer(napi_env env,
|
||||
|
||||
#endif // NAPI_VERSION >= 5
|
||||
|
||||
#ifdef NAPI_EXPERIMENTAL
|
||||
#if NAPI_VERSION >= 6
|
||||
|
||||
// BigInt
|
||||
NAPI_EXTERN napi_status napi_create_bigint_int64(napi_env env,
|
||||
@@ -745,7 +745,7 @@ napi_get_all_property_names(napi_env env,
|
||||
napi_key_conversion key_conversion,
|
||||
napi_value* result);
|
||||
|
||||
#endif // NAPI_EXPERIMENTAL
|
||||
#endif // NAPI_VERSION >= 6
|
||||
|
||||
EXTERN_C_END
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ typedef struct {
|
||||
const char* release;
|
||||
} napi_node_version;
|
||||
|
||||
#ifdef NAPI_EXPERIMENTAL
|
||||
#if NAPI_VERSION >= 6
|
||||
typedef enum {
|
||||
napi_key_include_prototypes,
|
||||
napi_key_own_only
|
||||
@@ -166,6 +166,6 @@ typedef enum {
|
||||
napi_key_keep_numbers,
|
||||
napi_key_numbers_to_strings
|
||||
} napi_key_conversion;
|
||||
#endif
|
||||
#endif // NAPI_VERSION >= 6
|
||||
|
||||
#endif // SRC_NODE_API_TYPES_H_
|
||||
+3
-2
@@ -113,7 +113,8 @@
|
||||
*/
|
||||
#define NODE_MODULE_VERSION 64
|
||||
|
||||
// the NAPI_VERSION provided by this version of the runtime
|
||||
#define NAPI_VERSION 5
|
||||
// The NAPI_VERSION provided by this version of the runtime. This is the version
|
||||
// which the Node binary being built supports.
|
||||
#define NAPI_VERSION 6
|
||||
|
||||
#endif // SRC_NODE_VERSION_H_
|
||||
@@ -1,5 +1,3 @@
|
||||
#define NAPI_EXPERIMENTAL
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <node_api.h>
|
||||
|
||||
@@ -34,7 +34,7 @@ assert.notStrictEqual(test_general.testGetPrototype(baseObject),
|
||||
|
||||
// test version management functions
|
||||
// expected version is currently 4
|
||||
assert.strictEqual(test_general.testGetVersion(), 5);
|
||||
assert.strictEqual(test_general.testGetVersion(), 6);
|
||||
|
||||
const [ major, minor, patch, release ] = test_general.testGetNodeVersion();
|
||||
assert.strictEqual(process.version.split('-')[0],
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <uv.h>
|
||||
#define NAPI_EXPERIMENTAL
|
||||
#include <node_api.h>
|
||||
#include "../common.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#define NAPI_EXPERIMENTAL
|
||||
#include <node_api.h>
|
||||
#include "../common.h"
|
||||
#include <string.h>
|
||||
|
||||
Reference in new issue
Block a user