Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v21.4.0 release proposal #51043

Merged
merged 38 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ec74b93
doc: remove flicker on page load on dark theme
demakoff Nov 27, 2023
c1ee506
fs: remove workaround for `esm` package
anonrig Nov 27, 2023
eecab88
doc: add doc for Unix abstract socket
theanarkh Nov 28, 2023
94462d4
test: consolidate utf8 text fixtures in tests
joyeecheung Nov 28, 2023
30a6f19
doc: document non-node_modules-only runtime deprecation
joyeecheung Nov 28, 2023
c37d18d
lib: streamline process.binding() handling
joyeecheung Nov 17, 2023
1e40c4a
tools: fix current version check
marco-ippolito Nov 28, 2023
74f5a1c
src: print MKSNAPSHOT debug logs to stderr
joyeecheung Nov 16, 2023
ac3a6ee
test: log more information in SEA tests
joyeecheung Nov 16, 2023
cedc342
doc: run license-builder
github-actions[bot] Nov 29, 2023
759ebca
doc: reserve 121 for Electron 29
codebytere Nov 29, 2023
dc049ac
benchmark: update number of iterations for `util.inspect`
kylo5aby Nov 29, 2023
3faed33
typings: fix JSDoc in `internal/modules/esm/hooks`
himself65 Nov 29, 2023
7adf239
doc: fix some errors in esm resolution algorithms
chjj Nov 29, 2023
4b1bed0
deps: update undici to 5.28.0
nodejs-github-bot Nov 29, 2023
246cf73
lib,src: replace toUSVString with `toWellFormed()`
anonrig Nov 29, 2023
b7036f2
doc: add procedure when CVEs don't get published
RafaelGSS Nov 29, 2023
ca10cbb
tools: update lint-md-dependencies to rollup@4.5.2
nodejs-github-bot Nov 29, 2023
bed1b93
meta: move one or more collaborators to emeritus
nodejs-github-bot Nov 29, 2023
1cf087d
lib: refactor to use validateFunction in diagnostics_channel
deokjinkim Nov 30, 2023
8e1a70a
tools: add triggers to update release links workflow
MoLow Nov 30, 2023
6a087ce
url: throw error if argument length of revokeObjectURL is 0
DylanTet Nov 30, 2023
3a1c664
test: replace forEach to for.. test-webcrypto-export-import-cfrg.js
aparzi Dec 1, 2023
f79b54e
benchmark: update iterations in benchmark/crypto/get-ciphers.js
Dec 2, 2023
9bc7917
loader: speed up line length calc used by moduleProvider
zeusdeux Dec 2, 2023
099ebdb
deps: update undici to 5.28.1
nodejs-github-bot Dec 2, 2023
32acafe
fs: introduce `dirent.parentPath`
aduh95 Dec 2, 2023
b24ee15
benchmark: update iterations in benchmark/crypto/hkdf.js
Dec 3, 2023
7245486
fs: use default w flag for writeFileSync with utf8 encoding
MuriloKakazu Dec 3, 2023
59a45dd
deps: update googletest to b10fad3
nodejs-github-bot Nov 5, 2023
d7c562a
deps: update googletest to 76bb2af
nodejs-github-bot Dec 3, 2023
f6ff11c
src: fix backtrace with tail [[noreturn]] abort
legendecas Dec 3, 2023
1dbe1af
meta: bump github/codeql-action from 2.22.5 to 2.22.8
dependabot[bot] Dec 3, 2023
812ab9e
meta: bump step-security/harden-runner from 2.6.0 to 2.6.1
dependabot[bot] Dec 3, 2023
709ac47
src: disable uncaught exception abortion for ESM syntax detection
anonrig Dec 3, 2023
b281e98
doc: add additional details about `--input-type`
shubham9411 Dec 4, 2023
1e7d101
src: make ModifyCodeGenerationFromStrings more robust
joyeecheung Dec 4, 2023
67ada40
2023-12-05, Version 21.4.0 (Current)
targos Dec 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

Expand Down Expand Up @@ -73,6 +73,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@74483a38d39275f33fcff5f35b679b5ca4a26a99 # v2.22.5
uses: github/codeql-action/upload-sarif@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
with:
sarif_file: results.sarif
3 changes: 2 additions & 1 deletion .github/workflows/update-release-links.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Update release links

on:
workflow_dispatch:
release:
types: [published]
types: [released]

