Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
86193ef
tools: fix redundant conditions in v8.gyp for riscv64 and loong64
JamieMagee Jul 6, 2026
54e8d3a
vfs: follow symlinked dirs in recursive mkdir
trivikr Jul 7, 2026
8679cff
deps: update zlib to 1.3.2.1-motley-8b3aa8a
nodejs-github-bot Jul 7, 2026
272632a
quic: fix potential crash from unobserved closed
pimterry Jul 7, 2026
933e5f1
quic: fix stall datagrams, if no pending streams
martenrichter Jul 7, 2026
f249614
stream: speed up async iteration over WHATWG byte streams
mcollina Jul 4, 2026
3b5bace
benchmark: add bytes variant to webstreams async-iterator
mcollina Jul 4, 2026
10ea17d
test: remove impact of tier-up changes in worker stack size test
joyeecheung Jul 7, 2026
fdbbf0a
test: handle null stdio streams in spawnSyncAndAssert helper
joyeecheung Jul 7, 2026
2d5f445
sqlite: read column count after step in StatementSync.all()
araujogui Jul 7, 2026
5f535fd
quic: fix no onstream handler crash quic
efekrskl Jul 7, 2026
a44fca5
http2: avoid per-write closures in kWriteGeneric
mcollina Jul 2, 2026
3329647
http2: avoid copying the options in respond()
mcollina Jul 3, 2026
2a51f8b
doc: remove obsolete --napi-modules doc entry
legendecas Jul 7, 2026
56ce83b
test_runner: report `entryFile` in `TestStream` events
MoLow Jul 7, 2026
d7a4b22
deps: V8: backport a05321ebd98e
legendecas Jun 29, 2026
7be42b6
vm: enable interception on global restricted properties
legendecas Jun 29, 2026
66f9b34
test: increase timeout in consumed-timeout test
trivikr Jul 8, 2026
ebe1600
stream: prefer sync iterator in fromSync
trivikr Jul 8, 2026
7d5d46e
tls: match IPv6 hosts against IP-Address SANs
JumpLink Jul 8, 2026
3dd11c4
meta: move one or more collaborators to emeritus
nodejs-github-bot Jul 8, 2026
9b04f82
ffi: add getCurrentEventLoop
ShogunPanda Jul 8, 2026
968eaf6
doc: various updates to releases.md
sxa Jun 29, 2026
c5526f6
doc: add note about restricted CI to pull-requests.md
sxa Jul 8, 2026
0a0193f
stream: hoist repeated loads in readable paths
anonrig Jul 5, 2026
e019061
stream: use ring buffer for WHATWG stream queues
anonrig Jul 5, 2026
3f55208
module: add two tests for eager imports when using `import defer`
MayaLekova Jul 8, 2026
abb62f9
quic: correct http3 callback and fix revealed errs
martenrichter Jul 8, 2026
ad2f3bc
deps: upgrade npm to 11.18.0
npm-cli-bot Jul 8, 2026
d636c9c
quic: extract transport logic from Application to Session
pimterry Jul 8, 2026
c097012
deps: update c-ares to 1.34.8
nodejs-github-bot Jul 8, 2026
424cec7
stream: avoid draining merged iter sources
trivikr Jul 8, 2026
d9ada18
buffer: fix Blob.stream() leaking source buffer
semimikoh Jul 9, 2026
19f5293
test: unmark flaky SEA snapshot tests on Windows
PickBas Jul 9, 2026
4cdceb7
test: unmark flaky http2-large-file for Win
PickBas Jul 9, 2026
b3ff5fe
test: normalize Windows crash in debugger test normalization
joyeecheung Jul 9, 2026
f29937d
stream: reject nested async streamables in from()
trivikr Jul 10, 2026
3519aac
deps: enable OpenSSL asm support for riscv64
JamieMagee Jul 10, 2026
4b3dbd3
doc: clarify proxy threat model
mcollina Jul 10, 2026
0104ae1
test: fix flaky watch + cwd + argv test-runner test
pimterry Jul 10, 2026
4f4bce6
stream: copy SAB-backed chunks in iter consumers
trivikr Jul 11, 2026
bc221a8
doc: add scope overview tables for TestsStream events
MoLow Jul 11, 2026
f745c42
stream: speed up reads and iteration over default WHATWG streams
mcollina Jul 11, 2026
46c9d72
deps: update ngtcp2 to 1.24.0
nodejs-github-bot Jul 11, 2026
0047ad7
http: remove unused n arg from IncomingMessage._read
efekrskl Jul 11, 2026
518d81b
stream: validate writevSync chunks before queuing
trivikr Jul 12, 2026
c5090a3
src: fix some typo errors and rename some variables
Archkon Jul 12, 2026
eb086a6
doc: remove duplicate VirtualProvider description
Archkon Jul 12, 2026
bb51f2c
test_runner: add context.log() and test:log event
MoLow Jul 12, 2026
ca4a166
tools: add option for `benchmark.yml` to post comment on PR
aduh95 Jul 12, 2026
3be3041
http: fix perf_hooks detail.req.url port and proxied path
stefanobaghino Jul 12, 2026
4df4a3f
net: make TCP Server and Socket transferable across worker threads
mcollina Jul 12, 2026
af08a11
test: fix 2nd flaky blob test case
pimterry Jul 12, 2026
5bdbd25
tools: add workflow to compare Nix changes
aduh95 Jul 12, 2026
0a46d1e
buffer: normalize lone "\r" in Blob native line endings
watilde Jul 12, 2026
ee46040
util: make MIMEParams accessors case-insensitive
watilde Jul 12, 2026
11ca52a
test: fix flaky http2 maxOriginSetSize test
pimterry Jul 13, 2026
3b7d778
doc: clarify fixes and refs trailer guidance
trivikr Jul 13, 2026
7d8d413
events: optimize once() and removeListener()
mcollina Jul 13, 2026
b6dd2de
doc: fix typos in documentation
sjungwon03 Jul 13, 2026
7b373ca
tools: disable zipping tarballs on GHA
aduh95 Jul 13, 2026
546e0e7
inspector: add --cond to node inspect probe mode
joyeecheung Jul 13, 2026
03e9c73
doc: update a Dispatcher undici doc link
panva Jul 13, 2026
508ec0e
src: zero-initialize cap_data in node_credentials.cc
spkapust Jul 13, 2026
b8656c4
doc: document net Socket server property
efekrskl Jul 13, 2026
ddf2c38
stream: use the ring buffer for WHATWG stream request queues
mcollina Jul 13, 2026
b923df8
events: avoid retaining removed event names
mcollina Jul 13, 2026
43a5ce4
test: update WPT for WebCryptoAPI to ec2fee39a4
nodejs-github-bot Jul 14, 2026
af55304
test: update WPT for urlpattern to 5847ee5cfa
nodejs-github-bot Jul 14, 2026
0e7554c
deps: update libffi to 3.7.1
nodejs-github-bot Jul 14, 2026
e5ea7cd
deps: update googletest to 8240fa7d62f73e01c7af27d61ed965d6d66698fa
nodejs-github-bot Jul 14, 2026
21389f7
test: fix stale async-context-frame status entries
PickBas Jul 14, 2026
59f4318
deps: V8: cherry-pick 1158ae719749
Renegade334 Jul 14, 2026
f60a12b
lib,tools: add `node-core/func-name-matching` lint rule
LiviaMedeiros Jul 14, 2026
ee5a545
doc,test: widen fsPromises.appendFile()'s data type, add missing tests
hkleungai Jul 14, 2026
6251f83
doc: fix typo in tls.md
watilde Jul 14, 2026
9786a59
doc: clarify PEM format for signing keys
harjothkhara Jul 15, 2026
4390f81
stream: simplify nested `PromisePrototypeThen`s
aduh95 Jul 15, 2026
0db4e10
test: copyedit `test-tls-psk-alpn-callback-exception-handling`
aduh95 Jul 15, 2026
394669e
doc: fix spelling in devcontainer guide
manNomi Jul 15, 2026
c791eed
net: support sync connect for BoundSocket
guybedford Jul 16, 2026
6c25ac9
build: extract temporal_capi crate directory name into gyp variable
Renegade334 Jul 16, 2026
8e7a5e9
stream: reject push iterator.throw() with error
trivikr Jul 16, 2026
d829aa1
stream: validate writer options signal
trivikr Jul 16, 2026
ce113ef
fs: fix cp symlink and EEXIST handling on Windows
PickBas Jul 16, 2026
6112ed5
stream: fold desired-size check into WHATWG backpressure update
mcollina Jul 16, 2026
591090c
quic: add support for TLS certificate compression
bjohansebas Jul 16, 2026
3f80ed2
tools: reference 'git node land' in PR-URL: error message in merge.sh
sxa Jul 16, 2026
ce54e2a
vfs: fix VirtualReadStream race with async iteration
Y1D7NG Jul 16, 2026
d978ce8
doc: document TLS alpnProtocol and servername fields
pimterry Jul 17, 2026
6ff5a1b
src: fix comment typos
sjungwon03 Jul 17, 2026
4b8cc9a
quic: preserve session stats after close
manNomi Jul 17, 2026
b38a39d
lib: use `assignFunctionName` util where it makes sense
aduh95 Jul 17, 2026
0b1f6ed
doc: fix typos in contributing docs
HoonDongKang Jul 17, 2026
d7e119b
test: keep finalization before-exit ref alive
pimterry Jul 17, 2026
37f93c3
vfs: make lchmod update symlink mode
trivikr Jul 17, 2026
5dd34d7
path: add benchmarks for path.matchesGlob()
beeequeue Jun 14, 2026
4a3ef5b
fs: add pattern cache for matchGlobPattern()
beeequeue Jun 13, 2026
e635ce5
doc: fix typo in embedding.md
greenheadHQ Jul 18, 2026
4d48984
http2: don't throw when destroying socket proxy
mcollina Jul 11, 2026
248ff9f
assert,util: fix TypeError on Maps with null keys
bitpshr Jul 18, 2026
68c4614
test: apply correction to comment
Trott Jul 18, 2026
2aad973
stream: resume flow when an errored pipe destination is removed
MahinAnowar Jul 18, 2026
7a02e4f
timers: do not retain a reference to the async store after firing
mcollina Jul 19, 2026
612f60c
cli: style node --help output with util.styleText
edsadr Jul 19, 2026
cf82de8
doc: note --env-file is not applied to --run
bitpshr Jul 19, 2026
f2f8881
ffi: evaluate function signatures once
trivikr Jul 20, 2026
9e6e9d4
meta: lower stale to 3 months
avivkeller Jul 20, 2026
018c7f1
doc: replace large tables in crypto.md and webcrypto.md with lists
panva Jul 20, 2026
ce21e56
doc: fix socket.readyState state descriptions
samuel871211 Jul 20, 2026
10f3f96
stream: fix drop-newest behavior in share()
trivikr Jul 21, 2026
04c78b8
deps: update timezone to 2026c
nodejs-github-bot Jul 21, 2026
d05993b
build: merge multiple on download artifact
legendecas Jul 21, 2026
0a89bef
src,permission: do not throw on denied access in audit mode
edsadr Jul 21, 2026
c2cfcf8
zlib: reject truncated zstd input
Archkon Jul 21, 2026
cf3f631
doc: update sea example by fixing wrong code example
saint-james-fr Jul 21, 2026
a63ee46
vfs: make recursive readdir iterative
AkshatOP Jul 21, 2026
7568ce7
doc: mention crypto.hash() for better perf
styfle Jul 21, 2026
5c692cb
doc: fix import.meta example for vm.SourceTextModule
zeeshan56656 Jul 21, 2026
d2c8acd
doc: use promote wording in release guide
Muhtasim-Munif-Fahim Jul 21, 2026
195f103
crypto: split OpenSSL 3, BoringSSL, and legacy backends
panva Jul 8, 2026
6e30204
crypto: limit KangarooTwelveParams customization to 512 bytes
panva Jul 19, 2026
11b4d50
crypto: retain legacy DH validation
panva Jul 16, 2026
33a0e08
crypto: handle incomplete RSA private keys
panva Jul 16, 2026
2fde794
crypto: cleanse provider private key copies
panva Jul 16, 2026
29a938d
crypto: preserve RSA-PSS legacy pubkey DER
panva Jul 16, 2026
5380bf2
src: avoid redundant DataPointer reallocations
panva Jul 21, 2026
54929af
src: avoid redundant KEM encapsulation copies
panva Jul 21, 2026
5a36018
doc: add MikeMcC399 as collaborator
MikeMcC399 Jul 21, 2026
f0811ba
stream: remove custom `CloneableDOMException` implementation
aduh95 Jul 22, 2026
9b53ec1
doc: fix typo in releases guide
hanityx Jul 22, 2026
c6378f7
doc: fix broken links and clean up type map
aduh95 Jul 22, 2026
f7bc0c6
tools: bump brace-expansion from 5.0.6 to 5.0.7 in /tools/eslint
dependabot[bot] Jul 23, 2026
8f415bf
doc: fix dnsPromises.lookup verbatim default
BIGSUS24 Jul 23, 2026
b122ca5
test: fix flaky http2 socket proxy test
pimterry Jul 23, 2026
0488d02
stream: update iterable streams to use budget backpressure
jasnell Jul 12, 2026
7331118
stream, quic: update iterable streams backpressure
jasnell Jul 13, 2026
46b1177
test: update quic tests for stream/iter update
jasnell Jul 22, 2026
7d50fe6
doc: mention DEPENDENCY custom field for H1 reports
RafaelGSS Jul 23, 2026
8e52064
quic: defer server session emit until TLS ClientHello is processed
pimterry Jul 23, 2026
8a4ca90
doc: clarify rules for adding new built-in modules
aduh95 Jul 23, 2026
5c0578c
stream: skip null output from stateful transforms
trivikr Jul 23, 2026
f403b30
stream: use RangeError for broadcast overflow
trivikr Jul 24, 2026
63e7119
stream: abort pending single-source merge reads
trivikr Jul 24, 2026
cf0622b
deps: update amaro to 1.1.11
nodejs-github-bot Jul 24, 2026
e0664f1
deps: update histogram to 0.11.10
nodejs-github-bot Jul 19, 2026
32ffff8
deps: histogram: cherry-pick 62ea52b07ee9b195
StefanStojanovic Jul 14, 2026
ec67e24
deps: update googletest to fa005b296f90faec4f352d7ab382287bf6548c8d
nodejs-github-bot Jul 24, 2026
df5b1e1
doc: remove unsupported syntax from `stream_iter.md`
aduh95 Jul 24, 2026
6edaf75
2026-08-03, Version 26.6.0 (Current)
aduh95 Jul 30, 2026
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
  •  
  •  
  •  
