GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Changing assert to become a class by miguelmarcondesf · Pull Request #58253 · nodejs/node

Conversation

@miguelmarcondesf

@miguelmarcondesf miguelmarcondesf commented May 9, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Changing assert to become a class

This PR refactors assert from a method to a dedicated class. This change is motivated by the need for greater flexibility and configurability in assertion behavior.

By turning assert into a class, we will be able to pass options that customize its behavior, such as doing specific checks, how the stack trace will look like, etc.

Checklist

  • Refactor assert into a class structure (old-school pattern).
  • Add diff option to show the full diff in assertion errors.
  • Ensure backward compatibility with existing assert usages.
  • Add new unit tests to cover the class-based behavior.

cc @BridgeAR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot

nodejs-github-bot commented May 9, 2025

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added assert Issues and PRs related to the assert subsystem. needs-ci PRs that need a full CI run. labels May 9, 2025
@miguelmarcondesf
miguelmarcondesf force-pushed the assert-become-class branch from f728b4c to 132925f Compare May 9, 2025 21:47
@mcollina
mcollina requested review from BridgeAR, MoLow and cjihrig May 10, 2025 21:56
@mcollina

mcollina commented May 10, 2025

Copy link
Copy Markdown
Member

I'm mildly concerned on the long term maintainability of this, as it essentially rewrites the module - backporting might lead to more churn than needed. You might get less churn by using the "old school" pattern:

function Assert () {
}

Assert.prototype.notEqual = function () {}

With this pattern, indentation would not change and this PR might be easier to review.

This change is motivated by the need for greater flexibility and configurability in assertion behavior.

Can you clarify the need for this?

Apart from that, this would need a CITGM check to verify it doesn't break end users in any way.

JakobJingleheimer, pmarchini, atlowChemi, and miguelmarcondesf reacted with thumbs up emoji miguelmarcondesf reacted with rocket emoji
All reactions
  • 👍 4 reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pmarchini

pmarchini commented May 11, 2025

Copy link
Copy Markdown
Member

Hey @miguelmarcondesf, thanks for the contribution 🚀

My 2 cents on this: while I understand the reasons behind this refactor, if I’m not mistaken, I don’t see any options actually being used in the class.
We're only supporting an empty object for potential future use cases.
I don’t see a clear benefit in terms of cognitive complexity or readability in the refactor itself.

So I’m wondering what the intended usage is for the new options we plan to introduce.

The reason I’m asking is to provide a better context and justify any potential cons of rewriting the module (e.g., portability to other versions), while also providing an overview of what’s expected to be added.

miguelmarcondesf reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miguelmarcondesf

miguelmarcondesf commented May 11, 2025

Copy link
Copy Markdown
Contributor Author

Can you clarify the need for this?

@mcollina Thank you for sharing your concerns!
This idea came from a conversation with @BridgeAR when I was looking for something to contribute

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miguelmarcondesf

miguelmarcondesf commented May 11, 2025

Copy link
Copy Markdown
Contributor Author

Hey @pmarchini, thanks for your thoughts!

My 2 cents on this: while I understand the reasons behind this refactor, if I’m not mistaken, I don’t see any options being used in the class.

I decided to open it in draft so I could receive more guidance on this, the PR already had a lot of modifications, and I wanted more perspectives so we could start this discussion.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

BridgeAR
BridgeAR reviewed Jun 2, 2025
View reviewed changes

@BridgeAR BridgeAR left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just had a glimpse at it so far, while it looks really good!

I definitely believe this is something we want to have!

The reason is that it's almost impossible to configure any algorithm behavior so far. Adding options to the current API is not really a way to go due to the overloading we have.

