Skip to content

Commit 81c846e

Browse files
authored
Merge branch 'nodejs:main' into improve-timer-warning-message
2 parents b5ee616 + b4a962d commit 81c846e

File tree

1,604 files changed

+99225
-74651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,604 files changed

+99225
-74651
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Coverage Linux (without intl)
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
paths-ignore:
7+
- '**.md'
8+
- benchmark/**
9+
- deps/**
10+
- doc/**
11+
- .github/**
12+
- '!.github/workflows/coverage-linux-without-intl.yml'
13+
push:
14+
branches:
15+
- main
16+
paths-ignore:
17+
- '**.md'
18+
- benchmark/**
19+
- deps/**
20+
- doc/**
21+
- .github/**
22+
- '!.github/workflows/coverage-linux-without-intl.yml'
23+
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
26+
cancel-in-progress: true
27+
28+
env:
29+
PYTHON_VERSION: '3.11'
30+
FLAKY_TESTS: keep_retrying
31+
32+
permissions:
33+
contents: read
34+
35+
jobs:
36+
coverage-linux-without-intl:
37+
if: github.event.pull_request.draft == false
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v3
41+
with:
42+
persist-credentials: false
43+
- name: Set up Python ${{ env.PYTHON_VERSION }}
44+
uses: actions/setup-python@v4
45+
with:
46+
python-version: ${{ env.PYTHON_VERSION }}
47+
- name: Environment Information
48+
run: npx envinfo
49+
- name: Install gcovr
50+
run: pip install gcovr==4.2
51+
- name: Build
52+
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --coverage --without-intl"
53+
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
54+
# The cause is most likely coverage's use of the inspector.
55+
- name: Test
56+
run: NODE_V8_COVERAGE=coverage/tmp make test-cov -j2 V=1 TEST_CI_ARGS="-p dots --measure-flakiness 9" || exit 0
57+
- name: Report JS
58+
run: npx c8 report --check-coverage
59+
env:
60+
NODE_OPTIONS: --max-old-space-size=8192
61+
- name: Report C++
62+
run: cd out && gcovr --gcov-exclude='.*\b(deps|usr|out|obj|cctest|embedding)\b' -v -r Release/obj.target --xml -o ../coverage/coverage-cxx.xml --root=$(cd ../ && pwd)
63+
# Clean temporary output from gcov and c8, so that it's not uploaded:
64+
- name: Clean tmp
65+
run: rm -rf coverage/tmp && rm -rf out
66+
- name: Upload
67+
uses: codecov/codecov-action@v3
68+
with:
69+
directory: ./coverage

.github/workflows/daily-wpt-fyi.yml

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# This workflow runs every night and tests various releases of Node.js
2+
# (latest nightly, current, and two latest LTS release lines) against the
3+
# `epochs/daily` branch of WPT.
4+
5+
name: Daily WPT report
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
node-versions:
11+
description: Node.js versions (as supported by actions/setup-node) to test as JSON array
12+
required: false
13+
default: '["current", "lts/*", "lts/-1"]'
14+
schedule:
15+
# This is 20 minutes after `epochs/daily` branch is triggered to be created
16+
# in WPT repo.
17+
# https://github.com/web-platform-tests/wpt/blob/master/.github/workflows/epochs.yml
18+
- cron: 30 0 * * *
19+
20+
env:
21+
PYTHON_VERSION: '3.11'
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
report:
28+
if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch'
29+
strategy:
30+
matrix:
31+
node-version: ${{ fromJSON(github.event.inputs.node-versions || '["latest-nightly", "current", "lts/*", "lts/-1"]') }}
32+
fail-fast: false
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Set up Python ${{ env.PYTHON_VERSION }}
36+
uses: actions/setup-python@v4
37+
with:
38+
python-version: ${{ env.PYTHON_VERSION }}
39+
- name: Environment Information
40+
run: npx envinfo
41+
42+
# install a version and checkout
43+
- name: Get latest nightly
44+
if: matrix.node-version == 'latest-nightly'
45+
run: echo "NIGHTLY=$(curl -s https://nodejs.org/download/nightly/index.json | jq -r '.[0].version')" >> $GITHUB_ENV
46+
- name: Install Node.js
47+
id: setup-node
48+
uses: actions/setup-node@v3
49+
with:
50+
node-version: ${{ env.NIGHTLY || matrix.node-version }}
51+
- name: Get nightly ref
52+
if: contains(matrix.node-version, 'nightly')
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
run: |
56+
SHORT_SHA=$(node -p 'process.version.split(/-nightly\d{8}/)[1]')
57+
echo "NIGHTLY_REF=$(gh api /repos/nodejs/node/commits/$SHORT_SHA | jq -r '.sha')" >> $GITHUB_ENV
58+
- name: Checkout ${{ steps.setup-node.outputs.node-version }}
59+
uses: actions/checkout@v3
60+
with:
61+
persist-credentials: false
62+
ref: ${{ env.NIGHTLY_REF || steps.setup-node.outputs.node-version }}
63+
- name: Set env.NODE
64+
run: echo "NODE=$(which node)" >> $GITHUB_ENV
65+
66+
# replace checked out WPT with the synchronized branch
67+
- name: Remove stale WPT
68+
run: rm -rf wpt
69+
working-directory: test/fixtures
70+
- name: Checkout epochs/daily WPT
71+
uses: actions/checkout@v3
72+
with:
73+
repository: web-platform-tests/wpt
74+
persist-credentials: false
75+
path: test/fixtures/wpt
76+
clean: false
77+
ref: epochs/daily
78+
- name: Set env.WPT_REVISION
79+
run: echo "WPT_REVISION=$(git rev-parse HEAD)" >> $GITHUB_ENV
80+
working-directory: test/fixtures/wpt
81+
82+
- name: Run WPT and generate report
83+
run: make test-wpt-report || true
84+
- name: Clone report for upload
85+
run: |
86+
if [ -e out/wpt/wptreport.json ]; then
87+
cd out/wpt
88+
cp wptreport.json wptreport-${{ steps.setup-node.outputs.node-version }}.json
89+
fi
90+
- name: Upload GitHub Actions artifact
91+
uses: actions/upload-artifact@v3
92+
with:
93+
path: out/wpt/wptreport-*.json
94+
name: WPT Reports
95+
if-no-files-found: warn
96+
- name: Upload WPT Report to wpt.fyi API
97+
env:
98+
WPT_FYI_ENDPOINT: ${{ vars.WPT_FYI_ENDPOINT }}
99+
WPT_FYI_USERNAME: ${{ vars.WPT_FYI_USERNAME }}
100+
WPT_FYI_PASSWORD: ${{ secrets.WPT_FYI_PASSWORD }}
101+
run: |
102+
if [ -e out/wpt/wptreport.json ]; then
103+
cd out/wpt
104+
gzip wptreport.json
105+
curl \
106+
-u "$WPT_FYI_USERNAME:$WPT_FYI_PASSWORD" \
107+
108+
-F "labels=master" \
109+
$WPT_FYI_ENDPOINT
110+
fi

CHANGELOG.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ release.
3535
</tr>
3636
<tr>
3737
<td valign="top">
38-
<b><a href="doc/changelogs/CHANGELOG_V19.md#19.6.0">19.6.0</a></b><br/>
38+
<b><a href="doc/changelogs/CHANGELOG_V19.md#19.6.1">19.6.1</a></b><br/>
39+
<a href="doc/changelogs/CHANGELOG_V19.md#19.6.0">19.6.0</a><br/>
3940
<a href="doc/changelogs/CHANGELOG_V19.md#19.5.0">19.5.0</a><br/>
4041
<a href="doc/changelogs/CHANGELOG_V19.md#19.4.0">19.4.0</a><br/>
4142
<a href="doc/changelogs/CHANGELOG_V19.md#19.3.0">19.3.0</a><br/>
@@ -45,7 +46,8 @@ release.
4546
<a href="doc/changelogs/CHANGELOG_V19.md#19.0.0">19.0.0</a><br/>
4647
</td>
4748
<td valign="top">
48-
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.14.0">18.14.0</a></b><br/>
49+
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.14.1">18.14.1</a></b><br/>
50+
<a href="doc/changelogs/CHANGELOG_V18.md#18.14.0">18.14.0</a><br/>
4951
<a href="doc/changelogs/CHANGELOG_V18.md#18.13.0">18.13.0</a><br/>
5052
<a href="doc/changelogs/CHANGELOG_V18.md#18.12.1">18.12.1</a><br/>
5153
<a href="doc/changelogs/CHANGELOG_V18.md#18.12.0">18.12.0</a><br/>
@@ -64,7 +66,8 @@ release.
6466
<a href="doc/changelogs/CHANGELOG_V18.md#18.0.0">18.0.0</a><br/>
6567
</td>
6668
<td valign="top">
67-
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.19.0">16.19.0</a></b><br/>
69+
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.19.1">16.19.1</a></b><br/>
70+
<a href="doc/changelogs/CHANGELOG_V16.md#16.19.0">16.19.0</a><br/>
6871
<a href="doc/changelogs/CHANGELOG_V16.md#16.18.1">16.18.1</a><br/>
6972
<a href="doc/changelogs/CHANGELOG_V16.md#16.18.0">16.18.0</a><br/>
7073
<a href="doc/changelogs/CHANGELOG_V16.md#16.17.1">16.17.1</a><br/>
@@ -99,7 +102,8 @@ release.
99102
<a href="doc/changelogs/CHANGELOG_V16.md#16.0.0">16.0.0</a><br/>
100103
</td>
101104
<td valign="top">
102-
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.21.2">14.21.2</a></b><br/>
105+
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.21.3">14.21.3</a></b><br/>
106+
<a href="doc/changelogs/CHANGELOG_V14.md#14.21.2">14.21.2</a><br/>
103107
<a href="doc/changelogs/CHANGELOG_V14.md#14.21.1">14.21.1</a><br/>
104108
<a href="doc/changelogs/CHANGELOG_V14.md#14.21.0">14.21.0</a><br/>
105109
<a href="doc/changelogs/CHANGELOG_V14.md#14.20.1">14.20.1</a><br/>

Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,12 @@ test-message: test-build
595595
test-wpt: all
596596
$(PYTHON) tools/test.py $(PARALLEL_ARGS) wpt
597597

598+
.PHONY: test-wpt-report
599+
test-wpt-report:
600+
$(RM) -r out/wpt
601+
mkdir -p out/wpt
602+
WPT_REPORT=1 $(PYTHON) tools/test.py --shell $(NODE) $(PARALLEL_ARGS) wpt
603+
598604
.PHONY: test-simple
599605
test-simple: | cctest # Depends on 'all'.
600606
$(PYTHON) tools/test.py $(PARALLEL_ARGS) parallel sequential

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,6 @@ For information about the governance of the Node.js project, see
284284
**Ash Cripps** <<[email protected]>>
285285
* [Ayase-252](https://github.com/Ayase-252) -
286286
**Qingyu Deng** <<[email protected]>>
287-
* [bcoe](https://github.com/bcoe) -
288-
**Ben Coe** <<[email protected]>> (he/him)
289287
* [bengl](https://github.com/bengl) -
290288
**Bryan English** <<[email protected]>> (he/him)
291289
* [benjamingr](https://github.com/benjamingr) -
@@ -316,6 +314,8 @@ For information about the governance of the Node.js project, see
316314
**Daniel Bevenius** <<[email protected]>> (he/him)
317315
* [danielleadams](https://github.com/danielleadams) -
318316
**Danielle Adams** <<[email protected]>> (she/her)
317+
* [debadree25](https://github.com/debadree25) -
318+
**Debadree Chatterjee** <<[email protected]>> (he/him)
319319
* [deokjinkim](https://github.com/deokjinkim) -
320320
**Deokjin Kim** <<[email protected]>> (he/him)
321321
* [devnexen](https://github.com/devnexen) -
@@ -478,6 +478,8 @@ For information about the governance of the Node.js project, see
478478
**Andreas Madsen** <<[email protected]>> (he/him)
479479
* [aqrln](https://github.com/aqrln) -
480480
**Alexey Orlenko** <<[email protected]>> (he/him)
481+
* [bcoe](https://github.com/bcoe) -
482+
**Ben Coe** <<[email protected]>> (he/him)
481483
* [bmeurer](https://github.com/bmeurer) -
482484
**Benedikt Meurer** <<[email protected]>>
483485
* [boneskull](https://github.com/boneskull) -

benchmark/worker/atomics-wait.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
'use strict';
2-
/* global SharedArrayBuffer */
2+
3+
if (typeof SharedArrayBuffer === 'undefined') {
4+
throw new Error('SharedArrayBuffers must be enabled to run this benchmark');
5+
}
6+
7+
if (typeof Atomics === 'undefined') {
8+
throw new Error('Atomics must be enabled to run this benchmark');
9+
}
310

411
const common = require('../common.js');
512
const bench = common.createBenchmark(main, {

configure.py

+14-2
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@
146146
default=None,
147147
help='use on deprecated SunOS systems that do not support ifaddrs.h')
148148

149+
parser.add_argument('--disable-single-executable-application',
150+
action='store_true',
151+
dest='disable_single_executable_application',
152+
default=None,
153+
help='Disable Single Executable Application support.')
154+
149155
parser.add_argument("--fully-static",
150156
action="store_true",
151157
dest="fully_static",
@@ -571,7 +577,7 @@
571577
action='store_const',
572578
dest='with_intl',
573579
const='none',
574-
help='Disable Intl, same as --with-intl=none (disables inspector)')
580+
help='Disable Intl, same as --with-intl=none')
575581

576582
intl_optgroup.add_argument('--with-icu-path',
577583
action='store',
@@ -1357,6 +1363,10 @@ def configure_node(o):
13571363
if options.no_ifaddrs:
13581364
o['defines'] += ['SUNOS_NO_IFADDRS']
13591365

1366+
o['variables']['single_executable_application'] = b(not options.disable_single_executable_application)
1367+
if options.disable_single_executable_application:
1368+
o['defines'] += ['DISABLE_SINGLE_EXECUTABLE_APPLICATION']
1369+
13601370
o['variables']['node_with_ltcg'] = b(options.with_ltcg)
13611371
if flavor != 'win' and options.with_ltcg:
13621372
raise Exception('Link Time Code Generation is only supported on Windows.')
@@ -1669,6 +1679,9 @@ def icu_download(path):
16691679
# always set icu_small, node.gyp depends on it being defined.
16701680
o['variables']['icu_small'] = b(False)
16711681

1682+
# prevent data override
1683+
o['defines'] += ['ICU_NO_USER_DATA_OVERRIDE']
1684+
16721685
with_intl = options.with_intl
16731686
with_icu_source = options.with_icu_source
16741687
have_icu_path = bool(options.with_icu_path)
@@ -1921,7 +1934,6 @@ def icu_download(path):
19211934

19221935
def configure_inspector(o):
19231936
disable_inspector = (options.without_inspector or
1924-
options.with_intl in (None, 'none') or
19251937
options.without_ssl)
19261938
o['variables']['v8_enable_inspector'] = 0 if disable_inspector else 1
19271939

deps/ada/LICENSE-MIT

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Copyright 2023 Ada authors
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the "Software"), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7+
the Software, and to permit persons to whom the Software is furnished to do so,
8+
subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

deps/ada/ada.cpp

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2023-02-06 08:25:59 -0500. Do not edit! */
1+
/* auto-generated on 2023-02-07 17:26:54 -0500. Do not edit! */
22
// dofile: invoked with prepath=/Users/yagiz/Developer/url-parser/src, filename=ada.cpp
33
/* begin file src/ada.cpp */
44
#include "ada.h"
@@ -970,6 +970,13 @@ namespace ada::helpers {
970970
} while (true);
971971
}
972972
}
973+
974+
ada_really_inline void strip_trailing_spaces_from_opaque_path(ada::url& url) noexcept {
975+
if (!url.has_opaque_path) return;
976+
if (url.fragment.has_value()) return;
977+
if (url.query.has_value()) return;
978+
while (!url.path.empty() && url.path.back() == ' ') { url.path.resize(url.path.size()-1); }
979+
}
973980
} // namespace ada::helpers
974981

975982
namespace ada {
@@ -1650,7 +1657,7 @@ namespace ada {
16501657
void url::set_hash(const std::string_view input) {
16511658
if (input.empty()) {
16521659
fragment = std::nullopt;
1653-
// TODO: Potentially strip trailing spaces from an opaque path with this.
1660+
helpers::strip_trailing_spaces_from_opaque_path(*this);
16541661
return;
16551662
}
16561663

@@ -1664,9 +1671,7 @@ namespace ada {
16641671
void url::set_search(const std::string_view input) {
16651672
if (input.empty()) {
16661673
query = std::nullopt;
1667-
// Empty this’s query object’s list.
1668-
// @todo Implement this if/when we have URLSearchParams.
1669-
// Potentially strip trailing spaces from an opaque path with this.
1674+
helpers::strip_trailing_spaces_from_opaque_path(*this);
16701675
return;
16711676
}
16721677

@@ -1679,10 +1684,6 @@ namespace ada {
16791684
ada::character_sets::QUERY_PERCENT_ENCODE;
16801685

16811686
query = ada::unicode::percent_encode(std::string_view(new_value), query_percent_encode_set);
1682-
1683-
// Set this’s query object’s list to the result of parsing input.
1684-
// @todo Implement this if/when we have URLSearchParams.
1685-
return ;
16861687
}
16871688

16881689
bool url::set_pathname(const std::string_view input) {

0 commit comments

Comments
 (0)