66 changes: 64 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,43 @@ on:
type: number
default: 30
description: How many times to repeat each benchmark
post-comment:
type: boolean
description: Post a comment linking to the run, with the aggregated result once known.
token:
type: string
description: A GitHub token to post comments cross repository (not recommended)

permissions:
contents: read

jobs:
post-comment:
if: inputs.post-comment
outputs:
body: ${{ steps.comment.outputs.COMMENT_BODY }}
url: ${{ steps.comment.outputs.COMMENT_URL }}
runs-on: ubuntu-slim
permissions:
pull-requests: write
steps:
- name: Mark token input as sensitive
if: inputs.token != ''
run: echo "::add-mask::${{ inputs.token }}"
- name: Add link to the current run
id: comment
run: |
FILTER_IF_SET=
[ -z "$FILTER" ] || FILTER_IF_SET=" / $FILTER"
COMMENT_BODY="Benchmark GHA (${CATEGORIES}${FILTER_IF_SET}): ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
echo "COMMENT_BODY=$COMMENT_BODY" >> "$GITHUB_OUTPUT"
echo "COMMENT_URL=$(gh pr comment -R "${REPO:-$GITHUB_REPOSITORY}" "$PR_ID" --body "$COMMENT_BODY")" >> "$GITHUB_OUTPUT"
env:
CATEGORIES: ${{ inputs.category }}
FILTER: ${{ inputs.filter }}
GH_TOKEN: ${{ inputs.token || github.token }}
REPO: ${{ inputs.repo }}
PR_ID: ${{ inputs.pr_id }}
build:
strategy:
fail-fast: true
Expand Down Expand Up @@ -155,9 +187,13 @@ jobs:
path: ${{ matrix.system }}.csv

