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

[v22.x backport] module: add module.stripTypeScriptTypes #56208

Open
wants to merge 63 commits into
base: v22.x-staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
e03be6b
build: avoid compiling with VS v17.12
StefanStojanovic Nov 26, 2024
49e0319
src: safely remove the last line from dotenv
islandryu Nov 26, 2024
93d786e
tools: add WPT updater for specific subsystems
mertcanaltin Nov 26, 2024
f59c013
tools: update WPT updater
aduh95 Nov 26, 2024
13079df
process: deprecate `features.{ipv6,uv}` and `features.tls_*`
Renegade334 Nov 27, 2024
fddf9d1
cli: implement --trace-env and --trace-env-[js|native]-stack
joyeecheung Nov 27, 2024
43244d8
doc: remove confusing and outdated sentence
lpinca Nov 27, 2024
7d162d0
doc: fix deprecation codes
panva Nov 27, 2024
638f96f
doc: improve GN build documentation a bit
codebytere Nov 27, 2024
52d5222
doc: add history entry for textEncoder.encodeInto()
lpinca Nov 27, 2024
4380b26
doc: move history entry to class description
lpinca Nov 27, 2024
a7ac917
doc: add FAQ to releases section
RafaelGSS Nov 27, 2024
fc0f7b2
tools: filter release keys to reduce interactivity
aduh95 Nov 27, 2024
b755453
doc: remove unused import from sample code
blended-bram Nov 27, 2024
50b256c
test,crypto: update WebCryptoAPI WPT
panva Nov 28, 2024
ccb10df
fs: lazily load ReadFileContext
gurgunday Nov 28, 2024
8722343
test: update WPT for url to 67880a4eb83ca9aa732eec4b35a1971ff5bf37ff
nodejs-github-bot Nov 28, 2024
af39484
src: fix check fd
theanarkh Nov 28, 2024
899df21
quic: update more QUIC implementation
jasnell Nov 24, 2024
f4f09dc
tools: fix nghttp3 updater script
aduh95 Nov 28, 2024
fb03b6e
tools: allow dispatch of `tools.yml` from forks
aduh95 Nov 28, 2024
b51df55
deps: update zlib to 1.3.0.1-motley-82a5fec
nodejs-github-bot Nov 29, 2024
303dca7
tools: fix update-undici script
targos Nov 29, 2024
ab4f862
sqlite: deps include `sqlite3ext.h`
himself65 Nov 29, 2024
6d52447
meta: add releasers as CODEOWNERS to proposal action
RafaelGSS Nov 29, 2024
1a77846
build: remove defaults for create-release-proposal
RafaelGSS Nov 30, 2024
69112c6
doc: rename file to advocacy-ambassador-program.md
tniessen Nov 30, 2024
0711620
test: move test-worker-arraybuffer-zerofill to parallel
lpinca Dec 1, 2024
091a932
src: avoid copy on getV8FastApiCallCount
anonrig Dec 1, 2024
aefc195
src: remove dead code in async_wrap
Flarna Dec 1, 2024
68aab16
dgram: check udp buffer size to avoid fd leak
theanarkh Dec 2, 2024
4d8d012
src: use std::string_view for process emit fns
anonrig Dec 2, 2024
06ddd62
net: support blocklist for net.Server
theanarkh Dec 2, 2024
cec0e02
deps: update sqlite to 3.47.1
nodejs-github-bot Dec 3, 2024
92f061e
doc: add create-release-action to process
RafaelGSS Dec 3, 2024
617741a
src: add missing qualifiers to env.cc
anonrig Dec 3, 2024
8cf9609
build: allow overriding clang usage
codebytere Dec 3, 2024
1dfd129
src: use spaceship operator in SocketAddress
jasnell Nov 28, 2024
bcd0127
meta: bump actions/setup-node from 4.0.3 to 4.1.0
dependabot[bot] Dec 3, 2024
cc128aa
meta: bump step-security/harden-runner from 2.10.1 to 2.10.2
dependabot[bot] Dec 3, 2024
0851c4a
meta: bump actions/checkout from 4.1.7 to 4.2.2
dependabot[bot] Dec 3, 2024
df1a099
meta: bump github/codeql-action from 3.27.0 to 3.27.5
dependabot[bot] Dec 3, 2024
a6d4564
crypto: ensure CryptoKey usages and algorithm are cached objects
panva Dec 4, 2024
7637e02
test: update WPT for WebCryptoAPI to 76dfa54e5d
nodejs-github-bot Dec 1, 2024
42ea6a4
test: update WPT for WebCryptoAPI to 3e3374efde
nodejs-github-bot Dec 2, 2024
1b2e013
net: add net.BlockList.isBlockList(value)
jasnell Nov 29, 2024
b93a1ce
net: add SocketAddress.parse
jasnell Nov 29, 2024
809a1ed
doc: add LJHarb to collaborators
ljharb Dec 4, 2024
cc7c8e3
test: ensure `cli.md` is in alphabetical order
aduh95 Nov 27, 2024
507307f
deps: upgrade npm to 10.9.2
npm-cli-bot Dec 5, 2024
764ce2c
module: mark evaluation rejection in require(esm) as handled
joyeecheung Dec 5, 2024
61d8974
lib: fix `fs.readdir` recursive async
RafaelGSS Dec 5, 2024
dfb76f3
tools: update `create-release-proposal` workflow
aduh95 Dec 5, 2024
f3c257f
doc: mention `-a` flag for the release script
ruyadorno Dec 5, 2024
7499207
net: support blocklist in net.connect
theanarkh Dec 6, 2024
30ccb3f
test: remove test-fs-utimes flaky designation
lpinca Dec 6, 2024
bc9d6f3
lib: add validation for options in compileFunction
kimtaejin3 Dec 6, 2024
abe186b
deps: update ngtcp2 to 1.9.1
nodejs-github-bot Dec 6, 2024
1377528
src,build: add no user defined deduction guides of CTAD check
legendecas Dec 6, 2024
2dd61ae
util: add sourcemap support to getCallSites
marco-ippolito Nov 4, 2024
8aa18d1
module: simplify ts under node_modules check
marco-ippolito Oct 20, 2024
160136c
module: add module.stripTypeScriptTypes
marco-ippolito Oct 24, 2024
2756f71
doc: move typescript support to active development
marco-ippolito Oct 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
# Actions

