From 71c7a512efc37f807230ed64993cc39dd65ee1d7 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 13 Jul 2020 16:44:06 -0400 Subject: [PATCH 1/9] doc: clarify N-API version 1 Refs: /~https://github.com/nodejs/node-addon-api/issues/760 Clarify which version of 8.x in which N-API version 1 matches the shape in later versions like 10.x Signed-off-by: Michael Dawson --- doc/api/n-api.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 10da5043e2fa14..add0c961374e28 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -240,18 +240,23 @@ from version 3 with some additions. This means that it is not necessary to recompile for new versions of Node.js which are listed as supporting a later version. -| | 1 | 2 | 3 | 4 | 5 | 6 | -|-------|---------|----------|----------|----------|-----------|-----------| -| v6.x | | | v6.14.2* | | | | -| v8.x | v8.0.0* | v8.10.0* | v8.11.2 | v8.16.0 | | | -| v9.x | v9.0.0* | v9.3.0* | v9.11.0* | | | | -| v10.x | v10.0.0 | v10.0.0 | v10.0.0 | v10.16.0 | v10.17.0 | v10.20.0 | -| v11.x | v11.0.0 | v11.0.0 | v11.0.0 | v11.8.0 | | | -| v12.x | v12.0.0 | v12.0.0 | v12.0.0 | v12.0.0 | v12.11.0 | v12.17.0 | -| v13.x | v13.0.0 | v13.0.0 | v13.0.0 | v13.0.0 | v13.0.0 | | -| v14.x | v14.0.0 | v14.0.0 | v14.0.0 | v14.0.0 | v14.0.0 | v14.0.0 | +| | 1 | 2 | 3 | 4 | 5 | 6 | +|-------|----------|----------|----------|----------|-----------|-----------| +| v6.x | | | v6.14.2* | | | | +| v8.x | v8.7.0** | v8.10.0* | v8.11.2 | v8.16.0 | | | +| v9.x | v9.0.0* | v9.3.0* | v9.11.0* | | | | +| v10.x | v10.0.0 | v10.0.0 | v10.0.0 | v10.16.0 | v10.17.0 | v10.20.0 | +| v11.x | v11.0.0 | v11.0.0 | v11.0.0 | v11.8.0 | | | +| v12.x | v12.0.0 | v12.0.0 | v12.0.0 | v12.0.0 | v12.11.0 | v12.17.0 | +| v13.x | v13.0.0 | v13.0.0 | v13.0.0 | v13.0.0 | v13.0.0 | | +| v14.x | v14.0.0 | v14.0.0 | v14.0.0 | v14.0.0 | v14.0.0 | v14.0.0 | \* Indicates that the N-API version was released as experimental +\** First version which matches version 1 in later releases. While v8.0.0 + included N-API as experimental, version 1 continued to evolve until +v8.7.0 and therefore the shape of the API in earlier versions is not +trully version 1 (in hindsight we should have called it version 0). The +general recommendation is to use version 3 or later. The N-APIs associated strictly with accessing ECMAScript features from native code can be found separately in `js_native_api.h` and `js_native_api_types.h`. From 6904325d7d59041128087813466f75b0ee5915c5 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 13 Jul 2020 16:49:16 -0400 Subject: [PATCH 2/9] squash: fixup formatting of note --- doc/api/n-api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index add0c961374e28..507dd3b13f71aa 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -252,7 +252,8 @@ listed as supporting a later version. | v14.x | v14.0.0 | v14.0.0 | v14.0.0 | v14.0.0 | v14.0.0 | v14.0.0 | \* Indicates that the N-API version was released as experimental -\** First version which matches version 1 in later releases. While v8.0.0 + +\*\* First version which matches version 1 in later releases. While v8.0.0 included N-API as experimental, version 1 continued to evolve until v8.7.0 and therefore the shape of the API in earlier versions is not trully version 1 (in hindsight we should have called it version 0). The From 9455cdc3bd3d57e020428b388012a9aa7da27d9f Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Thu, 16 Jul 2020 18:41:32 -0400 Subject: [PATCH 3/9] Update doc/api/n-api.md Co-authored-by: Anna Henningsen --- doc/api/n-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 507dd3b13f71aa..1b32c13acfa101 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -256,7 +256,7 @@ listed as supporting a later version. \*\* First version which matches version 1 in later releases. While v8.0.0 included N-API as experimental, version 1 continued to evolve until v8.7.0 and therefore the shape of the API in earlier versions is not -trully version 1 (in hindsight we should have called it version 0). The +truly version 1 (in hindsight we should have called it version 0). The general recommendation is to use version 3 or later. The N-APIs associated strictly with accessing ECMAScript features from native From 4bc4c139ffeb9c47072f4cc200db6377ea0a9c39 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Thu, 16 Jul 2020 18:43:32 -0400 Subject: [PATCH 4/9] Update doc/api/n-api.md --- doc/api/n-api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 1b32c13acfa101..69356ec6af8f85 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -256,7 +256,8 @@ listed as supporting a later version. \*\* First version which matches version 1 in later releases. While v8.0.0 included N-API as experimental, version 1 continued to evolve until v8.7.0 and therefore the shape of the API in earlier versions is not -truly version 1 (in hindsight we should have called it version 0). The +truly version 1 (in hindsight we should have called it version 0). +We recommend version 3 or later. general recommendation is to use version 3 or later. The N-APIs associated strictly with accessing ECMAScript features from native From 6713a61f5bf7d2ac556a120dde1bd119fa54c8a9 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Thu, 16 Jul 2020 18:52:07 -0400 Subject: [PATCH 5/9] Update doc/api/n-api.md --- doc/api/n-api.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 69356ec6af8f85..86c784dc07887a 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -258,7 +258,6 @@ listed as supporting a later version. v8.7.0 and therefore the shape of the API in earlier versions is not truly version 1 (in hindsight we should have called it version 0). We recommend version 3 or later. -general recommendation is to use version 3 or later. The N-APIs associated strictly with accessing ECMAScript features from native code can be found separately in `js_native_api.h` and `js_native_api_types.h`. From 7d81104651037e5db8a5a0e03dfbb7c3a602c17f Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 20 Jul 2020 17:28:18 -0400 Subject: [PATCH 6/9] Update doc/api/n-api.md --- doc/api/n-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 86c784dc07887a..a6bae6378195e1 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -256,7 +256,7 @@ listed as supporting a later version. \*\* First version which matches version 1 in later releases. While v8.0.0 included N-API as experimental, version 1 continued to evolve until v8.7.0 and therefore the shape of the API in earlier versions is not -truly version 1 (in hindsight we should have called it version 0). +truly version 1 (in hindsight we should have called it version 0). We recommend version 3 or later. The N-APIs associated strictly with accessing ECMAScript features from native From c9ad6f169e19e60b4bd5bea4935039674800a5ec Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Tue, 21 Jul 2020 16:05:54 -0400 Subject: [PATCH 7/9] Update doc/api/n-api.md Co-authored-by: Gabriel Schulhof --- doc/api/n-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index a6bae6378195e1..b1a8c61ee566ef 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -254,7 +254,7 @@ listed as supporting a later version. \* Indicates that the N-API version was released as experimental \*\* First version which matches version 1 in later releases. While v8.0.0 - included N-API as experimental, version 1 continued to evolve until +included N-API as experimental, version 1 continued to evolve until v8.7.0 and therefore the shape of the API in earlier versions is not truly version 1 (in hindsight we should have called it version 0). We recommend version 3 or later. From 127f15335696578d31677fcc45998f4c599c0c4b Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Wed, 22 Jul 2020 15:04:57 -0400 Subject: [PATCH 8/9] Update doc/api/n-api.md --- doc/api/n-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index b1a8c61ee566ef..eef1c6a190e05d 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -243,7 +243,7 @@ listed as supporting a later version. | | 1 | 2 | 3 | 4 | 5 | 6 | |-------|----------|----------|----------|----------|-----------|-----------| | v6.x | | | v6.14.2* | | | | -| v8.x | v8.7.0** | v8.10.0* | v8.11.2 | v8.16.0 | | | +| v8.x | v8.6.0** | v8.10.0* | v8.11.2 | v8.16.0 | | | | v9.x | v9.0.0* | v9.3.0* | v9.11.0* | | | | | v10.x | v10.0.0 | v10.0.0 | v10.0.0 | v10.16.0 | v10.17.0 | v10.20.0 | | v11.x | v11.0.0 | v11.0.0 | v11.0.0 | v11.8.0 | | | From 2ece38b05f2f440c93ca39d3bf663708eec557e3 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Wed, 29 Jul 2020 18:16:18 -0400 Subject: [PATCH 9/9] Update doc/api/n-api.md Co-authored-by: Gabriel Schulhof --- doc/api/n-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index eef1c6a190e05d..44d6eb8919620f 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -255,7 +255,7 @@ listed as supporting a later version. \*\* First version which matches version 1 in later releases. While v8.0.0 included N-API as experimental, version 1 continued to evolve until -v8.7.0 and therefore the shape of the API in earlier versions is not +v8.6.0 and therefore the shape of the API in earlier versions is not truly version 1 (in hindsight we should have called it version 0). We recommend version 3 or later.