Lines Matching +full:node +full:- +full:version
1 # Node.js Node-API version release process
3 This document describes the technical aspects of the Node.js Node-API version
8 * [How to create a release](#how-to-create-a-release)
9 * [0. Pre-release steps](#0-pre-release-steps)
10 * [1. Update the main branch](#1-update-the-main-branch)
11 * [2. Create a new branch for the release](#2-create-a-new-branch-for-the-release)
12 * [3. Update `NODE_API_SUPPORTED_VERSION_MAX`](#3-update-node_api_supported_version_max)
13 * [4. Define `addon_context_register_func`](#4-define-addon_context_register_func)
14 * [5. Update version guards](#5-update-version-guards)
15 * [6. Create release commit](#6-create-release-commit)
16 * [7. Propose release on GitHub](#7-propose-release-on-github)
17 * [8. Ensure that the release branch is stable](#8-ensure-that-the-release-branch-is-stable)
18 * [9. Land the release](#9-land-the-release)
19 * [10. Backport the release](#10-backport-the-release)
25 * Version strings are listed below as _"vx"_ or _"x"_. Substitute for
26 the release version.
27 * Examples will use the integer release version `10`.
29 ### 0. Pre-release steps
31 Before preparing a Node.js Node-API version release, the Node-API Working Group
34 Node-API Working Group can be contacted best by opening up an issue on the
35 [abi-stable-node issue tracker][].
44 $ git reset --hard upstream/main
52 Create a new branch named `node-api-x-proposal`, off the main branch.
55 $ git checkout -b node-api-10-proposal upstream/main
60 Set the version for the proposed release using the following macros, which are
68 > is a fixed constant baseline version of Node-API.
72 For each new version of Node-API an `else if` case must be added to
75 to the new Node-API version.
77 ### 5. Update version guards
79 #### Step 1. Update define version guards
81 If this release includes new Node-APIs that were first released in this
82 version, the relevant commits should already include the `NAPI_EXPERIMENTAL`
83 define guards on the declaration of the new Node-API. Check for these guards
88 -E \
94 and update the define version guards with the release version:
97 - #ifdef NAPI_EXPERIMENTAL
103 - #endif // NAPI_EXPERIMENTAL
112 Also, update the Node-API version value of the `napi_get_version` test in
113 `test/js-native-api/test_general/test.js` with the release version `x`:
116 // Test version management functions
117 - assert.strictEqual(test_general.testGetVersion(), 9);
121 #### Step 2. Update runtime version guards
123 If this release includes runtime behavior version guards, the relevant commits
131 and substitute this guard version with the release version `x`.
133 #### Step 3. Update test version guards
135 If this release includes add-on tests for the new Node-APIs, the relevant
141 -E \
143 test/node-api/*/{*.{h,c},binding.gyp} \
144 test/js-native-api/*/{*.{h,c},binding.gyp}
147 and substitute the `NAPI_EXPERIMENTAL` with the release version
151 - #define NAPI_EXPERIMENTAL
159 If this release includes new Node-APIs that were first released in this
160 version and are necessary to document, the relevant commits should already
161 have documented the new Node-API.
163 For all Node-API functions and types with define guards updated in Step 1,
164 in `doc/api/n-api.md`, add the `napiVersion: x` metadata to the Node-API types
165 and functions that are released in the version, and remove the experimental
170 <!-- YAML
172 - v1.2.3
174 -->
176 - > Stability: 1 - Experimental
181 If this release includes new Node-APIs runtime version guards that were first
182 released in this version and are necessary to document, the relevant commits
185 For all runtime version guards updated in Step 2, check for these definitions
189 grep NAPI_EXPERIMENTAL doc/api/n-api.md
192 In `doc/api/n-api.md`, update the `experimental` change history item to be the
193 released version `x`:
198 - * experimental (`NAPI_EXPERIMENTAL` is defined):
199 + * version 10:
207 node-api: define version x
216 good place to @-mention the relevant contributors.
218 Tag the PR with the `notable-change` label, and @-mention the GitHub team
219 @nodejs/node-api and @nodejs/node-api-implementer.
223 Run a **[`node-test-pull-request`](https://ci.nodejs.org/job/node-test-pull-request/)**
229 See the steps documented in [Collaborator Guide - Landing a PR][] to land the
237 [Collaborator Guide - Landing a PR]: ./collaborator-guide.md#landing-pull-requests
238 [abi-stable-node issue tracker]: https://github.com/nodejs/abi-stable-node/issues
239 [backporting guide]: backporting-to-release-lines.md