Skip to content

2025-06-09, Version 24.2.0 (Current) #58635

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

Merged
merged 156 commits into from
Jun 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
72f2a22
module: clarify cjs global-like error on ModuleJobSync
Ceres6 May 16, 2025
3b1e4bd
deps: update libuv to 1.51.0
nodejs-github-bot May 16, 2025
2d5a1ef
vm: import call should return a promise in the current context
legendecas May 16, 2025
f30b911
http2: add diagnostics channel 'http2.client.stream.error'
RaisinTen May 16, 2025
7ff3718
build: fix defaults for shared llhttp
aduh95 May 16, 2025
429c38d
node-api: use WriteV2 in napi_get_value_string_utf16
tniessen May 16, 2025
f373d6a
node-api: use WriteOneByteV2 in napi_get_value_string_latin1
legendecas May 16, 2025
f2e2301
fs: unexpose internal constants
legendecas May 16, 2025
32070f3
tools: add missing highway defines for IBM i
abmusse May 17, 2025
208d6a5
tools: support explicit resource management in eslint
LiviaMedeiros May 12, 2025
3caa2f7
stream: test explicit resource management implicitly
LiviaMedeiros May 12, 2025
23416cc
worker: give names to `MessagePort` functions
LiviaMedeiros May 17, 2025
8b5ada4
buffer: use Utf8LengthV2() instead of Utf8Length()
tniessen May 17, 2025
566fc56
http2: add diagnostics channel 'http2.client.stream.finish'
RaisinTen May 13, 2025
5e27078
deps: update ada to 3.2.4
nodejs-github-bot May 18, 2025
b0e0b1a
net: always publish to 'net.client.socket' diagnostics channel
RaisinTen May 18, 2025
1091066
deps: update undici to 7.9.0
nodejs-github-bot May 18, 2025
462c4b0
readline: add stricter validation for functions called after closed
dario-piotrowicz May 18, 2025
4ae6a1a
test: remove references to create(De|C)ipher
tniessen May 18, 2025
c094bea
tty: use terminal VT mode on Windows
addaleax May 18, 2025
db7f413
build: fix pointer compression builds
joyeecheung May 4, 2025
8f09a1f
test: skip wasm-allocation tests for pointer compression builds
joyeecheung May 4, 2025
0885546
http2: add diagnostics channel 'http2.client.stream.close'
RaisinTen May 19, 2025
1eda87c
test_runner: add level parameter to reporter.diagnostic
JacopoPatroclo May 19, 2025
33f6158
test: add chacha20-poly1305 to auth tag order test
tniessen May 19, 2025
b882148
path: improve path.resolve() performance when used as process.cwd()
BridgeAR May 19, 2025
d0302e7
test: remove loop over single element
tniessen May 19, 2025
402ac8b
inspector: add protocol method Network.dataReceived
legendecas May 19, 2025
a35cc21
src: track cppgc wrappers with a list in Realm
joyeecheung May 19, 2025
23474cb
test: show more information in test-http2-debug upon failure
joyeecheung May 20, 2025
d05263e
test: do not skip OCB decryption in FIPS mode
tniessen May 21, 2025
ddab63a
tty: improve color terminal color detection
BridgeAR May 21, 2025
ef9ecbe
child_process: give names to `ChildProcess` functions
LiviaMedeiros May 21, 2025
0b4056c
build: add support for OpenHarmony operating system
hqzing May 21, 2025
8df4dee
lib: remove no-mixed-operators eslint rule
BridgeAR May 21, 2025
029440b
test: switch from deprecated `optparse` to `argparse`
avivkeller May 21, 2025
3b5d0e6
test: test reordering of setAAD and setAuthTag
tniessen May 21, 2025
1ed2deb
typings: remove no longer valid `revokeDataObject` type
dario-piotrowicz May 13, 2025
3499285
typings: remove no longer valid `FixedSizeBlobCopyJob` type
dario-piotrowicz May 13, 2025
9fccb06
crypto: expose crypto.constants.OPENSSL_IS_BORINGSSL
codebytere May 22, 2025
89fdfde
test: make crypto tests work with BoringSSL
codebytere May 22, 2025
22e9736
build: search for libnode.so in multiple places
khardix May 22, 2025
e6e6ae8
doc: fix the order of `process.md` sections
mureinik May 22, 2025
308f4ca
esm: add support for dynamic source phase hook
guybedford May 3, 2025
62056d4
doc: clarify behavior of --watch-path and --watch flags
juanibe May 3, 2025
cbb2a01
report: use uv_getrusage_thread in report
theanarkh May 22, 2025
ce081bc
src: fix build when using shared simdutf
aduh95 May 22, 2025
8870bb8
fs: improve `cpSync` dest overriding performance
dario-piotrowicz May 23, 2025
a57b05e
benchmark: add more options to cp-sync
sonsurim May 23, 2025
7acac70
doc: remove remaining uses of `@@wellknown` syntax
Renegade334 May 23, 2025
53cb298
test: fix missing edge case in test-blob-slice-with-large-size
joyeecheung May 23, 2025
4c445a8
test: skip in test-buffer-tostring-rangeerror on allocation failure
joyeecheung May 23, 2025
4629b18
test: fix test-buffer-tostring-range on allocation failure
joyeecheung May 23, 2025
5fc4706
test: leverage process.features.openssl_is_boringssl in test
codebytere May 24, 2025
18bb5f7
meta: bump actions/download-artifact from 4.2.1 to 4.3.0
dependabot[bot] May 24, 2025
7f1c95a
src: make a number of minor improvements to buffer
jasnell May 18, 2025
095794f
doc: add links to parent class for `node:zlib` classes
aduh95 May 25, 2025
87eebd7
deps: keep required OpenSSL doc files
targos May 25, 2025
13dbbdc
http2: add diagnostics channel 'http2.server.stream.created'
RaisinTen May 25, 2025
cc1aaca
lib: make ERM functions into wrappers returning undefined
LiviaMedeiros May 25, 2025
46aa079
benchmark: add callback-based `fs.glob` to glob benchmark
LiviaMedeiros May 25, 2025
7dfe448
meta: bump codecov/codecov-action from 5.4.0 to 5.4.2
dependabot[bot] May 25, 2025
4606a67
meta: bump github/codeql-action from 3.28.11 to 3.28.16
dependabot[bot] May 25, 2025
d86ff60
http2: remove no longer userful options.selectPadding
hkleungai May 25, 2025
3a6bd9c
sqlite: handle thrown errors in result callback
cjihrig May 25, 2025
e8a07f2
stream: making DecompressionStream spec compilent for trailing junk
0hmX May 26, 2025
aeb9ab4
worker: make Worker async disposable
jasnell May 24, 2025
7a91f4a
test: add test for async disposable worker thread
jasnell May 24, 2025
532c173
util: add 'none' style to styleText
jasnell May 23, 2025
13abca3
perf_hooks: make event loop delay histogram disposable
jasnell May 24, 2025
5936cef
test: add disposable histogram test
jasnell May 24, 2025
27ada1f
meta: move one or more collaborators to emeritus
nodejs-github-bot May 26, 2025
3b6895a
src: improve CompileFunctionAndCacheResult error handling
legendecas May 23, 2025
63f643e
src: reorganize ContextifyFunction methods
legendecas May 23, 2025
08615b1
src: prepare for v8 sandboxing
jasnell May 18, 2025
252acc1
errors: show url of unsupported attributes in the error message
Aditi-1400 May 26, 2025
beba631
test: add tests ensuring worker threads cannot access internals
Lordfirespeed May 26, 2025
adef9af
esm: implement import.meta.main
Lordfirespeed May 26, 2025
44df21b
zlib: remove mentions of unexposed Z_TREES constant
hkleungai May 27, 2025
1deb5f0
test: remove --no-warnings flag
tniessen May 27, 2025
21f6400
test: update WPT for WebCryptoAPI to 591c95ce61
nodejs-github-bot May 27, 2025
8bc0452
benchmark: fix broken fs.cpSync benchmark
dario-piotrowicz May 27, 2025
767e88c
esm: unwrap WebAssembly.Global on Wasm Namespaces
guybedford Feb 28, 2025
fcc881d
tools: support `DisposableStack` and `AsyncDisposableStack` in linter
LiviaMedeiros May 25, 2025
7e62a77
deps: update undici to 7.10.0
nodejs-github-bot May 27, 2025
0868525
doc: clarify x509.checkIssued only checks metadata
panva May 28, 2025
e3e36f9
repl: extract and standardize history from both repl and interface
puskin May 28, 2025
a994d3d
doc,src,test: fix typos
noritaka1166 May 28, 2025
79b852a
inspector: add mimeType and charset support to Network.Response
islandryu May 28, 2025
440d4f4
src: fix -Wreturn-stack-address error
codebytere May 28, 2025
510872a
doc: graduate Symbol.dispose/asyncDispose from experimental
jasnell May 26, 2025
a6d0d2a
doc: add missing options.info for BrotliOptions
hkleungai May 28, 2025
4bbd026
doc: add missing options.info for ZstdOptions
hkleungai May 28, 2025
5f3f045
doc: update `git node release` example
aduh95 May 28, 2025
007c82f
test: mark `test-http2-debug` as flaky on LinuxONE
richardlau May 28, 2025
e13930b
doc: add Filip Skokan to TSC
RafaelGSS May 28, 2025
bef67e4
test: account for truthy signal in flaky async_hooks tests
RaisinTen May 29, 2025
b4df8d3
http2: add diagnostics channel 'http2.server.stream.start'
RaisinTen May 29, 2025
80cc17f
doc: explain child_process code and signal null values everywhere
RaisinTen May 29, 2025
ca0f5a0
src: add env->cppgc_allocation_handle() convenience method
jasnell May 29, 2025
11e4cd6
src: fix possible dereference of null pointer
Eusgor May 29, 2025
4d9d683
test: force slow JSON.stringify path for overflow
codebytere May 30, 2025
947c1c2
src,lib: obtain sourceURL in magic comments from V8
legendecas May 30, 2025
dc21054
typings: add inspector internalBinding typing
islandryu May 30, 2025
d99d657
src: fix FIPS init error handling
tniessen May 30, 2025
4d64727
test_runner: emit event when file changes in watch mode
JacopoPatroclo May 30, 2025
8d2ba38
deps: update OpenSSL gen container to Ubuntu 22.04
targos May 30, 2025
8a1eaea
src: update std::vector<v8::Local<T>> to use v8::LocalVector<T>
Aditi-1400 May 31, 2025
af0446e
doc: deprecate HTTP/2 priority signaling
mcollina May 29, 2025
2f555e0
doc: clarify DEP0194 scope
aduh95 May 31, 2025
d7a2458
test: make sqlite-database-sync tests work with system sqlite
jellelicht Jun 1, 2025
2b868e8
http2: add diagnostics channel 'http2.server.stream.error'
RaisinTen Jun 1, 2025
32efb63
http: deprecate instantiating classes without new
anonrig Jun 1, 2025
1cd417d
permission: remove useless conditional
juanarbol Jun 2, 2025
b8c3319
build,win: fix dll build
StefanStojanovic Jun 2, 2025
6bddf58
dns: fix dns query cache implementation
Ethan-Arrowood Jun 2, 2025
0f1e94f
lib: graduate error codes that have been around for years
jasnell Jun 3, 2025
f72ce2e
src: remove fast API for InternalModuleStat
joyeecheung Jun 3, 2025
34e86f9
test: rewrite test-child-process-spawn-args
targos Jun 3, 2025
cec9d9d
crypto: forward auth tag to OpenSSL immediately
tniessen Jun 3, 2025
1337751
tools: bump the eslint group in `/tools/eslint` with 6 updates
dependabot[bot] Jun 3, 2025
29f34a7
lib: disable REPL completion on proxies and getters
dario-piotrowicz Jun 4, 2025
0234a8e
http2: add diagnostics channel 'http2.server.stream.finish'
RaisinTen Jun 4, 2025
447ca11
doc: correct formatting of example definitions for `--test-shard`
JakobJingleheimer Jun 4, 2025
eb9bb95
meta: bump rtCamp/action-slack-notify from 2.3.2 to 2.3.3
dependabot[bot] Jun 4, 2025
4da920c
meta: bump ossf/scorecard-action from 2.4.1 to 2.4.2
dependabot[bot] Jun 4, 2025
88e621e
deps: update sqlite to 3.50.0
nodejs-github-bot Jun 4, 2025
6f4c9dd
fs: add autoClose option to FileHandle readableWebStream
jasnell Jun 1, 2025
8347ef6
test: dispose of filehandles in filehandle.read tests
LiviaMedeiros Jun 5, 2025
efb28f7
deps: V8: cherry-pick 249de887a8d3
targos Jun 5, 2025
d261274
doc: deprecate passing an empty string to `options.shell`
aduh95 Jun 5, 2025
f8a2a1e
deps: update corepack to 0.33.0
nodejs-github-bot Jun 5, 2025
44ca874
http2: add lenient flag for RFC-9113
metcoder95 Jun 5, 2025
588c244
win,tools: use Azure Trusted Signing
StefanStojanovic Jun 5, 2025
33a69ff
doc: update metadata for _transformState deprecation
jasnell Jun 5, 2025
d3fea00
test: mark timeouts & flaky test as flaky on IBM i
abmusse Jun 6, 2025
8ea1fc5
src: support namespace options in configuration file
pmarchini Jun 6, 2025
0d761bb
src: env_vars caching and local variable scope optimization
mertcanaltin Jun 6, 2025
6c92329
Revert "benchmark: fix broken fs.cpSync benchmark"
jakecastelli May 27, 2025
d2931e5
fs: fix cpSync handle existing symlinks
jakecastelli May 27, 2025
996fdb0
fs: fix cp handle existing symlinks
jakecastelli May 27, 2025
f31e014
meta: bump step-security/harden-runner from 2.11.0 to 2.12.0
dependabot[bot] Jun 7, 2025
b454e83
meta: bump codecov/codecov-action from 5.4.2 to 5.4.3
dependabot[bot] Jun 7, 2025
104d173
meta: bump github/codeql-action from 3.28.16 to 3.28.18
dependabot[bot] Jun 7, 2025
36b639b
deps: update googletest to e9092b1
nodejs-github-bot Jun 7, 2025
8a1fe7b
deps: update simdjson to 3.12.3
nodejs-github-bot Jun 7, 2025
d6ea36a
src,permission: implicit allow-fs-read to app entrypoint
RafaelGSS Jun 7, 2025
fcef56c
fs: improve cpSync no-filter copyDir performance
dario-piotrowicz Jun 7, 2025
d0b8959
deps: use proper C standard when building libuv
thunder-coding Jun 7, 2025
0b987e5
http2: remove support for priority signaling
mcollina Jun 3, 2025
e7c69b9
deps: update nghttp2 to 1.65.0
nodejs-github-bot Jun 7, 2025
377ef3c
doc: add support link for panva
panva Jun 7, 2025
984894b
doc: deprecate utilisNativeError in favor of ErrorisError
miguelmarcondesf Jun 8, 2025
d2f6c82
doc,lib: update source map links to ECMA426
legendecas Jun 8, 2025
9ccdf4f
test: improve flakiness detection on stack corruption tests
RaisinTen Jun 8, 2025
591ba69
2025-06-09, Version 24.2.0 (Current)
nodejs-github-bot Jun 8, 2025
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/build-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Download tarball
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: tarballs
path: tarballs
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql-config.yml

