diff options
author | Kyle Farnung <kfarnung@microsoft.com> | 2017-12-07 15:01:13 -0800 |
---|---|---|
committer | Kyle Farnung <kfarnung@microsoft.com> | 2018-07-05 10:19:27 -0700 |
commit | 8476053c132fd9613aab547aba165190f8064254 (patch) | |
tree | a48bf5a1d011da1b4cc106876fc8ae345398fca1 /tools | |
parent | a64b2f2b94c018dcfaf2ddb9adffd6dea5082919 (diff) | |
download | android-node-v8-8476053c132fd9613aab547aba165190f8064254.tar.gz android-node-v8-8476053c132fd9613aab547aba165190f8064254.tar.bz2 android-node-v8-8476053c132fd9613aab547aba165190f8064254.zip |
n-api: restrict exports by version
* Move `napi_get_uv_event_loop` into the `NAPI_VERSION >= 2` section
* Move `napi_open_callback_scope`, `napi_close_callback_scope`,
`napi_fatal_exception`, `napi_add_env_cleanup_hook`, and
`napi_remove_env_cleanup_hook` into the `NAPI_VERSION >= 3` section
* Added a missing `added` property to `napi_get_uv_event_loop` in the
docs
* Added a `napiVersion` property to the docs and updated the parser and
generator to use it.
* Added usage documentation
PR-URL: https://github.com/nodejs/node/pull/19962
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/doc/common.js | 4 | ||||
-rw-r--r-- | tools/doc/html.js | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tools/doc/common.js b/tools/doc/common.js index 813935f23b..4dfadd353d 100644 --- a/tools/doc/common.js +++ b/tools/doc/common.js @@ -25,6 +25,10 @@ function extractAndParseYAML(text) { meta.added = arrify(meta.added); } + if (meta.napiVersion) { + meta.napiVersion = arrify(meta.napiVersion); + } + if (meta.deprecated) { // Treat deprecated like added for consistency. meta.deprecated = arrify(meta.deprecated); diff --git a/tools/doc/html.js b/tools/doc/html.js index ae2da58b7a..871a55baf4 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -261,6 +261,10 @@ function parseYAML(text) { html += `${added.description}${deprecated.description}\n`; } + if (meta.napiVersion) { + html += `<span>N-API version: ${meta.napiVersion.join(', ')}</span>\n`; + } + html += '</div>'; return html; } |