/.github/workflows/* @nodejs/actions
/.github/workflows/create-release-proposal.yml @nodejs/releasers
/tools/actions/* @nodejs/actions

# Test runner
Expand Down
33 changes: 16 additions & 17 deletions .github/workflows/create-release-proposal.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This action requires the following secrets to be set on the repository:
# GH_USER_NAME: GitHub user whose Jenkins and GitHub token are defined below
# GH_USER_TOKEN: GitHub user token, to be used by ncu and to push changes
# JENKINS_TOKEN: Jenkins token, to be used to check CI status

name: Create Release Proposal

Expand All @@ -11,12 +10,10 @@ on:
release-line:
required: true
type: number
default: 23
description: 'The release line (without dots or prefix). e.g: 22'
release-date:
required: true
type: string
default: YYYY-MM-DD
description: The release date in YYYY-MM-DD format

concurrency: ${{ github.workflow }}
Expand All @@ -26,6 +23,7 @@ env:

permissions:
contents: write
pull-requests: write

jobs:
releasePrepare:
Expand All @@ -36,16 +34,14 @@ jobs:
RELEASE_LINE: ${{ inputs.release-line }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ env.STAGING_BRANCH }}
# Needs the whole git history for ncu to work
# See https://github.com/nodejs/node-core-utils/pull/486
fetch-depth: 0
persist-credentials: false

# Install dependencies
- name: Install Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ env.NODE_VERSION }}

Expand All @@ -58,29 +54,32 @@ jobs:
ncu-config set upstream origin
ncu-config set username "$USERNAME"
ncu-config set token "$GH_TOKEN"
ncu-config set jenkins_token "$JENKINS_TOKEN"
ncu-config set repo "$(echo "$GITHUB_REPOSITORY" | cut -d/ -f2)"
ncu-config set owner "${GITHUB_REPOSITORY_OWNER}"
env:
USERNAME: ${{ secrets.JENKINS_USER }}
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}
JENKINS_TOKEN: ${{ secrets.JENKINS_TOKEN }}
GH_TOKEN: ${{ github.token }}

- name: Set up ghauth config (Ubuntu)
run: |
mkdir -p ~/.config/changelog-maker/
echo '{
"user": "'$(ncu-config get username)'",
"token": "'$(ncu-config get token)'"
}' > ~/.config/changelog-maker/config.json
mkdir -p "${XDG_CONFIG_HOME:-~/.config}/changelog-maker"
echo '{}' | jq '{user: env.USERNAME, token: env.TOKEN}' > "${XDG_CONFIG_HOME:-~/.config}/changelog-maker/config.json"
env:
USERNAME: ${{ secrets.JENKINS_USER }}
TOKEN: ${{ github.token }}

- name: Setup git author
run: |
git config --local user.email "[email protected]"
git config --local user.name "Node.js GitHub Bot"

- name: Start git node release prepare
# The curl command is to make sure we run the version of the script corresponding to the current workflow.
run: |
git update-index --assume-unchanged tools/actions/create-release.sh
curl -fsSLo tools/actions/create-release.sh https://github.com/${GITHUB_REPOSITORY}/raw/${GITHUB_SHA}/tools/actions/create-release.sh
./tools/actions/create-release.sh "${RELEASE_DATE}" "${RELEASE_LINE}"
env:
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}
GH_TOKEN: ${{ github.token }}
# We want the bot to push the push the release commit so CI runs on it.
BOT_TOKEN: ${{ secrets.GH_USER_TOKEN }}
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@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
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@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ permissions:

jobs:
tools-deps-update:
if: github.repository == 'nodejs/node'
if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
strategy:
fail-fast: false # Prevent other jobs from aborting if one fails
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/update-wpt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: WPT update

on:
schedule:
# Run once a week at 12:00 AM UTC on Sunday.
- cron: 0 0 * * *
workflow_dispatch:
inputs:
subsystems:
description: Subsystem to run the update for
required: false
default: '["url", "WebCryptoAPI"]'

permissions:
contents: read

env:
NODE_VERSION: lts/*

jobs:
wpt-subsystem-update:
if: github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
subsystem: ${{ fromJSON(github.event.inputs.subsystems || '["url", "WebCryptoAPI"]') }}

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Install Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install @node-core/utils
run: npm install -g @node-core/utils

- name: Setup @node-core/utils
run: |
ncu-config set username "$USERNAME"
ncu-config set token "$GH_TOKEN"
ncu-config set owner "${GITHUB_REPOSITORY_OWNER}"
ncu-config set repo "$(echo "$GITHUB_REPOSITORY" | cut -d/ -f2)"
env:
USERNAME: ${{ secrets.JENKINS_USER }}
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}

- name: Update WPT for subsystem ${{ matrix.subsystem }}
run: |
git node wpt "$SUBSYSTEM"
env:
SUBSYSTEM: ${{ matrix.subsystem }}

- name: Retrieve new version commit
run: |
new_version="$(
node -p 'require("./test/fixtures/wpt/versions.json")[process.argv[1]].commit' "$SUBSYSTEM"
)"
{
echo "long_version=$new_version"
echo "short_version=${new_version:0:10}"
} >> "$GITHUB_ENV"
env:
SUBSYSTEM: ${{ matrix.subsystem }}

- name: Open or update PR for the subsystem update
uses: gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5
with:
branch: actions/update-wpt-${{ matrix.subsystem }}
author: Node.js GitHub Bot <[email protected]>
title: 'test: update WPT for ${{ matrix.subsystem }} to ${{ env.short_version }}'
commit-message: 'test: update WPT for ${{ matrix.subsystem }} to ${{ env.short_version }}'
labels: test
update-pull-request-title-and-body: true
body: >
This is an automated update of the WPT for ${{ matrix.subsystem }} to
https://github.com/web-platform-tests/wpt/commit/${{ env.long_version }}.
env:
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,8 @@ For information about the governance of the Node.js project, see
**Nitzan Uziely** <<[email protected]>>
* [LiviaMedeiros](https://github.com/LiviaMedeiros) -
**LiviaMedeiros** <<[email protected]>>
* [ljharb](https://github.com/ljharb) -
**Jordan Harband** <<[email protected]>>
* [lpinca](https://github.com/lpinca) -
**Luigi Pinca** <<[email protected]>> (he/him)
* [lukekarrys](https://github.com/lukekarrys) -
Expand Down
10 changes: 10 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@
default=None,
help='use the prefix to look for pre-installed headers')

parser.add_argument('--use_clang',
action='store_true',
dest='use_clang',
default=None,
help='use clang instead of gcc')

parser.add_argument('--dest-os',
action='store',
dest='dest_os',
Expand Down Expand Up @@ -1405,6 +1411,10 @@ def configure_node(o):
o['variables']['target_arch'] = target_arch
o['variables']['node_byteorder'] = sys.byteorder

# Allow overriding the compiler - needed by embedders.
if options.use_clang:
o['variables']['clang'] = 1

cross_compiling = (options.cross_compiling
if options.cross_compiling is not None
else target_arch != host_arch)
Expand Down
4 changes: 2 additions & 2 deletions deps/ngtcp2/ngtcp2/lib/includes/ngtcp2/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*
* Version number of the ngtcp2 library release.
*/
#define NGTCP2_VERSION "1.9.0"
#define NGTCP2_VERSION "1.9.1"

