Skip to content

Commit bb4ca75

Browse files
committed
Merge branch 'main' of https://github.com/mertcanaltin/node
2 parents f198605 + 4373139 commit bb4ca75

File tree

1,306 files changed

+20041
-20231
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,306 files changed

+20041
-20231
lines changed

.github/CODEOWNERS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,22 @@
2727

2828
# net
2929

30+
/deps/ada @nodejs/url
3031
/deps/cares @nodejs/net
3132
/doc/api/dns.md @nodejs/net
3233
/doc/api/dgram.md @nodejs/net
3334
/doc/api/net.md @nodejs/net
3435
/lib/dgram.js @nodejs/net
3536
/lib/dns.js @nodejs/net
3637
/lib/net.js @nodejs/net
38+
/lib/url.js @nodejs/url
3739
/lib/internal/dgram.js @nodejs/net
3840
/lib/internal/dns/* @nodejs/net
3941
/lib/internal/net.js @nodejs/net
4042
/lib/internal/socket_list.js @nodejs/net
4143
/lib/internal/js_stream_socket.js @nodejs/net
44+
/lib/internal/url.js @nodejs/url
45+
/src/node_url.* @nodejs/url
4246
/src/cares_wrap.cc @nodejs/net
4347
/src/connect_wrap.* @nodejs/net
4448
/src/connection_wrap.* @nodejs/net
@@ -136,3 +140,13 @@
136140
/lib/test.js @nodejs/test_runner
137141
/lib/internal/main/test_runner.js @nodejs/test_runner
138142
/lib/internal/test_runner/* @nodejs/test_runner
143+
144+
# Single Executable Applications
145+
/deps/postject @nodejs/single-executable
146+
/doc/api/single-executable-applications.md @nodejs/single-executable
147+
/doc/contributing/maintaining-postject.md @nodejs/single-executable
148+
/doc/contributing/maintaining-single-executable-application-support.md @nodejs/single-executable
149+
/src/node_sea* @nodejs/single-executable
150+
/test/fixtures/postject-copy @nodejs/single-executable
151+
/test/parallel/test-single-executable-* @nodejs/single-executable
152+
/tools/dep_updaters/update-postject.sh @nodejs/single-executable

.github/label-pr-config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ subSystemLabels:
3333
/^src\/node_worker/: c++, worker
3434
/^src\/quic\/*/: c++, quic, dont-land-on-v14.x
3535
/^src\/node_bob*/: c++, quic, dont-land-on-v14.x
36+
/^src\/node_sea/: single-executable
3637

3738
# don't label python files as c++
3839
/^src\/.+\.py$/: python, needs-ci

.github/workflows/authors.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ jobs:
4242
# install a version and checkout
4343
- name: Get latest nightly
4444
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
45+
run: echo "NIGHTLY=$(curl -s https://nodejs.org/download/nightly/index.json | jq -r '[.[] | select(.files[] | contains("linux-x64"))][0].version')" >> $GITHUB_ENV
4646
- name: Install Node.js
4747
id: setup-node
4848
uses: actions/setup-node@v3
4949
with:
5050
node-version: ${{ env.NIGHTLY || matrix.node-version }}
51+
check-latest: true
5152
- name: Get nightly ref
5253
if: contains(matrix.node-version, 'nightly')
5354
env:
@@ -96,16 +97,18 @@ jobs:
9697
if-no-files-found: warn
9798
- name: Upload WPT Report to wpt.fyi API
9899
env:
99-
WPT_FYI_ENDPOINT: ${{ vars.WPT_FYI_ENDPOINT }}
100100
WPT_FYI_USERNAME: ${{ vars.WPT_FYI_USERNAME }}
101101
WPT_FYI_PASSWORD: ${{ secrets.WPT_FYI_PASSWORD }}
102102
run: |
103103
if [ -e out/wpt/wptreport.json ]; then
104104
cd out/wpt
105105
gzip wptreport.json
106-
curl \
107-
-u "$WPT_FYI_USERNAME:$WPT_FYI_PASSWORD" \
108-
-F "result_file=@wptreport.json.gz" \
109-
-F "labels=master" \
110-
$WPT_FYI_ENDPOINT
106+
for WPT_FYI_ENDPOINT in "https://wpt.fyi/api/results/upload" "https://staging.wpt.fyi/api/results/upload"
107+
do
108+
curl \
109+
-u "$WPT_FYI_USERNAME:$WPT_FYI_PASSWORD" \
110+
-F "result_file=@wptreport.json.gz" \
111+
-F "labels=master" \
112+
$WPT_FYI_ENDPOINT
113+
done
111114
fi