Using a class would finally allow to e.g., adjust how a diff should be visualized (all changes or cutting it off as it's done right now?), to adjust the algorithm checks in the deep equal comparison (e.g., should the prototype be checked, yes or no?). We definitely have many use cases for it being a class that users may adjust to produce the outcome of their needs that can't properly be addressed with our defaults.

I don’t see a clear benefit in terms of cognitive complexity or readability in the refactor itself.

Good point, @pmarchini!

I myself also try to only implement things when we make use of it.

A major concern has been the diff generated. I think we could add that as first option, since it's quite straight forward and it would address an issue.

#51902

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pmarchini and miguelmarcondesf reacted with thumbs up emoji miguelmarcondesf reacted with rocket emoji
All reactions
  • 👍 2 reactions
  • 🚀 1 reaction
@miguelmarcondesf
miguelmarcondesf force-pushed the assert-become-class branch from 132925f to f1da641 Compare June 6, 2025 22:46
@miguelmarcondesf miguelmarcondesf mentioned this pull request Jun 9, 2025
test_runner: full diff option #51902
Closed
@miguelmarcondesf
miguelmarcondesf marked this pull request as ready for review June 9, 2025 23:52
@miguelmarcondesf

miguelmarcondesf commented Jun 9, 2025

Copy link
Copy Markdown
Contributor Author

I'm mildly concerned on the long term maintainability of this, as it essentially rewrites the module - backporting might lead to more churn than needed. You might get less churn by using the "old school" pattern:

Hey @mcollina thank you for the suggestion! I made the changes to the old-school pattern and if it makes sense, perhaps in future iterations we can migrate the functions to a version using a regular class.

Also, for now first option added as suggested by @BridgeAR was the diff generated.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codecov

codecov Bot commented Jun 10, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 89.68254% with 13 lines in your changes missing coverage. Please review.

Project coverage is 90.03%. Comparing base (1c4fe6d) to head (04b90b4).
Report is 80 commits behind head on main.

Files with missing lines Patch % Lines
lib/assert.js 88.69% 12 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58253      +/-   ##
==========================================
- Coverage   90.08%   90.03%   -0.05%     
==========================================
  Files         641      648       +7     
  Lines      188718   191114    +2396     
  Branches    37022    37472     +450     
==========================================
+ Hits       170000   172076    +2076     
- Misses      11417    11661     +244     
- Partials     7301     7377      +76     
Files with missing lines Coverage Δ
lib/internal/assert/assertion_error.js 95.93% <100.00%> (+<0.01%) ⬆️
lib/internal/errors.js 97.50% <100.00%> (+<0.01%) ⬆️
lib/assert.js 98.11% <88.69%> (-1.40%) ⬇️

... and 115 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miguelmarcondesf
miguelmarcondesf force-pushed the assert-become-class branch from 1552a67 to a5eb04c Compare June 10, 2025 11:00
@miguelmarcondesf
miguelmarcondesf requested a review from BridgeAR June 10, 2025 11:00
BridgeAR
BridgeAR reviewed Jun 10, 2025
View reviewed changes

@BridgeAR BridgeAR left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already looking very promising! We need to document the class and the new AssertionError option, since both are exposed publicly.

We should also not expose the internal options.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miguelmarcondesf reacted with rocket emoji
All reactions
  • 🚀 1 reaction
Comment thread lib/assert.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread lib/assert.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread lib/assert.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread lib/internal/assert/assertion_error.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@miguelmarcondesf
miguelmarcondesf requested a review from BridgeAR June 12, 2025 11:48
BridgeAR
BridgeAR reviewed Jun 16, 2025
View reviewed changes

@BridgeAR BridgeAR left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code change is LGTM!

I am actually thinking it might be worth changing the default behavior for the non strict methods to be strict and add an option to change that back. That would prevent wrong usage which is quite likely right now when using the non-strict methods.

I do think changing that would be great before we land this.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miguelmarcondesf reacted with rocket emoji
All reactions
  • 🚀 1 reaction
Comment thread lib/internal/assert/assertion_error.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@miguelmarcondesf

miguelmarcondesf commented Jun 18, 2025

Copy link
Copy Markdown
Contributor Author

I am actually thinking it might be worth changing the default behavior for the non strict methods to be strict and add an option to change that back. That would prevent wrong usage which is quite likely right now when using the non-strict methods.

@BridgeAR sounds good! I just pushed some changes related to that, thank you!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miguelmarcondesf
miguelmarcondesf force-pushed the assert-become-class branch 2 times, most recently from 3827903 to 41ae5be Compare June 18, 2025 22:07
@miguelmarcondesf
miguelmarcondesf requested a review from BridgeAR June 18, 2025 23:43
BridgeAR
BridgeAR reviewed Jun 26, 2025
View reviewed changes

@BridgeAR BridgeAR left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! This is LGTM with my last comment being addressed!

I do think someone else should also have a look, since this is a bigger feature overall.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miguelmarcondesf reacted with rocket emoji
All reactions
  • 🚀 1 reaction
anonrig
anonrig reviewed Jun 26, 2025
View reviewed changes

@anonrig anonrig left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we modernize this and use ES6 classes?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread lib/assert.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@miguelmarcondesf
miguelmarcondesf force-pushed the assert-become-class branch from 41ae5be to b664f8c Compare June 26, 2025 15:14
@miguelmarcondesf
miguelmarcondesf requested a review from BridgeAR June 26, 2025 16:20
@miguelmarcondesf
miguelmarcondesf force-pushed the assert-become-class branch from 04b90b4 to dc70085 Compare July 26, 2025 18:20
@miguelmarcondesf

miguelmarcondesf commented Jul 26, 2025

Copy link
Copy Markdown
Contributor Author

LGTM with a couple of suggestions.

@jasnell Thank you for pointing that!
I added some comments to the assert file and our documentation, and also added some scenarios for the destructing behavior.
Let me know if it makes sense.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jul 30, 2025
aduh95
aduh95 approved these changes Jul 30, 2025
View reviewed changes
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jul 30, 2025
@nodejs-github-bot

nodejs-github-bot commented Jul 30, 2025

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/68319/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Jul 30, 2025

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/68324/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mcollina
mcollina approved these changes Jul 30, 2025
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@BridgeAR BridgeAR added commit-queue PRs queued for automated landing through the Commit Queue. commit-queue-squash PRs the Commit Queue should land as one squashed commit. labels Aug 5, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Aug 5, 2025
@nodejs-github-bot
nodejs-github-bot merged commit 4f5d11e into nodejs:main Aug 5, 2025
@nodejs-github-bot

nodejs-github-bot commented Aug 5, 2025

Copy link
Copy Markdown
Collaborator

Landed in 4f5d11e

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos pushed a commit that referenced this pull request Aug 8, 2025
@miguelmarcondesf @targos
lib: restructure assert to become a class
c778afc
PR-URL: #58253
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
mete0rfish pushed a commit to mete0rfish/node-contribute that referenced this pull request Aug 9, 2025
@miguelmarcondesf @mete0rfish
lib: restructure assert to become a class
c4279f5
PR-URL: nodejs#58253
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@github-actions github-actions Bot mentioned this pull request Aug 11, 2025
2025-08-12, Version 24.6.0 (Current) #59449
Merged
RafaelGSS pushed a commit that referenced this pull request Aug 12, 2025
@miguelmarcondesf @RafaelGSS
lib: restructure assert to become a class
3c88b76
PR-URL: #58253
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Aug 16, 2025
ECG Bot @tmeijn
build(deps): update node to v24.6.0
53a052a
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [node](https://nodejs.org) ([source](https://github.com/nodejs/node)) | minor | `24.5.0` -> `24.6.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>nodejs/node (node)</summary>

### [`v24.6.0`](https://github.com/nodejs/node/releases/tag/v24.6.0): 2025-08-14, Version 24.6.0 (Current), @&#8203;RafaelGSS

[Compare Source](nodejs/node@v24.5.0...v24.6.0)

##### Notable Changes

- \[[`471fe712b3`](nodejs/node@471fe712b3)] - **(SEMVER-MINOR)** **cli**: add NODE\_USE\_SYSTEM\_CA=1 (Joyee Cheung) [#&#8203;59276](nodejs/node#59276)
- \[[`38aedfbf73`](nodejs/node@38aedfbf73)] - **(SEMVER-MINOR)** **crypto**: support ML-DSA KeyObject, sign, and verify (Filip Skokan) [#&#8203;59259](nodejs/node#59259)
- \[[`201304537e`](nodejs/node@201304537e)] - **(SEMVER-MINOR)** **zlib**: add dictionary support to zstdCompress and zstdDecompress (lluisemper) [#&#8203;59240](nodejs/node#59240)
- \[[`e79c93a5d0`](nodejs/node@e79c93a5d0)] - **(SEMVER-MINOR)** **http**: add server.keepAliveTimeoutBuffer option (Haram Jeong) [#&#8203;59243](nodejs/node#59243)
- \[[`c144d69efc`](nodejs/node@c144d69efc)] - **lib**: docs deprecate \_http\_\* (Sebastian Beltran) [#&#8203;59293](nodejs/node#59293)
- \[[`aeb4de55a7`](nodejs/node@aeb4de55a7)] - **(SEMVER-MINOR)** **fs**: port SonicBoom module to fs module as Utf8Stream (James M Snell) [#&#8203;58897](nodejs/node#58897)

##### Commits

- \[[`f7484575ff`](nodejs/node@f7484575ff)] - **assert**: change utils to use index instead of for...of (방진혁) [#&#8203;59278](nodejs/node#59278)
- \[[`269cd16185`](nodejs/node@269cd16185)] - **benchmark**: remove deprecated \_extend from benchmark (Rafael Gonzaga) [#&#8203;59228](nodejs/node#59228)
- \[[`848e49c20b`](nodejs/node@848e49c20b)] - **benchmark**: add fs warmup to writefile-promises (Bruno Rodrigues) [#&#8203;59215](nodejs/node#59215)
- \[[`8c609be1b1`](nodejs/node@8c609be1b1)] - **benchmark**: add calibrate-n script (Rafael Gonzaga) [#&#8203;59186](nodejs/node#59186)
- \[[`6a3bf772d8`](nodejs/node@6a3bf772d8)] - **build**: fix node\_use\_sqlite for GN builds (Shelley Vohr) [#&#8203;59017](nodejs/node#59017)
- \[[`471fe712b3`](nodejs/node@471fe712b3)] - **(SEMVER-MINOR)** **cli**: add NODE\_USE\_SYSTEM\_CA=1 (Joyee Cheung) [#&#8203;59276](nodejs/node#59276)
- \[[`38aedfbf73`](nodejs/node@38aedfbf73)] - **(SEMVER-MINOR)** **crypto**: support ML-DSA KeyObject, sign, and verify (Filip Skokan) [#&#8203;59259](nodejs/node#59259)
- \[[`a312e706cf`](nodejs/node@a312e706cf)] - **crypto**: prepare webcrypto key import/export for modern algorithms (Filip Skokan) [#&#8203;59284](nodejs/node#59284)
- \[[`3a7c2c3a47`](nodejs/node@3a7c2c3a47)] - **deps**: update ada to 3.2.7 (Node.js GitHub Bot) [#&#8203;59336](nodejs/node#59336)
- \[[`8d9ceeaf6a`](nodejs/node@8d9ceeaf6a)] - **deps**: update archs files for openssl-3.5.2 (Node.js GitHub Bot) [#&#8203;59371](nodejs/node#59371)
- \[[`33b06df354`](nodejs/node@33b06df354)] - **deps**: upgrade openssl sources to openssl-3.5.2 (Node.js GitHub Bot) [#&#8203;59371](nodejs/node#59371)
- \[[`fa70f1af77`](nodejs/node@fa70f1af77)] - **deps**: support madvise(3C) across ALL illumos revisions (Dan McDonald) [#&#8203;58237](nodejs/node#58237)
- \[[`f834a6be59`](nodejs/node@f834a6be59)] - **deps**: update undici to 7.13.0 (Node.js GitHub Bot) [#&#8203;59338](nodejs/node#59338)
- \[[`db2417487e`](nodejs/node@db2417487e)] - **deps**: update sqlite to 3.50.4 (Node.js GitHub Bot) [#&#8203;59337](nodejs/node#59337)
- \[[`41978adb08`](nodejs/node@41978adb08)] - **deps**: V8: backport [`493cb53`](nodejs/node@493cb53691be) (Chengzhong Wu) [#&#8203;59238](nodejs/node#59238)
- \[[`05667991ca`](nodejs/node@05667991ca)] - **deps**: V8: backport [`1c3e018`](nodejs/node@1c3e018e7d48) (Renegade334) [#&#8203;58818](nodejs/node#58818)
- \[[`fd61588bb4`](nodejs/node@fd61588bb4)] - **doc**: rename x509.extKeyUsage to x509.keyUsage (Filip Skokan) [#&#8203;59332](nodejs/node#59332)
- \[[`a271ae4360`](nodejs/node@a271ae4360)] - **doc**: fix Pbkdf2Params hash attribute heading (Filip Skokan) [#&#8203;59395](nodejs/node#59395)
- \[[`72cfff165b`](nodejs/node@72cfff165b)] - **doc**: fix missing reference links for server.keepAliveTimeoutBuffer (Lee Jiho) [#&#8203;59356](nodejs/node#59356)
- \[[`8341916772`](nodejs/node@8341916772)] - **doc**: fix grammar in global dispatcher usage (Eng Zer Jun) [#&#8203;59344](nodejs/node#59344)
- \[[`e3e489706b`](nodejs/node@e3e489706b)] - **doc**: run license-builder (github-actions\[bot]) [#&#8203;59343](nodejs/node#59343)
- \[[`46527e8cea`](nodejs/node@46527e8cea)] - **doc**: correct orthography `eg.` → `e.g.` (Jacob Smith) [#&#8203;59329](nodejs/node#59329)
- \[[`d140c3713e`](nodejs/node@d140c3713e)] - **doc**: clarify the need of compiler compatible with c++20 (Rafael Gonzaga) [#&#8203;59297](nodejs/node#59297)
- \[[`95e9cabf9d`](nodejs/node@95e9cabf9d)] - **doc**: clarify release candidate stability index (Filip Skokan) [#&#8203;59295](nodejs/node#59295)
- \[[`a056dd36d2`](nodejs/node@a056dd36d2)] - **doc**: add WDYT to glossary (btea) [#&#8203;59280](nodejs/node#59280)
- \[[`1e2c52f5c4`](nodejs/node@1e2c52f5c4)] - **doc**: add manpage entry for --use-system-ca (Joyee Cheung) [#&#8203;59273](nodejs/node#59273)
- \[[`31a46fdeb4`](nodejs/node@31a46fdeb4)] - **doc**: add path.join and path.normalize clarification (Rafael Gonzaga) [#&#8203;59262](nodejs/node#59262)
- \[[`cff3725ff9`](nodejs/node@cff3725ff9)] - **doc**: fix typo in `test/common/README.md` (Yoo) [#&#8203;59180](nodejs/node#59180)
- \[[`31a9283591`](nodejs/node@31a9283591)] - **doc**: add note on process memoryUsage (fengmk2) [#&#8203;59026](nodejs/node#59026)
- \[[`5a98bff6b8`](nodejs/node@5a98bff6b8)] - **doc**: format safely for `doc-kit` (Aviv Keller) [#&#8203;59229](nodejs/node#59229)
- \[[`95b8b7ea5c`](nodejs/node@95b8b7ea5c)] - **domain**: remove deprecated API call (Alex Yang) [#&#8203;59339](nodejs/node#59339)
- \[[`2990f178bd`](nodejs/node@2990f178bd)] - **fs**: fix glob TypeError on restricted dirs (Sylphy-0xd3ac) [#&#8203;58674](nodejs/node#58674)
- \[[`e2fb4caf9c`](nodejs/node@e2fb4caf9c)] - **fs**: correct error message when FileHandle is transferred (Alex Yang) [#&#8203;59156](nodejs/node#59156)
- \[[`aeb4de55a7`](nodejs/node@aeb4de55a7)] - **(SEMVER-MINOR)** **fs**: port SonicBoom module to fs module as Utf8Stream (James M Snell) [#&#8203;58897](nodejs/node#58897)
- \[[`e79c93a5d0`](nodejs/node@e79c93a5d0)] - **(SEMVER-MINOR)** **http**: add server.keepAliveTimeoutBuffer option (Haram Jeong) [#&#8203;59243](nodejs/node#59243)
- \[[`0fb005a53f`](nodejs/node@0fb005a53f)] - **http2**: set Http2Stream#sentHeaders for raw headers (Darshan Sen) [#&#8203;59244](nodejs/node#59244)
- \[[`e055539604`](nodejs/node@e055539604)] - **lib**: add trace-sigint APIs (theanarkh) [#&#8203;59040](nodejs/node#59040)
- \[[`d2183d860a`](nodejs/node@d2183d860a)] - **lib**: optimize writable stream buffer clearing (Yoo) [#&#8203;59406](nodejs/node#59406)
- \[[`47543a7e17`](nodejs/node@47543a7e17)] - **lib**: handle windows reserved device names on UNC (Rafael Gonzaga) [#&#8203;59286](nodejs/node#59286)
- \[[`c6911f0717`](nodejs/node@c6911f0717)] - **lib**: do not modify prototype deprecated asyncResource (RafaelGSS) [#&#8203;59195](nodejs/node#59195)
- \[[`3c88b769bb`](nodejs/node@3c88b769bb)] - **lib**: restructure assert to become a class (Miguel Marcondes Filho) [#&#8203;58253](nodejs/node#58253)
- \[[`e91b54df59`](nodejs/node@e91b54df59)] - **lib**: handle superscript variants on windows device (Rafael Gonzaga) [#&#8203;59261](nodejs/node#59261)
- \[[`4ee467905d`](nodejs/node@4ee467905d)] - **lib**: use validateString (hotpineapple) [#&#8203;59296](nodejs/node#59296)
- \[[`c144d69efc`](nodejs/node@c144d69efc)] - **lib**: docs deprecate \_http\_\* (Sebastian Beltran) [#&#8203;59293](nodejs/node#59293)
- \[[`c89b67e681`](nodejs/node@c89b67e681)] - **lib**: add type names in source mapped stack traces (Chengzhong Wu) [#&#8203;58976](nodejs/node#58976)
- \[[`5b2363be8d`](nodejs/node@5b2363be8d)] - **lib**: prefer AsyncIteratorPrototype primordial (René) [#&#8203;59097](nodejs/node#59097)
- \[[`41b4f4d694`](nodejs/node@41b4f4d694)] - **meta**: clarify pr objection process further (James M Snell) [#&#8203;59096](nodejs/node#59096)
- \[[`0eb5962f1e`](nodejs/node@0eb5962f1e)] - **meta**: add mailmap entry for aditi-1400 (Aditi) [#&#8203;59316](nodejs/node#59316)
- \[[`a2b72c2304`](nodejs/node@a2b72c2304)] - **meta**: add tsc and build team as codeowners building.md (Rafael Gonzaga) [#&#8203;59298](nodejs/node#59298)
- \[[`d69f3ee1e0`](nodejs/node@d69f3ee1e0)] - **meta**: add nodejs/path to path files (Rafael Gonzaga) [#&#8203;59289](nodejs/node#59289)
- \[[`1e37eab865`](nodejs/node@1e37eab865)] - **node-api**: reword "implementation in an alternative VM" as implementable (Chengzhong Wu) [#&#8203;59036](nodejs/node#59036)
- \[[`64add6302a`](nodejs/node@64add6302a)] - **src**: use simdjson to parse SEA configuration (Joyee Cheung) [#&#8203;59323](nodejs/node#59323)
- \[[`e9c6636585`](nodejs/node@e9c6636585)] - **src**: mark realm leaf classes final (Anna Henningsen) [#&#8203;59355](nodejs/node#59355)
- \[[`42ef8147d1`](nodejs/node@42ef8147d1)] - **src**: warn about FastOneByteString invalidation (James M Snell) [#&#8203;59275](nodejs/node#59275)
- \[[`8686b8037a`](nodejs/node@8686b8037a)] - **src**: remove unused DSAKeyExportJob (Filip Skokan) [#&#8203;59291](nodejs/node#59291)
- \[[`1e5f632666`](nodejs/node@1e5f632666)] - **src**: use C++20 `contains()` method (iknoom) [#&#8203;59304](nodejs/node#59304)
- \[[`22d4683cfe`](nodejs/node@22d4683cfe)] - **src**: added CHECK\_NOT\_NULL check for multiple eq\_wrap\_async (F3lixTheCat) [#&#8203;59267](nodejs/node#59267)
- \[[`6a47ff4943`](nodejs/node@6a47ff4943)] - **src**: clear all linked module caches once instantiated (Chengzhong Wu) [#&#8203;59117](nodejs/node#59117)
- \[[`33728cb4ca`](nodejs/node@33728cb4ca)] - **src**: add nullptr checks in `StreamPipe::New` (Burkov Egor) [#&#8203;57613](nodejs/node#57613)
- \[[`4a907bdad1`](nodejs/node@4a907bdad1)] - **src**: add percentage support to --max-old-space-size (Asaf Federman) [#&#8203;59082](nodejs/node#59082)
- \[[`7c189d4f55`](nodejs/node@7c189d4f55)] - **test**: deflake sequential/test-tls-session-timeout (Joyee Cheung) [#&#8203;59423](nodejs/node#59423)
- \[[`fb0a6fb57f`](nodejs/node@fb0a6fb57f)] - **test**: exclude mock from coverage (Shima Ryuhei) [#&#8203;59348](nodejs/node#59348)
- \[[`7e10f95f13`](nodejs/node@7e10f95f13)] - **test**: split test-fs-cp.js (Joyee Cheung) [#&#8203;59408](nodejs/node#59408)
- \[[`41bcf5f659`](nodejs/node@41bcf5f659)] - **test**: update WPT resources,WebCryptoAPI,webstorage (Filip Skokan) [#&#8203;59311](nodejs/node#59311)
- \[[`f9f3dc94cb`](nodejs/node@f9f3dc94cb)] - **test**: add known issue test for fs.cpSync dereference bug (James M Snell) [#&#8203;58941](nodejs/node#58941)
- \[[`244d0c38a8`](nodejs/node@244d0c38a8)] - **test**: deflake stream-readable-to-web test (Ethan Arrowood) [#&#8203;58948](nodejs/node#58948)
- \[[`564e604a1a`](nodejs/node@564e604a1a)] - **test**: make test-inspector-network-resource sequential (Shima Ryuhei) [#&#8203;59104](nodejs/node#59104)
- \[[`7ab13b7477`](nodejs/node@7ab13b7477)] - **test**: don't use expose internals in test-http-outgoing-buffer.js (Meghan Denny) [#&#8203;59219](nodejs/node#59219)
- \[[`319df3859a`](nodejs/node@319df3859a)] - **test,crypto**: skip unsupported ciphers (Shelley Vohr) [#&#8203;59388](nodejs/node#59388)
- \[[`713c70c32a`](nodejs/node@713c70c32a)] - **test\_runner**: remove unused callee convertion (Alex Yang) [#&#8203;59221](nodejs/node#59221)
- \[[`e4ca30e115`](nodejs/node@e4ca30e115)] - **tools**: disable nullability-completeness warnings (Michaël Zasso) [#&#8203;59392](nodejs/node#59392)
- \[[`dab7f6b542`](nodejs/node@dab7f6b542)] - **tools**: check for std::vector\<v8::Local> in lint (Aditi) [#&#8203;58497](nodejs/node#58497)
- \[[`7b94982eb0`](nodejs/node@7b94982eb0)] - **tools**: allow selecting test subsystems with numbers in their names (Darshan Sen) [#&#8203;59242](nodejs/node#59242)
- \[[`16bbcd8881`](nodejs/node@16bbcd8881)] - **typings**: improve internal binding types (Nam Yooseong) [#&#8203;59351](nodejs/node#59351)
- \[[`76bc4d659b`](nodejs/node@76bc4d659b)] - **typings**: improve internal binding types (Michaël Zasso) [#&#8203;59176](nodejs/node#59176)
- \[[`eecd3272a6`](nodejs/node@eecd3272a6)] - **worker**: add name for worker (theanarkh) [#&#8203;59213](nodejs/node#59213)
- \[[`84c3513ce2`](nodejs/node@84c3513ce2)] - **worker**: implements nits in Web Locks code (Antoine du Hamel) [#&#8203;59270](nodejs/node#59270)
- \[[`bd68fbd753`](nodejs/node@bd68fbd753)] - **worker**: add cpuUsage for worker (theanarkh) [#&#8203;59177](nodejs/node#59177)
- \[[`201304537e`](nodejs/node@201304537e)] - **(SEMVER-MINOR)** **zlib**: add dictionary support to zstdCompress and zstdDecompress (lluisemper) [#&#8203;59240](nodejs/node#59240)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS43MS4wIiwidXBkYXRlZEluVmVyIjoiNDEuNzEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
This was referenced Aug 20, 2025
chore(deps): updated all dependencies (pre-req for #207) nearform/node-test-parser#208
Closed
tests fail on node 24.6 nearform/node-test-parser#211
Closed
aduh95 pushed a commit that referenced this pull request Aug 21, 2025
@miguelmarcondesf @aduh95
lib: restructure assert to become a class
24264d7
PR-URL: #58253
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
aduh95 pushed a commit that referenced this pull request Aug 25, 2025
@miguelmarcondesf @aduh95
lib: restructure assert to become a class
8a1645e
PR-URL: #58253
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
aduh95 pushed a commit that referenced this pull request Aug 26, 2025
@miguelmarcondesf @aduh95
lib: restructure assert to become a class
9254257
PR-URL: #58253
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@github-actions github-actions Bot mentioned this pull request Aug 26, 2025
2025-08-28, Version 22.19.0 'Jod' (LTS) #59641
Merged
@sxa sxa mentioned this pull request Feb 9, 2026
Various AIX tests pass on Node 22, fail on later supported versions #61657
Open
mcollina added a commit to mcollina/node that referenced this pull request Feb 14, 2026
@mcollina
http2: invoke pending write callback on stream destroy
c16f526
When an HTTP/2 stream is destroyed while a write is in progress, the
pending write callback may never be called if the write data has already
been consumed by nghttp2 and moved to the session's outgoing_buffers_.
In this case, the C++ side's SetImmediate cleanup finds nothing in the
stream's write queue, and the callback depends on session socket write
completion — which may never happen during shutdown.

This leaves the Writable stream's internal state stuck, preventing
cleanup of buffered writes and keeping references alive that block
event loop exit.

Track the pending write callback on the stream and invoke it in
_destroy() before calling handle.destroy(), ensuring the Writable
stream can clean up properly. The callback is made idempotent so
duplicate invocations from the C++ side are harmless no-ops.

Fixes: nodejs#58252
Refs: nodejs#58253
@mcollina mcollina mentioned this pull request Feb 14, 2026
http2: invoke pending write callback on stream destroy #61821
Closed
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mcollina mcollina mcollina approved these changes
@jasnell jasnell jasnell approved these changes
@BridgeAR BridgeAR BridgeAR approved these changes
@aduh95 aduh95 aduh95 approved these changes
@cjihrig cjihrig Awaiting requested review from cjihrig
@MoLow MoLow Awaiting requested review from MoLow
@anonrig anonrig Awaiting requested review from anonrig
+1 more reviewer
@targos targos targos approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

assert Issues and PRs related to the assert subsystem. author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue-squash PRs the Commit Queue should land as one squashed commit.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

10 participants

@miguelmarcondesf @nodejs-github-bot @mcollina @pmarchini @BridgeAR @jasnell @anonrig @targos @aduh95 @geeksilva97
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.