aggregate-results:
needs: build
needs: [build, post-comment]
if: ${{ always() && needs.build.result == 'success' && needs.post-comment.result == (inputs.post-comment && 'success' || 'skipped') }}
name: Aggregate benchmark results
runs-on: ubuntu-slim
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
Expand Down Expand Up @@ -200,4 +236,30 @@ jobs:
echo "> [!WARNING] "
echo "> Do not take GHA benchmark results as face value, always confirm them"
echo "> using a dedicated machine, e.g. Jenkins CI."
' | tee /dev/stderr >> "$GITHUB_STEP_SUMMARY"
' | tee /dev/stderr ${{ inputs.post-comment && 'body.txt' || '' }} >> "$GITHUB_STEP_SUMMARY"
- name: Mark token input as sensitive
if: inputs.token != ''
run: echo "::add-mask::${{ inputs.token }}"
- name: Edit comment
if: inputs.post-comment
run: |
{
echo "$COMMENT_BODY"
echo
echo '<details><summary>Results</summary>'
echo
cat body.txt
echo
echo '</details>'
} | jq -Rrcs '{ body: . }' | gh api \
--method PATCH \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2026-03-10" \
"/repos/${REPO:-$GITHUB_REPOSITORY}/issues/comments/${COMMENT_URL##*-}" \
--input -
env:
GH_TOKEN: ${{ inputs.token || github.token }}
REPO: ${{ inputs.repo }}
COMMENT_BODY: ${{ needs.post-comment.outputs.body }}
COMMENT_URL: ${{ needs.post-comment.outputs.url }}
PR_ID: ${{ inputs.pr_id }}
3 changes: 2 additions & 1 deletion .github/workflows/build-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ jobs:
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: tarballs
path: tarballs
pattern: '*.tar.gz'
merge-multiple: true

- name: Extract tarball
shell: bash
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/build-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ jobs:
- name: Upload tarball artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: tarballs
path: '*.tar.gz'
compression-level: 0
archive: false
test-tarball-linux:
needs: build-tarball
runs-on: ubuntu-24.04-arm
Expand Down Expand Up @@ -125,7 +124,6 @@ jobs:
- name: Download tarball
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: tarballs
path: tarballs
- name: Extract tarball
run: |
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,26 +132,6 @@ jobs:
NODE=$(command -v node) make lint-md
env:
NODE_RELEASED_VERSIONS: ${{ steps.get-released-versions.outputs.NODE_RELEASED_VERSIONS }}
lint-nix:
if: github.event.pull_request.draft == false
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
sparse-checkout: '*.nix'
sparse-checkout-cone-mode: false
- uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
- name: Lint Nix files
run: |
nix-shell -I nixpkgs=./tools/nix/pkgs.nix -p 'nixfmt-tree' --run '
treefmt --quiet --ci
' && EXIT_CODE="$?" || EXIT_CODE="$?"
if [ "$EXIT_CODE" != "0" ]
then
git --no-pager diff || true
exit "$EXIT_CODE"
fi

lint-py:
if: github.event.pull_request.draft == false
Expand Down
98 changes: 98 additions & 0 deletions .github/workflows/nix-changes-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# This action requires the following secrets to be set on the repository:
# GH_USER_TOKEN: GitHub user token, to be used by ncu and to push changes
name: Comment on PR on Nix changes

on:
workflow_run:
workflows: [Nix files edited]
types: [completed]

permissions: {}

jobs:
aggregate-results:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' }}
name: Aggregate results
runs-on: ubuntu-slim
permissions:
pull-requests: write
steps:
- name: Download artefacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
run-id: ${{ github.event.workflow_run.id }}
# Using privileged token to be able to download file from a different workflow
github-token: ${{ secrets.GH_USER_TOKEN }}

- name: Fetch PR data
id: pr-data
run: |
mv requisites-*/* .
ls
if grep -nvHE '^/nix/store/[0-9a-df-np-sv-z]{32}-[A-Za-z0-9?=._+-]+$' requisites-*.list; then
echo 'Unexpected line format in requisites list; refusing to process.' >&2
exit 1
fi
echo "NUMBER=$(grep -E '^[0-9]+$' pr_number.txt || true)" >> "$GITHUB_OUTPUT"

- name: Aggregate results
if: ${{ steps.pr-data.outputs.NUMBER }}
run: |
set -x
> requisites-before.list
> requisites-after.list
TABLE=$(
echo '| Platform | Number of requisites | Proportion of new derivations |'
echo '| :-: | -: | -: |'
TOTAL_BEFORE=0
TOTAL_AFTER=0
TOTAL_CHANGED=0
QUOTE='`'
for PLATFORM in x86_64-linux aarch64-linux x86_64-darwin aarch64-darwin; do
BEFORE=$(wc -l < "requisites-${PLATFORM}-before.list")
TOTAL_BEFORE=$(($TOTAL_BEFORE + $BEFORE))
AFTER=$(wc -l < "requisites-${PLATFORM}-after.list")
TOTAL_AFTER=$(($TOTAL_AFTER + $AFTER))
DIFF="_no changes_"
[ "$BEFORE" = "$AFTER" ] || DIFF="**$([ "$AFTER" < "$BEFORE" ] || echo '+')$(($AFTER - $BEFORE))**"
CHANGED=$(git diff --no-index "requisites-${PLATFORM}-before.list" "requisites-${PLATFORM}-after.list" | grep -c '^+[^+]')
TOTAL_CHANGED=$(($TOTAL_CHANGED + $CHANGED))
PERCENT=100
[ "$CHANGED" = "$AFTER" ] || {
PERMILLE=$((1000 * $CHANGED / $AFTER))
PERCENT="$((PERMILLE / 10)).$((PERMILLE % 10))"
}
echo "| ${QUOTE}${PLATFORM}${QUOTE} | $BEFORE -> $AFTER => $DIFF | $CHANGED / $AFTER = $PERCENT% |"
awk '{ print $0 " ('"$PLATFORM"')" }' "requisites-${PLATFORM}-before.list" >> requisites-before.list
awk '{ print $0 " ('"$PLATFORM"')" }' "requisites-${PLATFORM}-after.list" >> requisites-after.list
done

DIFF="_no changes_"
[ "$TOTAL_BEFORE" = "$TOTAL_AFTER" ] || DIFF="**$([ "$TOTAL_AFTER" < "$TOTAL_BEFORE" ] || echo '+')$(($TOTAL_AFTER - $TOTAL_BEFORE))**"
PERCENT=100
[ "$TOTAL_CHANGED" = "$TOTAL_AFTER" ] || {
PERMILLE=$((1000 * $TOTAL_CHANGED / $TOTAL_AFTER))
PERCENT="$((PERMILLE / 10)).$((PERMILLE % 10))"
}
echo "| **Total** | $TOTAL_BEFORE -> $TOTAL_AFTER => $DIFF | $TOTAL_CHANGED / $TOTAL_AFTER = $PERCENT% |"
)
sort -k1.45 requisites-before.list > requisites-before.sort
sort -k1.45 requisites-after.list > requisites-after.sort
if git diff -U0 --no-color --no-index requisites-before.sort requisites-after.sort > requisites.diff; then
echo 'No changes detected.'
else
{
echo "$TABLE"
echo
echo '<details><summary>Changelog</summary>'
echo
echo '```diff'
tail -n +5 requisites.diff
echo '```'
echo
echo '</details>'
} | gh pr comment -R "$GITHUB_REPOSITORY" "$PR_NUMBER" -F -
fi
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ steps.pr-data.outputs.NUMBER }}
140 changes: 140 additions & 0 deletions .github/workflows/nix-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# This action uses the following secrets:
# CACHIX_AUTH_TOKEN: Write access to nodejs.cachix.org – without it, the cache is read-only.
name: Nix files edited

on:
push:
branches:
- main
- canary
- v[0-9]+.x-staging
- v[0-9]+.x
paths:
- '**.nix'
- .github/workflows/nix-changes.yml
pull_request:
paths:
- '**.nix'
- .github/workflows/nix-changes.yml
types: [opened, synchronize, reopened, ready_for_review]

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

permissions:
contents: read

jobs:
diff:
if: github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
system: x86_64-linux
- runner: ubuntu-24.04-arm
system: aarch64-linux
- runner: macos-15-intel
system: x86_64-darwin
- runner: macos-latest
system: aarch64-darwin
name: '${{ matrix.system }}: dependencies diff'
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 2
persist-credentials: false
sparse-checkout: '*.nix'
sparse-checkout-cone-mode: false

- uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
with:
extra_nix_config: sandbox = true

- uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
name: nodejs

- name: Compute requisites after change
shell: bash # See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference, we want the pipefail option.
run: |
nix-store --query --references "$(
nix-instantiate -I "nixpkgs=./tools/nix/pkgs.nix" shell.nix \
--arg devTools "
(import ./tools/nix/devTools.nix {})
++ builtins.attrValues (
{ inherit (import <nixpkgs> {}) nixfmt-tree sccache; }
// import ./tools/nix/openssl-matrix.nix {}
)")" \
| xargs nix-store --realise \
| xargs nix-store --query --requisites \
| sort -k1.45 \
> requisites-${{ matrix.system }}-after.list

- name: Compute requisites before change
shell: bash # See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference, we want the pipefail option.
run: |
git reset HEAD^ --hard
nix-store --query --references "$(
nix-instantiate -I "nixpkgs=./tools/nix/pkgs.nix" shell.nix \
--arg devTools "
(import ./tools/nix/devTools.nix {})
++ builtins.attrValues (
{ inherit (import <nixpkgs> {}) nixfmt-tree sccache; }
// import ./tools/nix/openssl-matrix.nix {}
)")" \
| xargs nix-store --realise \
| xargs nix-store --query --requisites \
| sort -k1.45 \
> requisites-${{ matrix.system }}-before.list

- name: Output diff
run: |
{
if diff_output="$(git diff -U0 --no-color --no-index requisites-${{ matrix.system }}-before.list requisites-${{ matrix.system }}-after.list)"; then
echo 'No changes detected.'
else
echo '```diff'
echo "$diff_output" | tail -n +5
echo '```'
fi
} >> "$GITHUB_STEP_SUMMARY"

- name: Store PR number
if: ${{ github.event.pull_request && matrix.system == 'x86_64-linux' }}
run: echo "${{ github.event.pull_request.number }}" > pr_number.txt

- name: Upload requisites lists
if: ${{ github.event.pull_request }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: requisites-${{ matrix.system }}
path: |
pr_number.*
requisites-${{ matrix.system }}-before.list
requisites-${{ matrix.system }}-after.list

lint-nix:
if: github.event.pull_request.draft == false
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
sparse-checkout: '*.nix'
sparse-checkout-cone-mode: false
- uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
- name: Lint Nix files
run: |
nix-shell -I nixpkgs=./tools/nix/pkgs.nix -p 'nixfmt-tree' --run '
treefmt --quiet --ci
' && EXIT_CODE="$?" || EXIT_CODE="$?"
if [ "$EXIT_CODE" != "0" ]
then
git --no-pager diff || true
exit "$EXIT_CODE"
fi
Loading
Loading