permissions:
contents: read
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V21.md#21.3.0">21.3.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V21.md#21.4.0">21.4.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V21.md#21.3.0">21.3.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V21.md#21.2.0">21.2.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V21.md#21.1.0">21.1.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V21.md#21.0.0">21.0.0</a><br/>
Expand Down
75 changes: 34 additions & 41 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -132,52 +132,45 @@ The externally maintained libraries used by Node.js are:

- ICU, located at deps/icu-small, is licensed as follows:
"""
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE

See Terms of Use
for definitions of Unicode Inc.’s Data Files and Software.

NOTICE TO USER: Carefully read the following legal agreement.
BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
TERMS AND CONDITIONS OF THIS AGREEMENT.
IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
THE DATA FILES OR SOFTWARE.
UNICODE LICENSE V3

COPYRIGHT AND PERMISSION NOTICE

Copyright © 1991-2023 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
Copyright © 2016-2023 Unicode, Inc.

Permission is hereby granted, free of charge, to any person obtaining
a copy of the Unicode data files and any associated documentation
(the "Data Files") or Unicode software and any associated documentation
(the "Software") to deal in the Data Files or Software
without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, and/or sell copies of
the Data Files or Software, and to permit persons to whom the Data Files
or Software are furnished to do so, provided that either
(a) this copyright and permission notice appear with all copies
of the Data Files or Software, or
(b) this copyright and permission notice appear in associated
Documentation.

THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THE DATA FILES OR SOFTWARE.
NOTICE TO USER: Carefully read the following legal agreement. BY
DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.

Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in these Data Files or Software without prior
written authorization of the copyright holder.
Permission is hereby granted, free of charge, to any person obtaining a
copy of data files and any associated documentation (the "Data Files") or
software and any associated documentation (the "Software") to deal in the
Data Files or Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, and/or sell
copies of the Data Files or Software, and to permit persons to whom the
Data Files or Software are furnished to do so, provided that either (a)
this copyright and permission notice appear with all copies of the Data
Files or Software, or (b) this copyright and permission notice appear in
associated Documentation.

THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
THIRD PARTY RIGHTS.

IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
FILES OR SOFTWARE.

Except as contained in this notice, the name of a copyright holder shall
not be used in advertising or otherwise to promote the sale, use or other
dealings in these Data Files or Software without prior written
authorization of the copyright holder.

----------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,6 @@ For information about the governance of the Node.js project, see
**Zeyu "Alex" Yang** <<himself65@outlook.com>> (he/him)
* [iansu](https://github.com/iansu) -
**Ian Sutherland** <<ian@iansutherland.ca>>
* [JacksonTian](https://github.com/JacksonTian) -
**Jackson Tian** <<shyvo1987@gmail.com>>
* [JakobJingleheimer](https://github.com/JakobJingleheimer) -
**Jacob Smith** <<jacob@frende.me>> (he/him)
* [jasnell](https://github.com/jasnell) -
Expand Down Expand Up @@ -569,6 +567,8 @@ For information about the governance of the Node.js project, see
**Isaac Z. Schlueter** <<i@izs.me>>
* [italoacasas](https://github.com/italoacasas) -
**Italo A. Casas** <<me@italoacasas.com>> (he/him)
* [JacksonTian](https://github.com/JacksonTian) -
**Jackson Tian** <<shyvo1987@gmail.com>>
* [jasongin](https://github.com/jasongin) -
**Jason Ginchereau** <<jasongin@microsoft.com>>
* [jbergstroem](https://github.com/jbergstroem) -
Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/get-ciphers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const common = require('../common.js');

const bench = common.createBenchmark(main, {
n: [1, 5000],
n: [1, 500000],
v: ['crypto', 'tls'],
});

Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/hkdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const bench = common.createBenchmark(main, {
salt: ['', 'salt'],
info: ['', 'info'],
hash: ['sha256', 'sha512'],
n: [1e3],
n: [1e4],
});

function measureSync(n, size, salt, info, hash, key) {
Expand Down
27 changes: 0 additions & 27 deletions benchmark/url/usvstring.js

This file was deleted.

2 changes: 1 addition & 1 deletion benchmark/util/inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const opts = {
none: undefined,
};
const bench = common.createBenchmark(main, {
n: [2e4],
n: [8e4],
method: [
'Object',
'Object_empty',
Expand Down
21 changes: 0 additions & 21 deletions benchmark/util/to-usv-string.js

This file was deleted.

1 change: 1 addition & 0 deletions deps/googletest/src/gtest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <algorithm>
#include <chrono> // NOLINT
#include <cmath>
#include <csignal> // NOLINT: raise(3) is used on some platforms
#include <cstdint>
#include <cstdlib>
#include <cstring>
Expand Down
2 changes: 1 addition & 1 deletion deps/undici/src/docs/api/Client.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Returns: `Client`
* **autoSelectFamily**: `boolean` (optional) - Default: depends on local Node version, on Node 18.13.0 and above is `false`. Enables a family autodetection algorithm that loosely implements section 5 of [RFC 8305](https://tools.ietf.org/html/rfc8305#section-5). See [here](https://nodejs.org/api/net.html#socketconnectoptions-connectlistener) for more details. This option is ignored if not supported by the current Node version.
* **autoSelectFamilyAttemptTimeout**: `number` - Default: depends on local Node version, on Node 18.13.0 and above is `250`. The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. See [here](https://nodejs.org/api/net.html#socketconnectoptions-connectlistener) for more details.
* **allowH2**: `boolean` - Default: `false`. Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
* **maxConcurrentStreams**: `number` - Default: `100`. Dictates the maximum number of concurrent streams for a single H2 session. It can be overriden by a SETTINGS remote frame.
* **maxConcurrentStreams**: `number` - Default: `100`. Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.

#### Parameter: `ConnectOptions`

Expand Down
42 changes: 38 additions & 4 deletions deps/undici/src/docs/api/MockPool.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ const mockPool = mockAgent.get('http://localhost:3000')

### `MockPool.intercept(options)`

This method defines the interception rules for matching against requests for a MockPool or MockPool. We can intercept multiple times on a single instance, but each intercept is only used once.
For example if you expect to make 2 requests inside a test, you need to call `intercept()` twice. Assuming you use `disableNetConnect()` you will get `MockNotMatchedError` on the second request when you only call `intercept()` once.
This method defines the interception rules for matching against requests for a MockPool or MockPool. We can intercept multiple times on a single instance, but each intercept is only used once. For example if you expect to make 2 requests inside a test, you need to call `intercept()` twice. Assuming you use `disableNetConnect()` you will get `MockNotMatchedError` on the second request when you only call `intercept()` once.

When defining interception rules, all the rules must pass for a request to be intercepted. If a request is not intercepted, a real request will be attempted.

Expand All @@ -54,11 +53,11 @@ Returns: `MockInterceptor` corresponding to the input options.

### Parameter: `MockPoolInterceptOptions`

* **path** `string | RegExp | (path: string) => boolean` - a matcher for the HTTP request path.
* **path** `string | RegExp | (path: string) => boolean` - a matcher for the HTTP request path. When a `RegExp` or callback is used, it will match against the request path including all query parameters in alphabetical order. When a `string` is provided, the query parameters can be conveniently specified through the `MockPoolInterceptOptions.query` setting.
* **method** `string | RegExp | (method: string) => boolean` - (optional) - a matcher for the HTTP request method. Defaults to `GET`.
* **body** `string | RegExp | (body: string) => boolean` - (optional) - a matcher for the HTTP request body.
* **headers** `Record<string, string | RegExp | (body: string) => boolean`> - (optional) - a matcher for the HTTP request headers. To be intercepted, a request must match all defined headers. Extra headers not defined here may (or may not) be included in the request and do not affect the interception in any way.
* **query** `Record<string, any> | null` - (optional) - a matcher for the HTTP request query string params.
* **query** `Record<string, any> | null` - (optional) - a matcher for the HTTP request query string params. Only applies when a `string` was provided for `MockPoolInterceptOptions.path`.

### Return: `MockInterceptor`

Expand Down Expand Up @@ -458,6 +457,41 @@ const result3 = await request('http://localhost:3000/foo')
// Will not match and make attempt a real request
```

#### Example - Mocked request with path callback

```js
import { MockAgent, setGlobalDispatcher, request } from 'undici'
import querystring from 'querystring'

const mockAgent = new MockAgent()
setGlobalDispatcher(mockAgent)

const mockPool = mockAgent.get('http://localhost:3000')

const matchPath = requestPath => {
const [pathname, search] = requestPath.split('?')
const requestQuery = querystring.parse(search)

if (!pathname.startsWith('/foo')) {
return false
}

if (!Object.keys(requestQuery).includes('foo') || requestQuery.foo !== 'bar') {
return false
}

return true
}

mockPool.intercept({
path: matchPath,
method: 'GET'
}).reply(200, 'foo')

const result = await request('http://localhost:3000/foo?foo=bar')
// Will match and return mocked data
```

### `MockPool.close()`

Closes the mock pool and de-registers from associated MockAgent.
Expand Down
Loading
Loading