Skip to content

Commit

Permalink
Merge branch 'nodejs:main' into 55723
Browse files Browse the repository at this point in the history
  • Loading branch information
cu8code authored Nov 30, 2024
2 parents 62a5334 + 3fb2ea8 commit f9c605c
Show file tree
Hide file tree
Showing 802 changed files with 18,583 additions and 25,169 deletions.
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
3 changes: 1 addition & 2 deletions .github/workflows/coverage-linux-without-intl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ jobs:
- name: Clean tmp
run: rm -rf coverage/tmp && rm -rf out
- name: Upload
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
with:
directory: ./coverage
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 1 addition & 2 deletions .github/workflows/coverage-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ jobs:
- name: Clean tmp
run: rm -rf coverage/tmp && rm -rf out
- name: Upload
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
with:
directory: ./coverage
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 1 addition & 2 deletions .github/workflows/coverage-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ jobs:
- name: Clean tmp
run: npx rimraf ./coverage/tmp
- name: Upload
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
with:
directory: ./coverage
token: ${{ secrets.CODECOV_TOKEN }}
84 changes: 84 additions & 0 deletions .github/workflows/create-release-proposal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# 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

on:
workflow_dispatch:
inputs:
release-line:
required: true
type: number
description: 'The release line (without dots or prefix). e.g: 22'
release-date:
required: true
type: string
description: The release date in YYYY-MM-DD format

concurrency: ${{ github.workflow }}

env:
NODE_VERSION: lts/*

permissions:
contents: write

jobs:
releasePrepare:
env:
STAGING_BRANCH: v${{ inputs.release-line }}.x-staging
RELEASE_BRANCH: v${{ inputs.release-line }}.x
RELEASE_DATE: ${{ inputs.release-date }}
RELEASE_LINE: ${{ inputs.release-line }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
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

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

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

- name: Configure @node-core/utils
run: |
ncu-config set branch "${RELEASE_BRANCH}"
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 }}

- 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
- 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
run: |
./tools/actions/create-release.sh "${RELEASE_DATE}" "${RELEASE_LINE}"
env:
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}
59 changes: 59 additions & 0 deletions .github/workflows/lint-release-proposal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Linters (release proposals)

on:
push:
branches:
- v[0-9]+.[0-9]+.[0-9]+-proposal

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

env:
PYTHON_VERSION: '3.12'
NODE_VERSION: lts/*

permissions:
contents: read

jobs:
lint-release-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Lint release commit title format
run: |
EXPECTED_TITLE='^[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}, Version [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ (\(Current|'.+' \(LTS)\)$'
echo "Expected commit title format: $EXPECTED_TITLE"
COMMIT_SUBJECT="$(git --no-pager log -1 --format=%s)"
echo "Actual: $ACTUAL"
echo "$COMMIT_SUBJECT" | grep -q -E "$EXPECTED_TITLE"
echo "COMMIT_SUBJECT=$COMMIT_SUBJECT" >> "$GITHUB_ENV"
- name: Lint release commit message trailers
run: |
EXPECTED_TRAILER="^PR-URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/[[:digit:]]+\$"
echo "Expected trailer format: $EXPECTED_TRAILER"
ACTUAL="$(git --no-pager log -1 --format=%b | git interpret-trailers --parse --no-divider)"
echo "Actual: $ACTUAL"
echo "$ACTUAL" | grep -E -q "$EXPECTED_TRAILER"
PR_URL="${ACTUAL:8}"
PR_HEAD="$(gh pr view "$PR_URL" --json headRefOid -q .headRefOid)"
echo "Head of $PR_URL: $PR_HEAD"
echo "Current commit: $GITHUB_SHA"
[[ "$PR_HEAD" == "$GITHUB_SHA" ]]
env:
GH_TOKEN: ${{ github.token }}
- name: Validate CHANGELOG
id: releaser-info
run: |
EXPECTED_CHANGELOG_TITLE_INTRO="## $COMMIT_SUBJECT, @"
echo "Expected CHANGELOG section title: $EXPECTED_CHANGELOG_TITLE_INTRO"
CHANGELOG_TITLE="$(grep "$EXPECTED_CHANGELOG_TITLE_INTRO" "doc/changelogs/CHANGELOG_V${COMMIT_SUBJECT:20:2}.md")"
echo "Actual: $CHANGELOG_TITLE"
[[ "${CHANGELOG_TITLE%@*}@" == "$EXPECTED_CHANGELOG_TITLE_INTRO" ]]
- name: Verify NODE_VERSION_IS_RELEASE bit is correctly set
run: |
grep -q '^#define NODE_VERSION_IS_RELEASE 1$' src/node_version.h
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@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
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 }}
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ release.
<th title="LTS Until 2025-04"><a href="doc/changelogs/CHANGELOG_V18.md">18</a> (LTS)</th>
</tr>
<tr>
<b><a href="doc/changelogs/CHANGELOG_V23.md#23.2.0">23.2.0</a></b><br/>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V23.md#23.3.0">23.3.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V23.md#23.2.0">23.2.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V23.md#23.1.0">23.1.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V23.md#23.0.0">23.0.0</a><br/>
</td>
Expand All @@ -59,7 +61,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V22.md#22.0.0">22.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V20.md#20.18.0">20.18.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V20.md#20.18.1">20.18.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.18.0">20.18.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.17.0">20.17.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.16.0">20.16.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.15.1">20.15.1</a><br/>
Expand Down
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,11 @@ ifeq ($(OSTYPE),os400)
DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp
endif

node_use_openssl = $(call available-node,"-p" \
"process.versions.openssl != undefined")
node_use_openssl_and_icu = $(call available-node,"-p" \
"process.versions.openssl != undefined && process.versions.icu != undefined")
test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
echo "Skipping .docbuildstamp (no crypto)"; \
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
echo "Skipping .docbuildstamp (no crypto and/or no ICU)"; \
else \
$(RM) -r test/addons/??_*/; \
[ -x $(NODE) ] && $(NODE) $< || node $< ; \
Expand Down Expand Up @@ -535,7 +535,7 @@ NATIVE_SUITES ?= addons js-native-api node-api
# CI_* variables should be kept synchronized with the ones in vcbuild.bat
CI_NATIVE_SUITES ?= $(NATIVE_SUITES) benchmark
CI_JS_SUITES ?= $(JS_SUITES) pummel
ifeq ($(node_use_openssl), false)
ifeq ($(node_use_openssl_and_icu), false)
CI_DOC := doctool
else
CI_DOC =
Expand Down Expand Up @@ -632,8 +632,8 @@ test-hash-seed: all ## Verifu that the hash seed used by V8 for hashing is rando

.PHONY: test-doc
test-doc: doc-only lint-md ## Build, lint, and verify the docs.
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
echo "Skipping test-doc (no crypto)"; \
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
echo "Skipping test-doc (no crypto and/or no ICU)"; \
else \
$(PYTHON) tools/test.py $(PARALLEL_ARGS) doctool; \
fi
Expand Down Expand Up @@ -749,17 +749,17 @@ apidocs_json = $(addprefix out/,$(apidoc_sources:.md=.json))
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))

tools/doc/node_modules: tools/doc/package.json
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
echo "Skipping tools/doc/node_modules (no crypto)"; \
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
echo "Skipping tools/doc/node_modules (no crypto and/or no ICU)"; \
else \
cd tools/doc && $(call available-node,$(run-npm-ci)) \
fi

.PHONY: doc-only
doc-only: tools/doc/node_modules \
$(apidoc_dirs) $(apiassets) ## Build the docs with the local or the global Node.js binary.
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
echo "Skipping doc-only (no crypto)"; \
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
echo "Skipping doc-only (no crypto and/or no ICU)"; \
else \
$(MAKE) out/doc/api/all.html out/doc/api/all.json out/doc/api/stability; \
fi
Expand Down Expand Up @@ -1382,8 +1382,8 @@ lint-js-fix: tools/eslint/node_modules/eslint/bin/eslint.js ## Lint and fix the
# Note that on the CI `lint-js-ci` is run instead.
lint-js-doc: LINT_JS_TARGETS=doc
lint-js lint-js-doc: tools/eslint/node_modules/eslint/bin/eslint.js ## Lint the JavaScript code with eslint./eslint/bin/eslint.js
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
echo "Skipping $@ (no crypto)"; \
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
echo "Skipping $@ (no crypto and/or no ICU)"; \
else \
echo "Running JS linter..."; \
$(call available-node,$(run-lint-js)) \
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,6 @@ maintaining the Node.js project.
**Mert Can Altin** <<[email protected]>>
* [preveen-stack](https://github.com/preveen-stack) -
**Preveen Padmanabhan** <<[email protected]>> (he/him)
* [RedYetiDev](https://github.com/RedYetiDev) -
**Aviv Keller** <<[email protected]>> (they/them)
* [VoltrexKeyva](https://github.com/VoltrexKeyva) -
**Mohammed Keyvanzadeh** <<[email protected]>> (he/him)

Expand Down
12 changes: 12 additions & 0 deletions deps/corepack/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [0.30.0](https://github.com/nodejs/corepack/compare/v0.29.4...v0.30.0) (2024-11-23)


### Features

* update package manager versions ([#578](https://github.com/nodejs/corepack/issues/578)) ([a286c8f](https://github.com/nodejs/corepack/commit/a286c8f5537ea9ecf9b6ff53c7bc3e8da4e3c8bb))


### Performance Improvements

* prefer `module.enableCompileCache` over `v8-compile-cache` ([#574](https://github.com/nodejs/corepack/issues/574)) ([cba6905](https://github.com/nodejs/corepack/commit/cba690575bd606faeee54bd512ccb8797d49055f))

## [0.29.4](https://github.com/nodejs/corepack/compare/v0.29.3...v0.29.4) (2024-09-07)


Expand Down
1 change: 1 addition & 0 deletions deps/corepack/dist/corepack.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='0';
require('module').enableCompileCache?.();
require('./lib/corepack.cjs').runMain(process.argv.slice(2));
Loading

0 comments on commit f9c605c

Please sign in to comment.