/**
* @macro
Expand All @@ -46,6 +46,6 @@
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
* becomes 0x010203.
*/
#define NGTCP2_VERSION_NUM 0x010900
#define NGTCP2_VERSION_NUM 0x010901

#endif /* !defined(NGTCP2_VERSION_H) */
32 changes: 23 additions & 9 deletions deps/ngtcp2/ngtcp2/lib/ngtcp2_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -5322,35 +5322,28 @@ int ngtcp2_conn_detect_lost_pkt(ngtcp2_conn *conn, ngtcp2_pktns *pktns,
* conn_recv_ack processes received ACK frame |fr|. |pkt_ts| is the
* timestamp when packet is received. |ts| should be the current
* time. Usually they are the same, but for buffered packets,
* |pkt_ts| would be earlier than |ts|.
* |pkt_ts| would be earlier than |ts|. This function needs to be
* called after |fr| is validated by ngtcp2_pkt_validate_ack.
*
* This function returns 0 if it succeeds, or one of the following
* negative error codes:
*
* NGTCP2_ERR_NOMEM
* Out of memory
* NGTCP2_ERR_ACK_FRAME
* ACK frame is malformed.
* NGTCP2_ERR_PROTO
* |fr| acknowledges a packet this endpoint has not sent.
* NGTCP2_ERR_CALLBACK_FAILURE
* User callback failed.
*/
static int conn_recv_ack(ngtcp2_conn *conn, ngtcp2_pktns *pktns, ngtcp2_ack *fr,
ngtcp2_tstamp pkt_ts, ngtcp2_tstamp ts) {
int rv;
ngtcp2_ssize num_acked;
ngtcp2_conn_stat *cstat = &conn->cstat;

if (pktns->tx.last_pkt_num < fr->largest_ack) {
return NGTCP2_ERR_PROTO;
}

rv = ngtcp2_pkt_validate_ack(fr, conn->local.settings.initial_pkt_num);
if (rv != 0) {
return rv;
}

ngtcp2_acktr_recv_ack(&pktns->acktr, fr);

num_acked =
Expand Down Expand Up @@ -6561,6 +6554,13 @@ conn_recv_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_path *path,
case NGTCP2_FRAME_ACK_ECN:
fr->ack.ack_delay = 0;
fr->ack.ack_delay_unscaled = 0;

rv =
ngtcp2_pkt_validate_ack(&fr->ack, conn->local.settings.initial_pkt_num);
if (rv != 0) {
return rv;
}

break;
}

Expand Down Expand Up @@ -8715,6 +8715,13 @@ conn_recv_delayed_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_pkt_info *pi,
case NGTCP2_FRAME_ACK_ECN:
fr->ack.ack_delay = 0;
fr->ack.ack_delay_unscaled = 0;

rv =
ngtcp2_pkt_validate_ack(&fr->ack, conn->local.settings.initial_pkt_num);
if (rv != 0) {
return rv;
}

break;
}

