Skip to content

chore: update npm dependencies (minor/patch, vitest 5, dotenv 18) - #1063

Merged
dsclassen merged 5 commits into
mainfrom
chore/update-deps-2026-09
Sep 28, 2026
Merged

dsclassen merged 5 commits into
mainfrom
chore/update-deps-2026-09

Conversation

@dsclassen

Copy link
Copy Markdown
Collaborator

Summary

Dependency sweep across the monorepo. Each commit is self-contained:

  1. Minor/patch updates (46 packages): mongoose 9.10, MUI 9.4, React 19.3, react-router 8.4, vite 8.3, axios 1.20, bull-board 9.10, express-rate-limit 8.7, supertest 7.3, turbo 2.11, eslint 10.11, typescript-eslint 8.70, and others.
  2. dotenv 17 → 18: v18 removed .env.vault and node -r dotenv/config preloading, which we don't use. I checked import 'dotenv/config' and dotenv.config() at runtime in backend, worker and scoper.
  3. Fix: register the mailer template plugin once: every send*Email function called transporter.use('compile', hbs(...)) on the module-level transporter. Each email added another copy of the plugin, and later emails ran the template compile once per earlier send. The plugin is now registered once, next to createTransport, in backend, worker and scoper. All call sites used identical options.
  4. vitest 4 → 5 (vitest, @vitest/coverage-v8, @vitest/ui):
    • vitest 5 clears mocks before each test by default. I converted the tests to that model instead of setting clearMocks: false: tests that check import-time behaviour (Redis clients, the mailer transporter and plugin, the scoper entry point) now call vi.resetModules() and import inside the test, with vi.hoisted mocks shared across imports.
    • jest-dom 7.0.1's vitest types augment the old Assertion<T>, which doesn't merge with vitest 5's Assertion<R, T>, so toBeInTheDocument and the other matchers disappeared from tsc (Vitest 5: matcher types are lost — Assertion<T> augmentation no longer merges with Vitest's Assertion<R, T> testing-library/jest-dom#738). apps/ui/src/test/jest-dom-vitest.d.ts augments Matchers<R, T> instead. Delete it once feat: support vitest 5 testing-library/jest-dom#742 is released.
    • rateLimiterKeys.test.ts intermittently hung or failed with socket hang up with this update set: about 15% of isolated runs, versus 51/51 on main. It passed the bare app to supertest, which starts and stops a server for every request. It now listens once per limiter: 30/30 pass.

Held back

Package Why
typescript 7 typescript-eslint (latest 8.71) supports typescript >=4.8.4 <6.1.0, and TS 7 no longer exports the JS compiler API that typescript-eslint uses.
nodemailer 10 Its bundled types don't accept nodemailer-express-handlebars' plugin type (@types/nodemailer-express-handlebars is built on @types/nodemailer), and that package hasn't been updated since 2024. None of v10's fixes affect us.
jsdom 30.1 (pinned ~30.0.1) jsdom 30.1 no longer exposes Blob's impl symbol, which vitest's FormData/Blob shim reads, so FormData requests fail in UI tests. It's broken in both vitest 4 and 5.0.2 (vitest-dev/vitest#11336).
bullmq Updated separately in #1061.

Test plan

  • pnpm lint, pnpm build, pnpm test all pass: backend 633, worker 347, scoper 93, ui 1239, md-utils 102, mongodb-schema 3 (+9 skipped)
  • rateLimiterKeys.test.ts run 30× in isolation, no failures
  • dotenv 18 runtime check in backend/worker/scoper
  • Deploy to dev, click through the UI (MUI/React/router bumps), and send one job-complete email

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 602a461

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@bilbomd/backend Patch
@bilbomd/worker Patch
@bilbomd/scoper Patch
@bilbomd/ui Patch
@bilbomd/md-utils Patch
@bilbomd/mongodb-schema Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

dsclassen and others added 4 commits September 28, 2026 14:22
Updates 46 packages to their latest minor/patch releases across the
monorepo. jsdom stays on ~30.0.1: with 30.1.1, vitest 4's jsdom
compatibility shim (makeCompatBlob) reads a removed Blob internal and
FormData requests fail in the UI tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
dotenv 18 removed .env.vault and -r preloading, which we don't use.
'dotenv/config' and config() work as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each send function called transporter.use('compile', hbs(...)) on the
module-level transporter, so every email added another copy of the
plugin and later emails ran the template compile step once per earlier
send. Register the plugin once, next to createTransport, in backend,
worker and scoper. All call sites used the same options.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- vitest, @vitest/coverage-v8 and @vitest/ui 4.1 -> 5.0.
- vitest 5 clears mocks before each test by default. Tests that checked
  calls made at module import (Redis clients, mailer transporter and
  plugin, scoper entry point) now reset modules and import inside the
  test, with vi.hoisted mocks shared across imports.
- jest-dom 7.0.1's vitest types augment the old Assertion<T> and no
  longer merge with vitest 5's Assertion<R, T>, so its matchers vanished
  from tsc (testing-library/jest-dom#738). apps/ui now augments
  Matchers<R, T> in src/test/jest-dom-vitest.d.ts until jest-dom ships a
  fix (#742).
- rateLimiterKeys.test.ts now listens once per limiter instead of letting
  supertest start a server for every request. With this update set that
  intermittently hung or reset connections (about 15% of isolated runs);
  30/30 pass now.
- jsdom stays on ~30.0.1. jsdom 30.1 no longer exposes Blob's impl
  symbol, which vitest's FormData/Blob shim depends on
  (vitest-dev/vitest#11336, still broken in 5.0.2).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@dsclassen
dsclassen force-pushed the chore/update-deps-2026-09 branch from 02ee363 to 7ed8a86 Compare September 28, 2026 21:24
These packages used the root's typescript without declaring it. On a
fresh install, pnpm filled msw's optional typescript peer with the
latest release (7.0.2) there, which made a second vitest 5.0.2 variant.
The UI tests then loaded two vitest copies (runner from one, expect from
the other), and every .rejects.toThrow(message) failed with 'Cannot
read properties of undefined (reading indexOf)'. This passed locally
only because the old node_modules resolved to a single copy.

Declaring typescript ^6.0.3 leaves one vitest variant and no TS 7 in
the lockfile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@dsclassen
dsclassen merged commit 55d1b60 into main Sep 28, 2026
18 checks passed
@dsclassen dsclassen mentioned this pull request Oct 1, 2026
3 of 4 tasks
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.

1 participant