- name: Autobuild
uses: github/codeql-action/autobuild@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
uses: github/codeql-action/autobuild@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
with:
category: /language:${{matrix.language}}
2 changes: 1 addition & 1 deletion .github/workflows/coverage-linux-without-intl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ jobs:
- name: Clean tmp
run: rm -rf coverage/tmp && rm -rf out
- name: Upload
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
with:
directory: ./coverage
2 changes: 1 addition & 1 deletion .github/workflows/coverage-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ jobs:
- name: Clean tmp
run: rm -rf coverage/tmp && rm -rf out
- name: Upload
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
with:
directory: ./coverage
2 changes: 1 addition & 1 deletion .github/workflows/coverage-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ jobs:
- name: Clean tmp
run: npx rimraf ./coverage/tmp
- name: Upload
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
with:
directory: ./coverage
4 changes: 2 additions & 2 deletions .github/workflows/notify-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # 2.3.2
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # 2.3.3
env:
SLACK_COLOR: '#DE512A'
SLACK_ICON: https://github.com/nodejs.png?size=48
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
GH_TOKEN: ${{ github.token }}
- name: Slack Notification
if: ${{ env.INVALID_COMMIT_MESSAGE }}
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # 2.3.2
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # 2.3.3
env:
SLACK_COLOR: '#DE512A'
SLACK_ICON: https://github.com/nodejs.png?size=48
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notify-on-review-wanted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
fi