Expand Down Expand Up @@ -9200,6 +9207,13 @@ static ngtcp2_ssize conn_recv_pkt(ngtcp2_conn *conn, const ngtcp2_path *path,
assert(conn->remote.transport_params);
assign_recved_ack_delay_unscaled(
&fr->ack, conn->remote.transport_params->ack_delay_exponent);

rv =
ngtcp2_pkt_validate_ack(&fr->ack, conn->local.settings.initial_pkt_num);
if (rv != 0) {
return rv;
}

break;
}

Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm-ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For
example, running `npm ls promzard` in npm's source tree will show:

```bash
[email protected].1 /path/to/npm
[email protected].2 /path/to/npm
└─┬ [email protected]
└── [email protected]
```
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Note: This command is unaware of workspaces.

### Version

10.9.1
10.9.2

### Description

Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-access.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-access----1091">
<h1 id="----npm-access----1092">
<span>npm-access</span>
<span class="version">@10.9.1</span>
<span class="version">@10.9.2</span>
</h1>
<span class="description">Set access level on published packages</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-adduser.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-adduser----1091">
<h1 id="----npm-adduser----1092">
<span>npm-adduser</span>
<span class="version">@10.9.1</span>
<span class="version">@10.9.2</span>
</h1>
<span class="description">Add a registry user account</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-audit.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-audit----1091">
<h1 id="----npm-audit----1092">
<span>npm-audit</span>
<span class="version">@10.9.1</span>
<span class="version">@10.9.2</span>
</h1>
<span class="description">Run a security audit</span>
</header>
Expand Down
Loading
Loading