.github/workflows/test-asan.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
CXX: clang++
4646
LINK: clang++
4747
CONFIG_FLAGS: --enable-asan
48+
ASAN: true
4849
steps:
4950
- uses: actions/checkout@v3
5051
with:

.github/workflows/tools.yml

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ jobs:
2121
subsystem: tools
2222
label: tools
2323
run: |
24-
NEW_VERSION=$(npm view eslint dist-tags.latest)
25-
CURRENT_VERSION=$(node -p "require('./tools/node_modules/eslint/package.json').version")
26-
if [ "$NEW_VERSION" != "$CURRENT_VERSION" ]; then
27-
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
28-
./tools/dep_updaters/update-eslint.sh
29-
fi
24+
./tools/dep_updaters/update-eslint.sh > temp-output
25+
cat temp-output
26+
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
27+
rm temp-output
3028
- id: corepack
3129
subsystem: deps
3230
label: dependencies
@@ -81,12 +79,10 @@ jobs:
8179
subsystem: deps,test
8280
label: test
8381
run: |
84-
NEW_VERSION=$(npm view postject dist-tags.latest)
85-
CURRENT_VERSION=$(node -p "require('./test/fixtures/postject-copy/node_modules/postject/package.json').version")
86-
if [ "$NEW_VERSION" != "$CURRENT_VERSION" ]; then
87-
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
88-
./tools/dep_updaters/update-postject.sh
89-
fi
82+
./tools/dep_updaters/update-postject.sh > temp-output
83+
cat temp-output
84+
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
85+
rm temp-output
9086
- id: base64
9187
subsystem: deps
9288
label: dependencies
@@ -122,28 +118,18 @@ jobs:
122118
subsystem: deps
123119
label: dependencies
124120
run: |
125-
NEW_VERSION=$(gh api repos/libuv/libuv/releases/latest -q '.tag_name|ltrimstr("v")')
126-
VERSION_H="./deps/uv/include/uv/version.h"
127-
CURRENT_MAJOR_VERSION=$(grep "#define UV_VERSION_MAJOR" $VERSION_H | sed -n "s/^.*MAJOR \(.*\)/\1/p")
128-
CURRENT_MINOR_VERSION=$(grep "#define UV_VERSION_MINOR" $VERSION_H | sed -n "s/^.*MINOR \(.*\)/\1/p")
129-
CURRENT_PATCH_VERSION=$(grep "#define UV_VERSION_PATCH" $VERSION_H | sed -n "s/^.*PATCH \(.*\)/\1/p")
130-
CURRENT_SUFFIX_VERSION=$(grep "#define UV_VERSION_SUFFIX" $VERSION_H | sed -n "s/^.*SUFFIX \"\(.*\)\"/\1/p")
131-
SUFFIX_STRING=$([[ -z "$CURRENT_SUFFIX_VERSION" ]] && echo "" || echo "-$CURRENT_SUFFIX_VERSION")
132-
CURRENT_VERSION="$CURRENT_MAJOR_VERSION.$CURRENT_MINOR_VERSION.$CURRENT_PATCH_VERSION$SUFFIX_STRING"
133-
if [ "$NEW_VERSION" != "$CURRENT_VERSION" ]; then
134-
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
135-
./tools/dep_updaters/update-libuv.sh "$NEW_VERSION"
136-
fi
121+
./tools/dep_updaters/update-libuv.sh > temp-output
122+
cat temp-output
123+
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
124+
rm temp-output
137125
- id: simdutf
138126
subsystem: deps
139127
label: dependencies
140128
run: |
141-
NEW_VERSION=$(gh api repos/simdutf/simdutf/releases/latest -q '.tag_name|ltrimstr("v")')
142-
CURRENT_VERSION=$(grep "#define SIMDUTF_VERSION" ./deps/simdutf/simdutf.h | sed -n "s/^.*VERSION \(.*\)/\1/p")
143-
if [ "$NEW_VERSION" != "$CURRENT_VERSION" ]; then
144-
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
145-
./tools/dep_updaters/update-simdutf.sh "$NEW_VERSION"
146-
fi
129+
./tools/dep_updaters/update-simdutf.sh > temp-output
130+
cat temp-output
131+
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
132+
rm temp-output
147133
- id: ada
148134
subsystem: deps
149135
label: dependencies
@@ -164,6 +150,27 @@ jobs:
164150
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
165151
./tools/update-nghttp2.sh "$NEW_VERSION"
166152
fi
153+
- id: llhttp
154+
subsystem: deps
155+
label: dependencies
156+
run: |
157+
NEW_VERSION=$(gh api repos/nodejs/llhttp/releases/latest -q '.tag_name|ltrimstr("release/v")')
158+
CURRENT_MAJOR_VERSION=$(grep "#define LLHTTP_VERSION_MAJOR" ./deps/llhttp/include/llhttp.h | sed -n "s/^.*MAJOR \(.*\)/\1/p")
159+
CURRENT_MINOR_VERSION=$(grep "#define LLHTTP_VERSION_MINOR" ./deps/llhttp/include/llhttp.h | sed -n "s/^.*MINOR \(.*\)/\1/p")
160+
CURRENT_PATCH_VERSION=$(grep "#define LLHTTP_VERSION_PATCH" ./deps/llhttp/include/llhttp.h | sed -n "s/^.*PATCH \(.*\)/\1/p")
161+
CURRENT_VERSION="$CURRENT_MAJOR_VERSION.$CURRENT_MINOR_VERSION.$CURRENT_PATCH_VERSION"
162+
if [ "$NEW_VERSION" != "$CURRENT_VERSION" ]; then
163+
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
164+
./tools/update-llhttp.sh "$NEW_VERSION"
165+
fi
166+
- id: c-ares
167+
subsystem: deps
168+
label: dependencies
169+
run: |
170+
./tools/dep_updaters/update-c-ares.sh > temp-output
171+
cat temp-output
172+
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
173+
rm temp-output
167174
steps:
168175
- uses: actions/checkout@v3
169176
with:

.github/workflows/update-openssl.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: OpenSSL update
2+
on:
3+
schedule:
4+
# Run once a week at 00:05 AM UTC on Sunday.
5+
- cron: 5 0 * * 0
6+
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
openssl-update:
14+
if: github.repository == 'nodejs/node'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
persist-credentials: false
20+
- name: Check if update branch already exists
21+
run: |
22+
BRANCH_EXISTS=$(git ls-remote --heads origin actions/tools-update-openssl)
23+
echo "BRANCH_EXISTS=$BRANCH_EXISTS" >> $GITHUB_ENV
24+
- name: Check and download new OpenSSL version
25+
# Only run rest of the workflow if the update branch does not yet exist
26+
if: ${{ env.BRANCH_EXISTS == '' }}
27+
run: |
28+
NEW_VERSION=$(gh api repos/quictls/openssl/releases -q '.[].tag_name|select(contains("openssl-3"))|ltrimstr("openssl-")' | head -n1)
29+
NEW_VERSION_NO_RELEASE_1=$(case $NEW_VERSION in *quic1) echo ${NEW_VERSION%1};; *) echo $NEW_VERSION;; esac)
30+
VERSION_H="./deps/openssl/config/archs/linux-x86_64/asm/include/openssl/opensslv.h"
31+
CURRENT_VERSION=$(grep "OPENSSL_FULL_VERSION_STR" $VERSION_H | sed -n "s/^.*VERSION_STR \"\(.*\)\"/\1/p")
32+
if [ "$NEW_VERSION_NO_RELEASE_1" != "$CURRENT_VERSION" ]; then
33+
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
34+
echo "HAS_UPDATE=true" >> $GITHUB_ENV
35+
./tools/dep_updaters/update-openssl.sh download "$NEW_VERSION"
36+
fi
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
39+
- name: Create PR with first commit
40+
if: env.HAS_UPDATE
41+
uses: gr2m/create-or-update-pull-request-action@v1
42+
# Creates a PR with the new OpenSSL source code committed
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
45+
with:
46+
author: Node.js GitHub Bot <github-bot@iojs.org>
47+
body: This is an automated update of OpenSSL to ${{ env.NEW_VERSION }}.
48+
branch: actions/tools-update-openssl # Custom branch *just* for this Action.
49+
commit-message: 'deps: upgrade openssl sources to quictls/openssl-${{ env.NEW_VERSION }}'
50+
labels: dependencies
51+
title: 'deps: update OpenSSL to ${{ env.NEW_VERSION }}'
52+
path: deps/openssl
53+
- name: Regenerate platform specific files
54+
if: env.HAS_UPDATE
55+
run: |
56+
sudo apt install -y nasm libtext-template-perl
57+
./tools/dep_updaters/update-openssl.sh regenerate
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
60+
- name: Add second commit
61+
# Adds a second commit to the PR with the generated platform-dependent files
62+
if: env.HAS_UPDATE
63+
uses: gr2m/create-or-update-pull-request-action@v1
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
66+
with:
67+
author: Node.js GitHub Bot <github-bot@iojs.org>
68+
branch: actions/tools-update-openssl # Custom branch *just* for this Action.
69+
commit-message: 'deps: update archs files for openssl-${{ env.NEW_VERSION }}'
70+
path: deps/openssl

0 commit comments

Comments
 (0)