- name: Slack Notification
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # 2.3.2
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # 2.3.3
env:
MSG_MINIMAL: actions url
SLACK_COLOR: '#3d85c6'
Expand Down
6 changes: 3 additions & 3 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@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

Expand All @@ -43,7 +43,7 @@ jobs:
persist-credentials: false

- name: Run analysis
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
with:
results_file: results.sarif
results_format: sarif
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@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
with:
sarif_file: results.sarif
1 change: 1 addition & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ platforms. This is true regardless of entries in the table below.
| SmartOS | x64 | >= 18 | Tier 2 | |
| AIX | ppc64be >=power8 | >= 7.2 TL04 | Tier 2 | |
| FreeBSD | x64 | >= 13.2 | Experimental | |
| OpenHarmony | arm64 | >= 5.0 | Experimental | |

<!--lint disable final-definition-->

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V24.md#24.1.0">24.1.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V24.md#24.2.0">24.2.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V24.md#24.1.0">24.1.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V24.md#24.0.2">24.0.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V24.md#24.0.1">24.0.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V24.md#24.0.0">24.0.0</a><br/>
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ For information about the governance of the Node.js project, see
**Matteo Collina** <<[email protected]>> (he/him)
* [mhdawson](https://github.com/mhdawson) -
**Michael Dawson** <<[email protected]>> (he/him)
* [panva](https://github.com/panva) -
**Filip Skokan** <<[email protected]>> (he/him)
* [RafaelGSS](https://github.com/RafaelGSS) -
**Rafael Gonzaga** <<[email protected]>> (he/him)
* [RaisinTen](https://github.com/RaisinTen) -
Expand Down Expand Up @@ -401,14 +403,12 @@ For information about the governance of the Node.js project, see
**Xuguang Mei** <<[email protected]>> (he/him)
* [mhdawson](https://github.com/mhdawson) -
**Michael Dawson** <<[email protected]>> (he/him)
* [mildsunrise](https://github.com/mildsunrise) -
**Alba Mendez** <<[email protected]>> (she/her)
* [MoLow](https://github.com/MoLow) -
**Moshe Atlow** <<[email protected]>> (he/him)
* [MrJithil](https://github.com/MrJithil) -
**Jithil P Ponnan** <<[email protected]>> (he/him)
* [panva](https://github.com/panva) -
**Filip Skokan** <<[email protected]>> (he/him)
**Filip Skokan** <<[email protected]>> (he/him) - [Support me](https://github.com/sponsors/panva)
* [pimterry](https://github.com/pimterry) -
**Tim Perry** <<[email protected]>> (he/him)
* [pmarchini](https://github.com/pmarchini) -
Expand Down Expand Up @@ -611,6 +611,8 @@ For information about the governance of the Node.js project, see
**Mikeal Rogers** <<[email protected]>>
* [miladfarca](https://github.com/miladfarca) -
**Milad Fa** <<[email protected]>> (he/him)
* [mildsunrise](https://github.com/mildsunrise) -
**Alba Mendez** <<[email protected]>> (she/her)
* [misterdjules](https://github.com/misterdjules) -
**Julien Gilli** <<[email protected]>>
* [mmarchini](https://github.com/mmarchini) -
Expand Down
43 changes: 38 additions & 5 deletions benchmark/fs/bench-cpSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,53 @@ const common = require('../common');
const fs = require('fs');
const path = require('path');
const tmpdir = require('../../test/common/tmpdir');
tmpdir.refresh();

const bench = common.createBenchmark(main, {
n: [1, 100, 10_000],
dereference: ['true', 'false'],
force: ['true', 'false'],
});

function main({ n }) {
function prepareTestDirectory() {
const testDir = tmpdir.resolve(`test-cp-${process.pid}`);
fs.mkdirSync(testDir, { recursive: true });

fs.writeFileSync(path.join(testDir, 'source.txt'), 'test content');

fs.symlinkSync(
path.join(testDir, 'source.txt'),
path.join(testDir, 'link.txt'),
);

return testDir;
}

function main({ n, dereference, force }) {
tmpdir.refresh();
const options = { recursive: true };
const src = path.join(__dirname, '../../test/fixtures/copy');

const src = prepareTestDirectory();
const dest = tmpdir.resolve(`${process.pid}/subdir/cp-bench-${process.pid}`);

const options = {
recursive: true,
dereference: dereference === 'true',
force: force === 'true',
};

if (options.force) {
fs.cpSync(src, dest, { recursive: true });
}

bench.start();
for (let i = 0; i < n; i++) {
fs.cpSync(src, dest, options);
if (options.force) {
fs.cpSync(src, dest, options);
} else {
const uniqueDest = tmpdir.resolve(
`${process.pid}/subdir/cp-bench-${process.pid}-${i}`,
);
fs.cpSync(src, uniqueDest, options);
}
}
bench.end(n);
}
34 changes: 28 additions & 6 deletions benchmark/fs/bench-glob.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
'use strict';

const common = require('../common');
const fs = require('fs');
const {
glob,
globSync,
promises: { glob: globAsync },
} = require('fs');
const path = require('path');
const assert = require('node:assert');

Expand All @@ -11,7 +15,7 @@ const configs = {
n: [1e3],
dir: ['lib'],
pattern: ['**/*', '*.js', '**/**.js'],
mode: ['async', 'sync'],
mode: ['sync', 'promise', 'callback'],
recursive: ['true', 'false'],
};

Expand All @@ -20,15 +24,33 @@ const bench = common.createBenchmark(main, configs);
async function main(config) {
const fullPath = path.resolve(benchmarkDirectory, config.dir);
const { pattern, recursive, mode } = config;
const options = { cwd: fullPath, recursive };
const callback = (resolve, reject) => {
glob(pattern, options, (err, matches) => {
if (err) {
reject(err);
} else {
resolve(matches);
}
});
};

let noDead;
bench.start();

for (let i = 0; i < config.n; i++) {
if (mode === 'async') {
noDead = await fs.promises.glob(pattern, { cwd: fullPath, recursive });
} else {
noDead = fs.globSync(pattern, { cwd: fullPath, recursive });
switch (mode) {
case 'sync':
noDead = globSync(pattern, options);
break;
case 'promise':
noDead = await globAsync(pattern, options);
break;
case 'callback':
noDead = await new Promise(callback);
break;
default:
throw new Error(`Unknown mode: ${mode}`);
}
}

Expand Down
4 changes: 2 additions & 2 deletions benchmark/path/join-posix.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ function main({ n, paths }) {

bench.start();
for (let i = 0; i < n; i++) {
if (i % 3 === 0) {
copy[1] = `${orig}${i}`;
if (i % 5 === 0) {
copy[1] = `${orig}/${i}`;
posix.join(...copy);
} else {
posix.join(...args);
Expand Down
4 changes: 2 additions & 2 deletions benchmark/path/join-win32.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ function main({ n, paths }) {

bench.start();
for (let i = 0; i < n; i++) {
if (i % 3 === 0) {
copy[1] = `${orig}${i}`;
if (i % 5 === 0) {
copy[1] = `${orig}\\${i}`;
win32.join(...copy);
} else {
win32.join(...args);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/path/normalize-posix.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const bench = common.createBenchmark(main, {
function main({ n, path }) {
bench.start();
for (let i = 0; i < n; i++) {
posix.normalize(i % 3 === 0 ? `${path}${i}` : path);
posix.normalize(i % 5 === 0 ? `${path}/${i}` : path);
}
bench.end(n);
}
2 changes: 1 addition & 1 deletion benchmark/path/normalize-win32.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const bench = common.createBenchmark(main, {
function main({ n, path }) {
bench.start();
for (let i = 0; i < n; i++) {
win32.normalize(i % 3 === 0 ? `${path}${i}` : path);
win32.normalize(i % 5 === 0 ? `${path}\\${i}` : path);
}
bench.end(n);
}
11 changes: 7 additions & 4 deletions benchmark/path/resolve-posix.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,26 @@ const { posix } = require('path');

const bench = common.createBenchmark(main, {
paths: [
'empty',
'',
'.',
['', ''].join('|'),
['foo/bar', '/tmp/file/', '..', 'a/../subfile'].join('|'),
['a/b/c/', '../../..'].join('|'),
['/a/b/c/', 'abc'].join('|'),
],
n: [1e5],
});

function main({ n, paths }) {
const args = paths.split('|');
const args = paths === 'empty' ? [] : paths.split('|');
const copy = [...args];
const orig = copy[0];
const orig = copy[0] ?? '';

bench.start();
for (let i = 0; i < n; i++) {
if (i % 3 === 0) {
copy[0] = `${orig}${i}`;
if (i % 5 === 0) {
copy[0] = `${orig}/${i}`;
posix.resolve(...copy);
} else {
posix.resolve(...args);
Expand Down
10 changes: 6 additions & 4 deletions benchmark/path/resolve-win32.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ const { win32 } = require('path');

const bench = common.createBenchmark(main, {
paths: [
'empty',
'',
'.',
['', ''].join('|'),
['c:/ignore', 'd:\\a/b\\c/d', '\\e.exe'].join('|'),
['c:/blah\\blah', 'd:/games', 'c:../a'].join('|'),
Expand All @@ -13,14 +15,14 @@ const bench = common.createBenchmark(main, {
});

function main({ n, paths }) {
const args = paths.split('|');
const args = paths === 'empty' ? [] : paths.split('|');
const copy = [...args];
const orig = copy[0];
const orig = copy[0] ?? '';

bench.start();
for (let i = 0; i < n; i++) {
if (i % 3 === 0) {
copy[0] = `${orig}${i}`;
if (i % 5 === 0) {
copy[0] = `${orig}\\${i}`;
win32.resolve(...copy);
} else {
win32.resolve(...args);
Expand Down
Loading
Loading