diff --git a/CHANGELOG.md b/CHANGELOG.md
index ae8b483e0d7f1f..e7894b31ee6e75 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,7 +32,8 @@ release.
-15.1.0
+15.2.0
+15.1.0
15.0.1
15.0.0
|
diff --git a/README.md b/README.md
index bb31540bc0eb41..2d0e58655810a9 100644
--- a/README.md
+++ b/README.md
@@ -602,7 +602,8 @@ Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys):
* **Shelley Vohr** <shelley.vohr@gmail.com>
`B9E2F5981AA6E0CD28160D9FF13993A75599653C`
-To import the full set of trusted release keys:
+To import the full set of trusted release keys (including subkeys possibly used
+to sign releases):
```bash
gpg --keyserver pool.sks-keyservers.net --recv-keys 4ED778F539E3634C779C87C6D7062848A1AB005C
diff --git a/benchmark/fixtures/require-builtins.js b/benchmark/fixtures/require-builtins.js
index a100e9efd0cae5..685eef1875b301 100644
--- a/benchmark/fixtures/require-builtins.js
+++ b/benchmark/fixtures/require-builtins.js
@@ -17,7 +17,6 @@ const list = [
'http',
'http2',
'https',
- 'inspector',
'module',
'net',
'os',
@@ -32,7 +31,6 @@ const list = [
'string_decoder',
'timers',
'tls',
- 'trace_events',
'tty',
'url',
'util',
diff --git a/benchmark/napi/type-tag-check/.gitignore b/benchmark/napi/type-tag-check/.gitignore
new file mode 100644
index 00000000000000..567609b1234a9b
--- /dev/null
+++ b/benchmark/napi/type-tag-check/.gitignore
@@ -0,0 +1 @@
+build/
diff --git a/benchmark/napi/type-tag/.gitignore b/benchmark/napi/type-tag/.gitignore
new file mode 100644
index 00000000000000..567609b1234a9b
--- /dev/null
+++ b/benchmark/napi/type-tag/.gitignore
@@ -0,0 +1 @@
+build/
diff --git a/common.gypi b/common.gypi
index 33b1325eb513ea..4745bb5ac77639 100644
--- a/common.gypi
+++ b/common.gypi
@@ -36,7 +36,7 @@
# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
- 'v8_embedder_string': '-node.16',
+ 'v8_embedder_string': '-node.17',
##### V8 defaults for Node.js #####
diff --git a/configure.py b/configure.py
index d68d8fc96abeb7..eb78598d9d32f0 100755
--- a/configure.py
+++ b/configure.py
@@ -1761,7 +1761,8 @@ def configure_section_file(o):
proc = subprocess.Popen(['ld.gold'] + ['-v'], stdin = subprocess.PIPE,
stdout = subprocess.PIPE, stderr = subprocess.PIPE)
except OSError:
- warn('''No acceptable ld.gold linker found!''')
+ if options.node_section_ordering_info != "":
+ warn('''No acceptable ld.gold linker found!''')
return 0
match = re.match(r"^GNU gold.*([0-9]+)\.([0-9]+)$",
diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h
index 0991d0ab6e4132..261d3b3f06064d 100644
--- a/deps/v8/include/v8.h
+++ b/deps/v8/include/v8.h
@@ -5020,6 +5020,13 @@ class V8_EXPORT BackingStore : public v8::internal::BackingStoreBase {
*/
bool IsShared() const;
+ /**
+ * Prevent implicit instantiation of operator delete with size_t argument.
+ * The size_t argument would be incorrect because ptr points to the
+ * internal BackingStore object.
+ */
+ void operator delete(void* ptr) { ::operator delete(ptr); }
+
/**
* Wrapper around ArrayBuffer::Allocator::Reallocate that preserves IsShared.
* Assumes that the backing_store was allocated by the ArrayBuffer allocator
diff --git a/deps/zlib/contrib/optimizations/chunkcopy.h b/deps/zlib/contrib/optimizations/chunkcopy.h
index 38ba0ed8a27f45..8bcdadad05a817 100644
--- a/deps/zlib/contrib/optimizations/chunkcopy.h
+++ b/deps/zlib/contrib/optimizations/chunkcopy.h
@@ -29,6 +29,7 @@
#include
typedef uint8x16_t z_vec128i_t;
#elif defined(INFLATE_CHUNK_SIMD_SSE2)
+#pragma GCC target ("sse2")
#include
typedef __m128i z_vec128i_t;
#else
diff --git a/deps/zlib/fill_window_sse.c b/deps/zlib/fill_window_sse.c
index ed1e5d1d6735b1..e19154bc14d238 100644
--- a/deps/zlib/fill_window_sse.c
+++ b/deps/zlib/fill_window_sse.c
@@ -9,6 +9,7 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
+#pragma GCC target ("sse2")
#include
#include "deflate.h"
diff --git a/doc/api/crypto.md b/doc/api/crypto.md
index e42051d4efca8e..eadd5453614c51 100644
--- a/doc/api/crypto.md
+++ b/doc/api/crypto.md
@@ -1458,6 +1458,11 @@ changes:
- version: v15.0.0
pr-url: https://github.com/nodejs/node/pull/35093
description: The privateKey can also be an ArrayBuffer and CryptoKey.
+ - version:
+ - v13.2.0
+ - v12.16.0
+ pr-url: https://github.com/nodejs/node/pull/29292
+ description: This function now supports IEEE-P1363 DSA and ECDSA signatures.
- version: v12.0.0
pr-url: https://github.com/nodejs/node/pull/26960
description: This function now supports RSA-PSS keys.
@@ -1576,6 +1581,11 @@ changes:
- version: v15.0.0
pr-url: https://github.com/nodejs/node/pull/35093
description: The object can also be an ArrayBuffer and CryptoKey.
+ - version:
+ - v13.2.0
+ - v12.16.0
+ pr-url: https://github.com/nodejs/node/pull/29292
+ description: This function now supports IEEE-P1363 DSA and ECDSA signatures.
- version: v12.0.0
pr-url: https://github.com/nodejs/node/pull/26960
description: This function now supports RSA-PSS keys.
@@ -3314,6 +3324,12 @@ Throws an error if FIPS mode is not available.
### `crypto.sign(algorithm, data, key)`
@@ -3380,6 +3396,11 @@ changes:
- version: v15.0.0
pr-url: https://github.com/nodejs/node/pull/35093
description: The data, key, and signature arguments can also be ArrayBuffer.
+ - version:
+ - v13.2.0
+ - v12.16.0
+ pr-url: https://github.com/nodejs/node/pull/29292
+ description: This function now supports IEEE-P1363 DSA and ECDSA signatures.
-->
diff --git a/doc/api/dns.md b/doc/api/dns.md
index c9508f871194b9..a284c9d0c57bd5 100644
--- a/doc/api/dns.md
+++ b/doc/api/dns.md
@@ -950,7 +950,7 @@ Here is an example of the result object:
minttl: 60 } ]
```
-## `dnsPromises.resolveCaa(hostname)`
+### `dnsPromises.resolveCaa(hostname)`
diff --git a/doc/api/events.md b/doc/api/events.md
index 17420a249be731..d8f8ee7e7c6582 100644
--- a/doc/api/events.md
+++ b/doc/api/events.md
@@ -829,6 +829,40 @@ class MyClass extends EventEmitter {
}
```
+## `events.getEventListeners(emitterOrTarget, eventName)`
+
+* `emitterOrTarget` {EventEmitter|EventTarget}
+* `eventName` {string|symbol}
+* Returns: {Function[]}
+
+Returns a copy of the array of listeners for the event named `eventName`.
+
+For `EventEmitter`s this behaves exactly the same as calling `.listeners` on
+the emitter.
+
+For `EventTarget`s this is the only way to get the event listeners for the
+event target. This is useful for debugging and diagnostic purposes.
+
+```js
+const { getEventListeners, EventEmitter } = require('events');
+
+{
+ const ee = new EventEmitter();
+ const listener = () => console.log('Events are fun');
+ ee.on('foo', listener);
+ getEventListeners(ee, 'foo'); // [listener]
+}
+{
+ const et = new EventTarget();
+ const listener = () => console.log('Events are fun');
+ ee.addEventListener('foo', listener);
+ getEventListeners(ee, 'foo'); // [listener]
+}
+```
+
## `events.once(emitter, name[, options])`
* `path` {string|Buffer|URL|FileHandle} filename or `FileHandle`
* `options` {Object|string}
* `encoding` {string|null} **Default:** `null`
* `flag` {string} See [support of file system `flags`][]. **Default:** `'r'`.
+ * `signal` {AbortSignal} allows aborting an in-progress readFile
* Returns: {Promise}
Asynchronously reads the entire contents of a file.
@@ -5459,6 +5518,20 @@ platform-specific. On macOS, Linux, and Windows, the promise will be rejected
with an error. On FreeBSD, a representation of the directory's contents will be
returned.
+It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a
+request is aborted the promise returned is rejected with an `AbortError`:
+
+```js
+const controller = new AbortController();
+const signal = controller.signal;
+readFile(fileName, { signal }).then((file) => { /* ... */ });
+// Abort the request
+controller.abort();
+```
+
+Aborting an ongoing request does not abort individual operating
+system requests but rather the internal buffering `fs.readFile` performs.
+
Any specified `FileHandle` has to support reading.
### `fsPromises.readlink(path[, options])`
@@ -5671,6 +5744,10 @@ The `atime` and `mtime` arguments follow these rules:
+
+### `module.findSourceMap(path)`
+
* `path` {string}
-* `error` {Error}
* Returns: {module.SourceMap}
`path` is the resolved path for the file for which a corresponding source map
should be fetched.
-The `error` instance should be passed as the second parameter to `findSourceMap`
-in exceptional flows, such as when an overridden
-[`Error.prepareStackTrace(error, trace)`][] is invoked. Modules are not added to
-the module cache until they are successfully loaded. In these cases, source maps
-are associated with the `error` instance along with the `path`.
-
### Class: `module.SourceMap`
-* `module.findSourceMap(path[, error])`
+* `module.findSourceMap(path)`
* Class: `module.SourceMap`
* `new SourceMap(payload)`
* `sourceMap.payload`
diff --git a/doc/api/net.md b/doc/api/net.md
index e8a33fc4f08cbe..7e3492b4b7b0b1 100644
--- a/doc/api/net.md
+++ b/doc/api/net.md
@@ -998,6 +998,16 @@ If `timeout` is 0, then the existing idle timeout is disabled.
The optional `callback` parameter will be added as a one-time listener for the
[`'timeout'`][] event.
+### `socket.timeout`
+
+
+* {number|undefined}
+
+The socket timeout in milliseconds as set by [`socket.setTimeout()`][].
+It is `undefined` if a timeout has not been set.
+
### `socket.unref()`
+
+* {boolean}
+
+Is `true` if the stream's buffer has been full and stream will emit `'drain'`.
+
##### `writable.writableObjectMode`
+
+* Returns: {Object}
+
+Returns an object with the following properties:
+
+* `code_and_metadata_size` {number}
+* `bytecode_and_metadata_size` {number}
+* `external_script_source_size` {number}
+
+
+```js
+{
+ code_and_metadata_size: 212208,
+ bytecode_and_metadata_size: 161368,
+ external_script_source_size: 1410794
+}
+```
+
+## `v8.getHeapSnapshot()`
+
+
+* Returns: {stream.Readable} A Readable Stream containing the V8 heap snapshot
+
+Generates a snapshot of the current V8 heap and returns a Readable
+Stream that may be used to read the JSON serialized representation.
+This JSON stream format is intended to be used with tools such as
+Chrome DevTools. The JSON schema is undocumented and specific to the
+V8 engine. Therefore, the schema may change from one version of V8 to the next.
+
+```js
+// Print heap snapshot to the console
+const v8 = require('v8');
+const stream = v8.getHeapSnapshot();
+stream.pipe(process.stdout);
+```
+
## `v8.getHeapSpaceStatistics()`
-
-* Returns: {stream.Readable} A Readable Stream containing the V8 heap snapshot
-
-Generates a snapshot of the current V8 heap and returns a Readable
-Stream that may be used to read the JSON serialized representation.
-This JSON stream format is intended to be used with tools such as
-Chrome DevTools. The JSON schema is undocumented and specific to the
-V8 engine, and may change from one version of V8 to the next.
-
-```js
-// Print heap snapshot to the console
-const v8 = require('v8');
-const stream = v8.getHeapSnapshot();
-stream.pipe(process.stdout);
-```
-
## `v8.getHeapStatistics()`
-
-* Returns: {Object}
-
-Returns an object with the following properties:
-
-* `code_and_metadata_size` {number}
-* `bytecode_and_metadata_size` {number}
-* `external_script_source_size` {number}
-
-
-```js
-{
- code_and_metadata_size: 212208,
- bytecode_and_metadata_size: 161368,
- external_script_source_size: 1410794
-}
-```
-
## `v8.setFlagsFromString(flags)`