summaryrefslogtreecommitdiff
path: root/doc/api/n-api.md
AgeCommit message (Collapse)Author
2019-12-05doc: improve napi formattingRuben Bridgewater
This addresses two nits: 1. Bullet points that span over multiple lines should be indented consitently. Otherwise they are not always properly highlighted. 2. Lines breaks after titles improve the readability. PR-URL: https://github.com/nodejs/node/pull/30772 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-04doc: fix up N-API docNickNaso
PR-URL: https://github.com/nodejs/node/pull/30656 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2019-12-032019-12-03, Version 13.3.0 (Current)Ruben Bridgewater
Notable changes: * fs: * Reworked experimental recursive `rmdir()` (cjihrig) https://github.com/nodejs/node/pull/30644 * The `maxBusyTries` option is renamed to `maxRetries`, and its default is set to 0. The `emfileWait` option has been removed, and `EMFILE` errors use the same retry logic as other errors. The `retryDelay` option is now supported. `ENFILE` errors are now retried. * http: * Make maximum header size configurable per-stream or per-server (Anna Henningsen) https://github.com/nodejs/node/pull/30570 * http2: * Make maximum tolerated rejected streams configurable (Denys Otrishko) https://github.com/nodejs/node/pull/30534 * Allow to configure maximum tolerated invalid frames (Denys Otrishko) https://github.com/nodejs/node/pull/30534 * wasi: * Introduce initial WASI support (cjihrig) https://github.com/nodejs/node/pull/30258 PR-URL: https://github.com/nodejs/node/pull/30774
2019-11-30doc,n-api: mark napi_detach_arraybuffer as experimentallegendecas
As its actual release stage. PR-URL: https://github.com/nodejs/node/pull/30703 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2019-11-28n-api: implement napi_is_detached_arraybufferDenys Otrishko
This implements ArrayBuffer#IsDetachedBuffer operation as per ECMAScript specification Section 24.1.1.2 https://tc39.es/ecma262/#sec-isdetachedbuffer Closes: https://github.com/nodejs/node/issues/29955 PR-URL: https://github.com/nodejs/node/pull/30613 Fixes: https://github.com/nodejs/node/issues/29955 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-11-12doc: fix up N-API docMichael Dawson
* Add missing N-API version info * Fix N-API version info for napi_extended_error_info PR-URL: https://github.com/nodejs/node/pull/30254 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-10-26doc: remove "it is important to" phrasingRich Trott
Instead of telling someone "It is important to do X", just tell them to "Do X." PR-URL: https://github.com/nodejs/node/pull/30108 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-10-26doc,n-api: sort bottom-of-the-page referencesGabriel Schulhof
Use `tail -n 102 doc/api/n-api.md | LC_ALL=C sort -u` to establish a systematic order for the references. PR-URL: https://github.com/nodejs/node/pull/30124 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: legendecas <legendecas@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-10-26doc: remove dashesRich Trott
The use of dashes -- in general, but especially in our docs -- can be problematic. It is used inconsistently and there is always another form of punctuation that is as good or better for the situation. In an effort to reduce the number of variations we use to display the same types of information, remove the various uses of dashes from the documentation. PR-URL: https://github.com/nodejs/node/pull/30101 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-10-25n-api,doc: add info about building n-api addonsJim Schlight
Adds information about tools available for building N-API addons. Fixes: https://github.com/nodejs/abi-stable-node/issues/384 PR-URL: https://github.com/nodejs/node/pull/30032 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-10-222019-10-22, Version 10.17.0 'Dubnium' (LTS)Beth Griggs
Notable changes: * crypto: * add support for chacha20-poly1305 for AEAD (chux0519) https://github.com/nodejs/node/pull/24081 * increase maxmem range from 32 to 53 bits (Tobias Nießen) https://github.com/nodejs/node/pull/28799 * deps: * update npm to 6.11.3 (claudiahdz) https://github.com/nodejs/node/pull/29430 * upgrade openssl sources to 1.1.1d (Sam Roberts) https://github.com/nodejs/node/pull/29921 * dns: * remove dns.promises experimental warning (cjihrig) https://github.com/nodejs/node/pull/26592 * fs: * remove experimental warning for fs.promises (Anna Henningsen) https://github.com/nodejs/node/pull/26581 * http: * makes response.writeHead return the response (Mark S. Everitt) https://github.com/nodejs/node/pull/25974 * http2: * makes response.writeHead return the response (Mark S. Everitt) https://github.com/nodejs/node/pull/25974 * n-api: * make func argument of napi\_create\_threadsafe\_function optional (legendecas) https://github.com/nodejs/node/pull/27791 * mark version 5 N-APIs as stable (Gabriel Schulhof) https://github.com/nodejs/node/pull/29401 * implement date object (Jarrod Connolly) https://github.com/nodejs/node/pull/25917 * process: * add --unhandled-rejections flag (Ruben Bridgewater) https://github.com/nodejs/node/pull/26599 * stream: * implement Readable.from async iterator utility (Guy Bedford) https://github.com/nodejs/node/pull/27660 * make Symbol.asyncIterator support stable (Matteo Collina) https://github.com/nodejs/node/pull/26989 PR-URL: https://github.com/nodejs/node/pull/29875
2019-10-222019-10-22, Version 13.0.0 (Current)Beth Griggs
Notable changes: * assert: * If the validation function passed to `assert.throws()` or `assert.rejects()` returns a value other than `true`, an assertion error will be thrown instead of the original error to highlight the programming mistake (Ruben Bridgewater). https://github.com/nodejs/node/pull/28263 * If a constructor function is passed to validate the instance of errors thrown in `assert.throws()` or `assert.reject()`, an assertion error will be thrown instead of the original error (Ruben Bridgewater). https://github.com/nodejs/node/pull/28263 * build: * Node.js releases are now built with default full-icu support. This means that all locales supported by ICU are now included and Intl-related APIs may return different values than before (Richard Lau). https://github.com/nodejs/node/pull/29887 * The minimum Xcode version supported for macOS was increased to 10. It is still possible to build Node.js with Xcode 8 but this may no longer be the case in a future v13.x release (Michael Dawson). https://github.com/nodejs/node/pull/29622 * child_process: * `ChildProcess._channel` (DEP0129) is now a Runtime deprecation (cjihrig). https://github.com/nodejs/node/pull/27949 * console: * The output `console.timeEnd()` and `console.timeLog()` will now automatically select a suitable time unit instead of always using milliseconds (Xavier Stouder). https://github.com/nodejs/node/pull/29251 * deps: * The V8 engine was updated to version 7.8. This includes performance improvements to object destructuring, memory usage and WebAssembly startup time (Myles Borins). https://github.com/nodejs/node/pull/29694) * domain: * The domain's error handler is now executed with the active domain set to the domain's parent to prevent inner recursion (Julien Gilli). https://github.com/nodejs/node/pull/26211 * fs: * The undocumented method `FSWatcher.prototype.start()` was removed (Lucas Holmquist). https://github.com/nodejs/node/pull/29905 * Calling the `open()` method on a `ReadStream` or `WriteStream` now emits a runtime deprecation warning. The methods are supposed to be internal and should not be called by user code (Robert Nagy). https://github.com/nodejs/node/pull/29061 * `fs.read/write`, `fs.readSync/writeSync` and `fd.read/write` now accept any safe integer as their `offset` parameter. The value of `offset` is also no longer coerced, so a valid type must be passed to the functions (Zach Bjornson). https://github.com/nodejs/node/pull/26572 * http: * Aborted requests no longer emit the `end` or `error` events after `aborted` (Robert Nagy). https://github.com/nodejs/node/pull/27984 https://github.com/nodejs/node/pull/20077 * Data will no longer be emitted after a socket error (Robert Nagy). https://github.com/nodejs/node/pull/28711 * The legacy HTTP parser (previously available under the `--http-parser=legacy` flag) was removed (Anna Henningsen). https://github.com/nodejs/node/pull/29589 * The `host` option for HTTP requests is now validated to be a string value (Giorgos Ntemiris). https://github.com/nodejs/node/pull/29568 * The `request.connection` and `response.connection` properties are now runtime deprecated. The equivalent `request.socket` and `response.socket` should be used instead (Robert Nagy). https://github.com/nodejs/node/pull/29015 * http, http2: * The default server timeout was removed (Ali Ijaz Sheikh). https://github.com/nodejs/node/pull/27558 * Brought 425 status code name into accordance with RFC 8470. The name changed from "Unordered Collection" to "Too Early" (Sergei Osipov). https://github.com/nodejs/node/pull/29880 * lib: * The `error.errno` property will now always be a number. To get the string value, use `error.code` instead (Joyee Cheung). https://github.com/nodejs/node/pull/28140 * module: * `module.createRequireFromPath()` is deprecated. Use `module.createRequire()` instead (cjihrig). https://github.com/nodejs/node/pull/27951 * src: * Changing the value of `process.env.TZ` will now clear the tz cache. This affects the default time zone used by methods such as `Date.prototype.toString` (Ben Noordhuis). https://github.com/nodejs/node/pull/20026 * stream: * The timing and behavior of streams was consolidated for a number of edge cases. Please look at the individual commits below for more information. PR-URL: https://github.com/nodejs/node/pull/29504
2019-10-15doc: remove unused Markdown reference linksNick Schonning
PR-URL: https://github.com/nodejs/node/pull/29961 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-10-14n-api: add `napi_detach_arraybuffer`legendecas
As ArrayBuffer#detach is an ecma spec operation ([Section 24.1.1.3](https://tc39.es/ecma262/#sec-detacharraybuffer)), it might be good to have it in N-API. Fixes https://github.com/nodejs/node/issues/29674 PR-URL: https://github.com/nodejs/node/pull/29768 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
2019-10-11doc: add brackets to implicit markdown linksNick Schonning
PR-URL: https://github.com/nodejs/node/pull/29911 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-10-03doc: reuse link indexes for n-api.mdlegendecas
PR-URL: https://github.com/nodejs/node/pull/29787 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-10-03n-api,doc: clarify napi_finalize related APIslegendecas
All these APIs have napi_finalize parameter but they don't behave exactly the same. Fixes: https://github.com/nodejs/node/issues/29750 PR-URL: https://github.com/nodejs/node/pull/29797 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-09-26doc: remove align from tablesXhmikosR
This is obsolete. Also, in our case it doesn't seem to have any effect since the table cells have their natural width, i.e. as much as they need. PR-URL: https://github.com/nodejs/node/pull/29668 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
2019-09-262019-09-24, Version 12.11.0 (Current)Ruben Bridgewater
Notable changes: * crypto: * Add `oaepLabel` option https://github.com/nodejs/node/pull/29489 * deps: * Update V8 to 7.7.299.11 https://github.com/nodejs/node/pull/28918 * More efficient memory handling * Stack trace serialization got faster * The `Intl.NumberFormat` API gained new functionality * For more information: https://v8.dev/blog/v8-release-77 * events: * Add support for `EventTarget` in `once` https://github.com/nodejs/node/pull/29498 * fs: * Expose memory file mapping flag `UV_FS_O_FILEMAP` https://github.com/nodejs/node/pull/29260 * inspector: * New API - `Session.connectToMainThread` https://github.com/nodejs/node/pull/28870 * process: * Initial SourceMap support via `env.NODE_V8_COVERAGE` https://github.com/nodejs/node/pull/28960 * stream: * Make `_write()` optional when `_writev()` is implemented https://github.com/nodejs/node/pull/29639 * tls: * Add option to override signature algorithms https://github.com/nodejs/node/pull/29598 * util: * Add `encodeInto` to `TextEncoder` https://github.com/nodejs/node/pull/29524 * worker: * The `worker_thread` module is now stable https://github.com/nodejs/node/pull/29512 PR-URL: https://github.com/nodejs/node/pull/29695
2019-09-17doc: add leap second behavior notes for napi methodsLevhita
napi_create_date and napi_get_date_value ignore leap seconds as per ECMAScript spec that follows POSIX spec for time, comments added to the documentation where added fo clarify it. PR-URL: https://github.com/nodejs/node/pull/29569 Fixes: https://github.com/nodejs/node/issues/29439 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-09-16doc: use consistent unordered list styleNick Schonning
Convert to asterisks when there are mixed styles in document. Addresses Markdownlint MD004 rule PR-URL: https://github.com/nodejs/node/pull/29516 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-10doc: indent child list items for remark-lintNick Schonning
Child items not aligned to parent are flagged by list-item-bullet-indent PR-URL: https://github.com/nodejs/node/pull/29488 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-09doc: space around listsNick Schonning
Address markdownlint rule MD032. Flagged a few mixed list styles. PR-URL: https://github.com/nodejs/node/pull/29467 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-07doc: update N-API version matrixGabriel Schulhof
PR-URL: https://github.com/nodejs/node/pull/29461 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-06doc: simplify wording in n-api docMichael Dawson
Simplify/clarify wording documenting n-api execute callback. PR-URL: https://github.com/nodejs/node/pull/29441 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-05n-api: mark version 5 N-APIs as stableGabriel Schulhof
PR-URL: https://github.com/nodejs/node/pull/29401 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-09-03doc: start unorded lists at start of lineNick Schonning
Address Markdownlint MD006 rule. Can flag when list items aren't indented far enough. PR-URL: https://github.com/nodejs/node/pull/29390 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-31doc: add blanks around code fencesNick Schonning
Addresses Markdownlint MD031 rule warnings PR-URL: https://github.com/nodejs/node/pull/29366 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: David Carlier <devnexen@gmail.com>
2019-08-31doc: remove multiple consecutive blank linesNick Schonning
These are rendered as single breaks. Addresses Markdownlint MD012 rule. PR-URL: https://github.com/nodejs/node/pull/29352 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-08-072019-08-06, Version 12.8.0 (Current)Ruben Bridgewater
Notable changes: * assert: * Legacy mode deprecation (`DEP0089`) is revoked (Colin Ihrig) https://github.com/nodejs/node/pull/28892 * crypto: * The `outputLength` option is added to `crypto.createHash` (Tobias Nießen) https://github.com/nodejs/node/pull/28805 * The `maxmem` range is increased from 32 to 53 bits (Tobias Nießen) https://github.com/nodejs/node/pull/28799 * n-api: * Added APIs for per-instance state management (Gabriel Schulhof) https://github.com/nodejs/node/pull/28682 * report: * Network interfaces get included in the report (cjihrig) https://github.com/nodejs/node/pull/28911 * src: * `v8.getHeapCodeStatistics()` is now exported (Yuriy Vasiyarov) https://github.com/nodejs/node/pull/27978 PR-URL: https://github.com/nodejs/node/pull/29017
2019-08-03doc: remove use of youMichael Dawson
We generally avoid the use of 'you'. PR-URL: https://github.com/nodejs/node/pull/28919 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-25n-api: add APIs for per-instance state managementGabriel Schulhof
Adds `napi_set_instance_data()` and `napi_get_instance_data()`, which allow native addons to store their data on and retrieve their data from `napi_env`. `napi_set_instance_data()` accepts a finalizer which is called when the `node::Environment()` is destroyed. This entails rendering the `napi_env` local to each add-on. Fixes: https://github.com/nodejs/abi-stable-node/issues/378 PR-URL: https://github.com/nodejs/node/pull/28682 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-07-20doc: amplify warning for execute callbackMichael Dawson
Add specific recommendation not to use the to the napi-env parameter in napi_async_execute_callback PR-URL: https://github.com/nodejs/node/pull/28738 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-15doc: update js-native-api exampleGabriel Schulhof
Update example that shows how to separate N-API code which is not Node.js-specific from code which defines a Node.js N-API addon. In its existing state the example uses the pattern ```C assert(napi_*() == napi_ok); ``` However, this would result in no N-API calls when building with `-DNDEBUG`. This change moves away from assert and uses a macro `NAPI_CALL()` which throws the string corresponding to the non-`napi_ok` status as a JS exception and short-circuits the binding by returning `NULL`. PR-URL: https://github.com/nodejs/node/pull/28657 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-14doc: mark N-API thread-safe function stableGabriel Schulhof
The various TSFN APIs are marked as stable, but the TSFN heading itself is still marked as experimental. PR-URL: https://github.com/nodejs/node/pull/28643 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-032019-07-03, Version 12.6.0 (Current)Michaël Zasso
Notable changes: * build: * Experimental support for building Node.js on MIPS architecture is back. https://github.com/nodejs/node/pull/27992 * child_process: * The promisified versions of `child_process.exec` and `child_process.execFile` now both return a `Promise` which has the child instance attached to their `child` property. https://github.com/nodejs/node/pull/28325 * deps: * Updated libuv to 1.30.1. https://github.com/nodejs/node/pull/28449, https://github.com/nodejs/node/pull/28511 * Support for the Haiku platform has been added. * The maximum `UV_THREADPOOL_SIZE` has been increased from 128 to 1024. * `uv_fs_copyfile()` now works properly when the source and destination files are the same. * process: * A new method, `process.resourceUsage()` was added. It returns resource usage for the current process, such as CPU time. https://github.com/nodejs/node/pull/28018 * src: * Fixed an issue related to stdio that could lead to a crash of the process in some circumstances. https://github.com/nodejs/node/pull/28490 * stream: * Added a `writableFinished` property to writable streams. It indicates that all the data has been flushed to the underlying system. https://github.com/nodejs/node/pull/28007 * worker: * Fixed an issue that prevented worker threads to listen for data on stdin. https://github.com/nodejs/node/pull/28153 * meta: * Added Jiawen Geng (https://github.com/gengjiawen) to collaborators. https://github.com/nodejs/node/pull/28322 PR-URL: https://github.com/nodejs/node/pull/28508
2019-06-25doc: remove N-API version for Experimental APIsMichael Dawson
Experimental APIs should not have an N-API version specified. Remove cases were one had been added incorrectly. PR-URL: https://github.com/nodejs/node/pull/28330 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-24doc,n-api: fix metadata for napi_create_threadsafe_functionRichard Lau
PR-URL: https://github.com/nodejs/node/pull/28410 Refs: https://github.com/nodejs/node/pull/27791 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-06-22doc: format ECMA-262 with a hyphencjihrig
PR-URL: https://github.com/nodejs/node/pull/28309 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-21n-api: make func argument of napi_create_threadsafe_function optionallegendecas
PR-URL: https://github.com/nodejs/node/pull/27791 Refs: https://github.com/nodejs/node/issues/27592 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
2019-06-13doc,n-api: fix typoRichard Lau
PR-URL: https://github.com/nodejs/node/pull/28178 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-11doc: clarify N-API version MatrixMichael Dawson
I was asked by a community member if they needed to recompile for v12.x based on the version matrix. Add additional context to help ensure it is clear that this is not the case. PR-URL: https://github.com/nodejs/node/pull/27942 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Christopher Hiller <boneskull@boneskull.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-282019-05-28, Version 10.16.0 'Dubnium' (LTS)Beth Griggs
Notable changes: - **deps**: - update ICU to 64.2 (Ujjwal Sharma) [#27361](https://github.com/nodejs/node/pull/27361) - upgrade npm to 6.9.0 (Kat Marchán) [#26244](https://github.com/nodejs/node/pull/26244) - upgrade openssl sources to 1.1.1b (Sam Roberts) [#26327](https://github.com/nodejs/node/pull/26327) - upgrade to libuv 1.28.0 (cjihrig) [#27241](https://github.com/nodejs/node/pull/27241) - **events**: - add once method to use promises with EventEmitter (Matteo Collina) [#26078](https://github.com/nodejs/node/pull/26078) - **n-api**: - mark thread-safe function as stable (Gabriel Schulhof) [#25556](https://github.com/nodejs/node/pull/25556) - **repl**: - support top-level for-await-of (Shelley Vohr) [#23841](https://github.com/nodejs/node/pull/23841) - **zlib**: - add brotli support (Anna Henningsen) [#24938](https://github.com/nodejs/node/pull/24938) PR-URL: https://github.com/nodejs/node/pull/27514
2019-05-26doc: update n-api support matrixteams2ua
As thread safe functions were back-ported to 8.x and released in 8.16 the documentation should be updated as well. PR-URL: https://github.com/nodejs/node/pull/27567 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-25doc: add version info for typesMichael Dawson
Add version info for types in N-API doc. PR-URL: https://github.com/nodejs/node/pull/27754 Fixes: https://github.com/nodejs/node/issues/27486 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-25doc,n-api: fix typo in N-API introductionRichard Lau
PR-URL: https://github.com/nodejs/node/pull/27833 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-19doc: remove stability highlight for stable functionsMichael Dawson
We don't have the stability functions for all stable functions, only those that were previously experimental and then when stable. Remove the stability indicator to be consistent with the rest of the functions. PR-URL: https://github.com/nodejs/node/pull/27753 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-19doc,n-api: update N-API version matrix for v12.xRichard Lau
PR-URL: https://github.com/nodejs/node/pull/27745 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-05-19doc,n-api: fix `introduced_in` metadataRichard Lau
Node.js v7.10.0 did not contain N-API. Update the `introduced_in` metadata to prevent a broken 7.x "View another version" link in the N-API docs. PR-URL: https://github.com/nodejs/node/pull/27745 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-05-13doc: add call-once note to napi_queue_async_workGabriel Schulhof
Add note to `napi_queue_async_work()` indicating that, upon successful return, it must not be called again with the same work item. Fixes: https://github.com/nodejs/node/issues/27217 PR-URL: https://github.com/nodejs/node/pull/27582 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>