Skip to content

Upgrade all dependencies#574

Open
zettseb wants to merge 38 commits into
mainfrom
upgrade
Open

Upgrade all dependencies#574
zettseb wants to merge 38 commits into
mainfrom
upgrade

Conversation

@zettseb

@zettseb zettseb commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Runtime & tooling

  • Node 24 (from 14/16/20), pnpm 11 (from npm) with strict mode + workspace config
  • ESM migration ("type": "module") for server and client
  • Vite 8 (from 2), TypeScript 5.9 (from 3.9), Jest 30 + ts-jest 29.4
  • @swc-node/register replaces tsx for dev server (preserves design:paramtypes decorator metadata typedi needs)
  • Cypress 15 (from 7), nodemon 3, prettier 3, husky 9

Client

  • React 18 (from 17, with createRoot migration; React 19 tried but rolled back — MUI 4 incompatible)
  • react-router-dom 6 (from 5), chai 5 (from 4), luxon 3 (from 1)
  • MUI 4 deep-path imports fixed — Vite 8's esbuild optimizer broke import X from "@material-ui/core/Box/Box" and @material-ui/icons/* default imports; switched to named imports from barrels

Server

  • express 4.22, body-parser 1.20.5, passport 0.7, socket.io 4.8, pino 9
  • lodash ESM interop fix (named → default imports; Node 24 cjs-module-lexer can't detect named exports)
  • api.json Docker runtime fix (Node 24 enforces with { type: "json" } import attribute; switched to readFileSync + findRootDir, copied source file into runtime image)
  • typedi 0.10 DI restored (was silently broken since tsx migration — design:paramtypes metadata missing)

Tests

  • Add tests more tests were applicable
  • Fix existing flaky tests

Not addressed

  • MUI 4 EOL — blocks React 19 upgrade (findDOMNode removed). Migration to MUI 5/6 can be done as follow-up

RESULT

Security: 0 audit vulnerabilities (qs/ws/js-yaml overrides applied)

zettseb added 30 commits June 23, 2026 18:04
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
- Add type:module to root, server, client package.json
- Server tsconfig: module Node16, moduleResolution Node16
- Client tsconfig: keep moduleResolution node (Vite handles ESM)
- Rename jest.config.js -> jest.config.cjs (CJS syntax with type:module)
- Add .js extensions to all server relative imports (required by Node16)
- Replace __dirname in findRootDir.ts with process.cwd() traversal
- Replace require(configFile) with JSON.parse(fs.readFileSync)
- Replace require('socket.io') with ESM import
- Update nodemon/ts-node exec for ESM loader
- Update server scripts for ESM compatibility
- Add dotenv/axios module declarations for Node16 resolution
- Remove @types/axios (axios bundles own types)

Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
…est 7

Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
… → 14

Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
…udit vulns

Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
fix: eliminate test handle leaks (pino worker thread, GroupJoinService interval)
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
…lution

Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
…tion

Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
zettseb added 8 commits June 23, 2026 18:04
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
- Delete package-lock.json, add pnpm-lock.yaml
- Add @types/body-parser, @types/sinonjs__fake-timers, @types/luxon, @slack/types as explicit deps (pnpm strict requires declared deps)
- Fix express-serve-static-core import → express (pnpm strict doesn't hoist transitive types)
- Remove unused Container imports in integration specs (noUnusedLocals)
- Fix Jest transformIgnorePatterns regex for pnpm .pnpm symlink paths

Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
tsx (esbuild) does not emit design:paramtypes decorator metadata,
which typedi 0.10 needs for constructor injection. Switch dev loader
to @swc-node/register/esm-register (respects emitDecoratorMetadata,
resolves .js -> .ts in ESM).

Also fix ESM/CJS interop issues that surfaced in the compiled build:
- lodash named imports fail in Node ESM (cjs-module-lexer cannot
  detect them); switch to default import + lodash.fn calls
- api.json import fails with ERR_IMPORT_ATTRIBUTE_MISSING on
  Node 24; read via fs.readFileSync + findRootDir instead

Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Vite 8's esbuild dep optimizer mis-handles MUI 4's deep-path CJS
modules: it emits 'export default require_X()' which returns the
module namespace object instead of the component, causing
React error #130 (element type invalid: got object). Switch all
deep-path default imports to named imports from the barrels
@material-ui/core and @material-ui/icons.

React 19 removed findDOMNode, which MUI 4 (Popper, Tooltip, Menu)
relies on, so keep React 18 until MUI is upgraded.

Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Luxon's TIME_SIMPLE formatter emits U+202F (narrow no-break space)
between time and AM/PM marker in some locales. Replace it with a
regular space so tests and UI display consistent output.

Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
Signed-off-by: Sebastian Zett <sebastian.zett@tngtech.com>
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