Skip to content

Commit

Permalink
Merge branch 'nodejs:main' into improve-timer-warning-message
Browse files Browse the repository at this point in the history
  • Loading branch information
jakecastelli authored Feb 19, 2023
2 parents b5ee616 + b4a962d commit 81c846e
Show file tree
Hide file tree
Showing 1,604 changed files with 99,225 additions and 74,651 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/coverage-linux-without-intl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Coverage Linux (without intl)

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '**.md'
- benchmark/**
- deps/**
- doc/**
- .github/**
- '!.github/workflows/coverage-linux-without-intl.yml'
push:
branches:
- main
paths-ignore:
- '**.md'
- benchmark/**
- deps/**
- doc/**
- .github/**
- '!.github/workflows/coverage-linux-without-intl.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
PYTHON_VERSION: '3.11'
FLAKY_TESTS: keep_retrying

permissions:
contents: read

jobs:
coverage-linux-without-intl:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Install gcovr
run: pip install gcovr==4.2
- name: Build
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --coverage --without-intl"
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
# The cause is most likely coverage's use of the inspector.
- name: Test
run: NODE_V8_COVERAGE=coverage/tmp make test-cov -j2 V=1 TEST_CI_ARGS="-p dots --measure-flakiness 9" || exit 0
- name: Report JS
run: npx c8 report --check-coverage
env:
NODE_OPTIONS: --max-old-space-size=8192
- name: Report C++
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)
# Clean temporary output from gcov and c8, so that it's not uploaded:
- name: Clean tmp
run: rm -rf coverage/tmp && rm -rf out
- name: Upload
uses: codecov/codecov-action@v3
with:
directory: ./coverage
110 changes: 110 additions & 0 deletions .github/workflows/daily-wpt-fyi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# This workflow runs every night and tests various releases of Node.js
# (latest nightly, current, and two latest LTS release lines) against the
# `epochs/daily` branch of WPT.

name: Daily WPT report

on:
workflow_dispatch:
inputs:
node-versions:
description: Node.js versions (as supported by actions/setup-node) to test as JSON array
required: false
default: '["current", "lts/*", "lts/-1"]'
schedule:
# This is 20 minutes after `epochs/daily` branch is triggered to be created
# in WPT repo.
# https://github.com/web-platform-tests/wpt/blob/master/.github/workflows/epochs.yml
- cron: 30 0 * * *

env:
PYTHON_VERSION: '3.11'

permissions:
contents: read

jobs:
report:
if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch'
strategy:
matrix:
node-version: ${{ fromJSON(github.event.inputs.node-versions || '["latest-nightly", "current", "lts/*", "lts/-1"]') }}
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo

# install a version and checkout
- name: Get latest nightly
if: matrix.node-version == 'latest-nightly'
run: echo "NIGHTLY=$(curl -s https://nodejs.org/download/nightly/index.json | jq -r '.[0].version')" >> $GITHUB_ENV
- name: Install Node.js
id: setup-node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NIGHTLY || matrix.node-version }}
- name: Get nightly ref
if: contains(matrix.node-version, 'nightly')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
SHORT_SHA=$(node -p 'process.version.split(/-nightly\d{8}/)[1]')
echo "NIGHTLY_REF=$(gh api /repos/nodejs/node/commits/$SHORT_SHA | jq -r '.sha')" >> $GITHUB_ENV
- name: Checkout ${{ steps.setup-node.outputs.node-version }}
uses: actions/checkout@v3
with:
persist-credentials: false
ref: ${{ env.NIGHTLY_REF || steps.setup-node.outputs.node-version }}
- name: Set env.NODE
run: echo "NODE=$(which node)" >> $GITHUB_ENV

# replace checked out WPT with the synchronized branch
- name: Remove stale WPT
run: rm -rf wpt
working-directory: test/fixtures
- name: Checkout epochs/daily WPT
uses: actions/checkout@v3
with:
repository: web-platform-tests/wpt
persist-credentials: false
path: test/fixtures/wpt
clean: false
ref: epochs/daily
- name: Set env.WPT_REVISION
run: echo "WPT_REVISION=$(git rev-parse HEAD)" >> $GITHUB_ENV
working-directory: test/fixtures/wpt

- name: Run WPT and generate report
run: make test-wpt-report || true
- name: Clone report for upload
run: |
if [ -e out/wpt/wptreport.json ]; then
cd out/wpt
cp wptreport.json wptreport-${{ steps.setup-node.outputs.node-version }}.json
fi
- name: Upload GitHub Actions artifact
uses: actions/upload-artifact@v3
with:
path: out/wpt/wptreport-*.json
name: WPT Reports
if-no-files-found: warn
- name: Upload WPT Report to wpt.fyi API
env:
WPT_FYI_ENDPOINT: ${{ vars.WPT_FYI_ENDPOINT }}
WPT_FYI_USERNAME: ${{ vars.WPT_FYI_USERNAME }}
WPT_FYI_PASSWORD: ${{ secrets.WPT_FYI_PASSWORD }}
run: |
if [ -e out/wpt/wptreport.json ]; then
cd out/wpt
gzip wptreport.json
curl \
-u "$WPT_FYI_USERNAME:$WPT_FYI_PASSWORD" \
-F "[email protected]" \
-F "labels=master" \
$WPT_FYI_ENDPOINT
fi
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V19.md#19.6.0">19.6.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V19.md#19.6.1">19.6.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V19.md#19.6.0">19.6.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V19.md#19.5.0">19.5.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V19.md#19.4.0">19.4.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V19.md#19.3.0">19.3.0</a><br/>
Expand All @@ -45,7 +46,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V19.md#19.0.0">19.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.14.0">18.14.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V18.md#18.14.1">18.14.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.14.0">18.14.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.13.0">18.13.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.12.1">18.12.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V18.md#18.12.0">18.12.0</a><br/>
Expand All @@ -64,7 +66,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V18.md#18.0.0">18.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.19.0">16.19.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.19.1">16.19.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.19.0">16.19.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.18.1">16.18.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.18.0">16.18.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.17.1">16.17.1</a><br/>
Expand Down Expand Up @@ -99,7 +102,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V16.md#16.0.0">16.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.21.2">14.21.2</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.21.3">14.21.3</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.21.2">14.21.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.21.1">14.21.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.21.0">14.21.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.20.1">14.20.1</a><br/>
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,12 @@ test-message: test-build
test-wpt: all
$(PYTHON) tools/test.py $(PARALLEL_ARGS) wpt

.PHONY: test-wpt-report
test-wpt-report:
$(RM) -r out/wpt
mkdir -p out/wpt
WPT_REPORT=1 $(PYTHON) tools/test.py --shell $(NODE) $(PARALLEL_ARGS) wpt

.PHONY: test-simple
test-simple: | cctest # Depends on 'all'.
$(PYTHON) tools/test.py $(PARALLEL_ARGS) parallel sequential
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,6 @@ For information about the governance of the Node.js project, see
**Ash Cripps** <<[email protected]>>
* [Ayase-252](https://github.com/Ayase-252) -
**Qingyu Deng** <<[email protected]>>
* [bcoe](https://github.com/bcoe) -
**Ben Coe** <<[email protected]>> (he/him)
* [bengl](https://github.com/bengl) -
**Bryan English** <<[email protected]>> (he/him)
* [benjamingr](https://github.com/benjamingr) -
Expand Down Expand Up @@ -316,6 +314,8 @@ For information about the governance of the Node.js project, see
**Daniel Bevenius** <<[email protected]>> (he/him)
* [danielleadams](https://github.com/danielleadams) -
**Danielle Adams** <<[email protected]>> (she/her)
* [debadree25](https://github.com/debadree25) -
**Debadree Chatterjee** <<[email protected]>> (he/him)
* [deokjinkim](https://github.com/deokjinkim) -
**Deokjin Kim** <<[email protected]>> (he/him)
* [devnexen](https://github.com/devnexen) -
Expand Down Expand Up @@ -478,6 +478,8 @@ For information about the governance of the Node.js project, see
**Andreas Madsen** <<[email protected]>> (he/him)
* [aqrln](https://github.com/aqrln) -
**Alexey Orlenko** <<[email protected]>> (he/him)
* [bcoe](https://github.com/bcoe) -
**Ben Coe** <<[email protected]>> (he/him)
* [bmeurer](https://github.com/bmeurer) -
**Benedikt Meurer** <<[email protected]>>
* [boneskull](https://github.com/boneskull) -
Expand Down
9 changes: 8 additions & 1 deletion benchmark/worker/atomics-wait.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
'use strict';
/* global SharedArrayBuffer */

if (typeof SharedArrayBuffer === 'undefined') {
throw new Error('SharedArrayBuffers must be enabled to run this benchmark');
}

if (typeof Atomics === 'undefined') {
throw new Error('Atomics must be enabled to run this benchmark');
}

const common = require('../common.js');
const bench = common.createBenchmark(main, {
Expand Down
16 changes: 14 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@
default=None,
help='use on deprecated SunOS systems that do not support ifaddrs.h')

parser.add_argument('--disable-single-executable-application',
action='store_true',
dest='disable_single_executable_application',
default=None,
help='Disable Single Executable Application support.')

parser.add_argument("--fully-static",
action="store_true",
dest="fully_static",
Expand Down Expand Up @@ -571,7 +577,7 @@
action='store_const',
dest='with_intl',
const='none',
help='Disable Intl, same as --with-intl=none (disables inspector)')
help='Disable Intl, same as --with-intl=none')

intl_optgroup.add_argument('--with-icu-path',
action='store',
Expand Down Expand Up @@ -1357,6 +1363,10 @@ def configure_node(o):
if options.no_ifaddrs:
o['defines'] += ['SUNOS_NO_IFADDRS']

o['variables']['single_executable_application'] = b(not options.disable_single_executable_application)
if options.disable_single_executable_application:
o['defines'] += ['DISABLE_SINGLE_EXECUTABLE_APPLICATION']

o['variables']['node_with_ltcg'] = b(options.with_ltcg)
if flavor != 'win' and options.with_ltcg:
raise Exception('Link Time Code Generation is only supported on Windows.')
Expand Down Expand Up @@ -1669,6 +1679,9 @@ def icu_download(path):
# always set icu_small, node.gyp depends on it being defined.
o['variables']['icu_small'] = b(False)

# prevent data override
o['defines'] += ['ICU_NO_USER_DATA_OVERRIDE']

with_intl = options.with_intl
with_icu_source = options.with_icu_source
have_icu_path = bool(options.with_icu_path)
Expand Down Expand Up @@ -1921,7 +1934,6 @@ def icu_download(path):

def configure_inspector(o):
disable_inspector = (options.without_inspector or
options.with_intl in (None, 'none') or
options.without_ssl)
o['variables']['v8_enable_inspector'] = 0 if disable_inspector else 1

Expand Down
18 changes: 18 additions & 0 deletions deps/ada/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Copyright 2023 Ada authors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS 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. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 changes: 10 additions & 9 deletions deps/ada/ada.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* auto-generated on 2023-02-06 08:25:59 -0500. Do not edit! */
/* auto-generated on 2023-02-07 17:26:54 -0500. Do not edit! */
// dofile: invoked with prepath=/Users/yagiz/Developer/url-parser/src, filename=ada.cpp
/* begin file src/ada.cpp */
#include "ada.h"
Expand Down Expand Up @@ -970,6 +970,13 @@ namespace ada::helpers {
} while (true);
}
}

ada_really_inline void strip_trailing_spaces_from_opaque_path(ada::url& url) noexcept {
if (!url.has_opaque_path) return;
if (url.fragment.has_value()) return;
if (url.query.has_value()) return;
while (!url.path.empty() && url.path.back() == ' ') { url.path.resize(url.path.size()-1); }
}
} // namespace ada::helpers

namespace ada {
Expand Down Expand Up @@ -1650,7 +1657,7 @@ namespace ada {
void url::set_hash(const std::string_view input) {
if (input.empty()) {
fragment = std::nullopt;
// TODO: Potentially strip trailing spaces from an opaque path with this.
helpers::strip_trailing_spaces_from_opaque_path(*this);
return;
}

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

Expand All @@ -1679,10 +1684,6 @@ namespace ada {
ada::character_sets::QUERY_PERCENT_ENCODE;

query = ada::unicode::percent_encode(std::string_view(new_value), query_percent_encode_set);

// Set this’s query object’s list to the result of parsing input.
// @todo Implement this if/when we have URLSearchParams.
return ;
}

bool url::set_pathname(const std::string_view input) {
Expand Down
Loading

0 comments on commit 81c846e

Please sign in to comment.