Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 54c2bc2

Browse filesBrowse files
Gabriel Schulhofrichardlau
authored andcommitted
n-api: create N-API version 7
Mark `napi_detach_arraybuffer` and `napi_is_detached_arraybuffer` as stable. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: #35199 Backport-PR-URL: #35336 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <mdawson@devrus.com>
1 parent b83f9a5 commit 54c2bc2
Copy full SHA for 54c2bc2

File tree

Expand file treeCollapse file tree

5 files changed

+7
-10
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+7
-10
lines changed
Open diff view settings
Collapse file

‎doc/api/n-api.md‎

Copy file name to clipboardExpand all lines: doc/api/n-api.md
+2-4Lines changed: 2 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2951,10 +2951,9 @@ of the ECMAScript Language Specification.
29512951
### napi_detach_arraybuffer
29522952
<!-- YAML
29532953
added: v10.22.0
2954+
napiVersion: 7
29542955
-->
29552956

2956-
> Stability: 1 - Experimental
2957-
29582957
```C
29592958
napi_status napi_detach_arraybuffer(napi_env env,
29602959
napi_value arraybuffer)
@@ -2977,10 +2976,9 @@ defined in [Section 24.1.1.3][] of the ECMAScript Language Specification.
29772976
### napi_is_detached_arraybuffer
29782977
<!-- YAML
29792978
added: v10.22.0
2979+
napiVersion: 7
29802980
-->
29812981

2982-
> Stability: 1 - Experimental
2983-
29842982
```C
29852983
napi_status napi_is_detached_arraybuffer(napi_env env,
29862984
napi_value arraybuffer,
Collapse file

‎src/node_api.h‎

Copy file name to clipboardExpand all lines: src/node_api.h
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// functions available in a new version of N-API that is not yet ported in all
1616
// LTS versions, they can set NAPI_VERSION knowing that they have specifically
1717
// depended on that version.
18-
#define NAPI_VERSION 6
18+
#define NAPI_VERSION 7
1919
#endif
2020
#endif
2121

@@ -752,7 +752,7 @@ napi_get_all_property_names(napi_env env,
752752

753753
#endif // NAPI_VERSION >= 6
754754

755-
#ifdef NAPI_EXPERIMENTAL
755+
#if NAPI_VERSION >= 7
756756
// ArrayBuffer detaching
757757
NAPI_EXTERN napi_status
758758
napi_detach_arraybuffer(napi_env env,
@@ -762,7 +762,7 @@ NAPI_EXTERN napi_status
762762
napi_is_detached_arraybuffer(napi_env env,
763763
napi_value value,
764764
bool* result);
765-
#endif // NAPI_EXPERIMENTAL
765+
#endif // NAPI_VERSION >= 7
766766

767767
EXTERN_C_END
768768

Collapse file

‎src/node_version.h‎

Copy file name to clipboardExpand all lines: src/node_version.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,6 @@
115115

116116
// The NAPI_VERSION provided by this version of the runtime. This is the version
117117
// which the Node binary being built supports.
118-
#define NAPI_VERSION 6
118+
#define NAPI_VERSION 7
119119

120120
#endif // SRC_NODE_VERSION_H_
Collapse file

‎test/addons-napi/test_general/test.js‎

Copy file name to clipboardExpand all lines: test/addons-napi/test_general/test.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ assert.notStrictEqual(test_general.testGetPrototype(baseObject),
3434

3535
// test version management functions
3636
// expected version is currently 4
37-
assert.strictEqual(test_general.testGetVersion(), 6);
37+
assert.strictEqual(test_general.testGetVersion(), 7);
3838

3939
const [ major, minor, patch, release ] = test_general.testGetNodeVersion();
4040
assert.strictEqual(process.version.split('-')[0],
Collapse file

‎test/addons-napi/test_typedarray/test_typedarray.c‎

Copy file name to clipboardExpand all lines: test/addons-napi/test_typedarray/test_typedarray.c
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#define NAPI_EXPERIMENTAL
21
#include <node_api.h>
32
#include <string.h>
43
#include "../common.h"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.