Skip to content

[PM-35903] Update clients to node 24#20400

Open
dani-garcia wants to merge 9 commits intomainfrom
ps/PM-35903-update-node-24
Open

[PM-35903] Update clients to node 24#20400
dani-garcia wants to merge 9 commits intomainfrom
ps/PM-35903-update-node-24

Conversation

@dani-garcia
Copy link
Copy Markdown
Member

@dani-garcia dani-garcia commented Apr 27, 2026

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-35903

📔 Objective

Update all the clients to node 24 except the CLI, which will stay behind so we don't need to update yaopkg for now. This PR is fairly similar to the one where we had to do the same thing for node 22: #15058

Electron is using it's own bundled node version, so it will stay on 22 until #19848 is merged.

Note, I had to update the lockfile and also add jest-environment-jsdom version 29 to the dependencies. This is the version we were already using transitively, but npm 11 must have changed the dependency resolution in some way causing tests to not find it. Updating it to version 30 to match the rest of the jest dependencies broke a lot of tests in browser/web as it made made window.location, window.top, and Location.prototype.reload readonly, so I've left that as followup work.

I've also fixed a manual polyfill of Symbol.dispose, as they're readonly on node24 and caused some tests to fail.

📸 Screenshots

@dani-garcia dani-garcia force-pushed the ps/PM-35903-update-node-24 branch from 94a5847 to 253474e Compare April 27, 2026 15:50
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.10%. Comparing base (3213690) to head (b121da6).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #20400   +/-   ##
=======================================
  Coverage   47.10%   47.10%           
=======================================
  Files        3948     3948           
  Lines      119688   119688           
  Branches    18344    18344           
=======================================
+ Hits        56374    56376    +2     
+ Misses      59080    59078    -2     
  Partials     4234     4234           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dani-garcia dani-garcia marked this pull request as ready for review April 27, 2026 17:21
@dani-garcia dani-garcia requested review from a team as code owners April 27, 2026 17:22
Copy link
Copy Markdown
Contributor

@djsmith85 djsmith85 left a comment

Choose a reason for hiding this comment

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

The broken tests is something that @cd-bitwarden had also found with the initial attempt to bump Jest to 30.
I was under the impression that jest and jest-environment-jsdom were transient dependencies via Angular. That's why we didn't have it setup in the package.json or in renovate. With me introducing Jest 30 as a direct dev dependency, it seems to also require jest-environment-jsdom (as of Jest 28).

Thanks for raising this and using an intermediate step towards fixing this.

I'll look into fixing the tests once this is merged

@github-actions
Copy link
Copy Markdown
Contributor

Logo
Checkmarx One – Scan Summary & Details520cbbe8-d723-4aaf-8edc-b1faf3857f7b

Great job! No new security vulnerabilities introduced in this pull request

Copy link
Copy Markdown
Contributor

@djsmith85 djsmith85 left a comment

Choose a reason for hiding this comment

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

Missing a bump of the node version in apps/web/Dockerfile

@dani-garcia dani-garcia requested review from a team as code owners May 4, 2026 14:04
@dani-garcia dani-garcia requested a review from AmyLGalles May 4, 2026 14:04
@dani-garcia
Copy link
Copy Markdown
Member Author

Thanks for the heads up @djsmith85! Seems like it wasn't updated to node 22 last time so I missed it when I searched for the version number

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 4, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants