Skip to content

feat: Migrate to Node.js 24.15.0#6063

Draft
Pyatakov wants to merge 10 commits into
developfrom
feat/node24-version
Draft

feat: Migrate to Node.js 24.15.0#6063
Pyatakov wants to merge 10 commits into
developfrom
feat/node24-version

Conversation

@Pyatakov
Copy link
Copy Markdown
Contributor

Description

  • Bump Node.js base image to 24.15.0 across all backend Dockerfiles and GitHub Actions workflows
  • Bump dependencies for Node 24 compatibility: @nestjs/* 11.1.11, @mikro-orm/* 6.6.2, mongodb 6.20.0, express 5.2.1, axios 1.12.0, @types/node 24.10.4, plus many others tightened to exact versions
  • Rewrite every backend tsconfig.json to module: NodeNext / moduleResolution: NodeNext / target: ES2023 / lib: ["ES2023"]; align strict: false consistently in dev and production; enable noUnusedLocals: true everywhere it was reasonable
  • Add .js extensions to relative imports required by NodeNext (5 source files)
  • Switch core-module imports to the node: prefix; replace ecosystem.config.js's __dirname with import.meta.dirname
  • Re-declare mongodb as a direct dep in common, indexer-common, guardian-service, indexer-service, policy-service so the dep graph is honest (deduped against @mikro-orm/mongodb's nested copy)
  • Fix CJS/NodeNext interop for ioredis, prometheus-api-metrics, and @cortex-js/compute-engine 0.27 (which no longer re-exports BoxedExpression); drop base64url in favor of native Buffer.toString('base64url')
  • Refactor worker-service IPFS client: pass the URL string directly to kubo-rpc-client.create() instead of decomposing it into protocol/host/port (the decomposed form broke for default-port URLs like http://...:80 after the url.parsenew URL switch)
  • Add engines.node: ">=24.15.0" to root and 23 backend package.json files (skipped contracts since its Node version is governed by hardhat, not Guardian)
  • Pin frontend Docker bases to Node 20.20.2 (Angular 17/18 doesn't officially support Node 24); add engines.node: ">=20.11.0 <21" to frontend and indexer-frontend; bump frontend/@types/node from the long-stale ^12.11.1 to ^20.11.0
  • Drop deprecated esm package internals via patch-package (patches/esm+3.2.25.patch); needed because @digitalbazaar/http-client (transitive via @transmute/* 0.7.0-unstable.80) declares the unmaintained esm runtime dep
  • Remove dead module-alias / rewire devDeps from 4 services and 6 vestigial import 'module-alias/register.js' lines; delete 9 obsolete test files that depended on rewire and couldn't run under ESM
  • Remove unused IPFS node loader implementations and other dead imports surfaced by noUnusedLocals

Known follow-ups (out of scope for this PR):

  • Upgrade @transmute/* 0.7.0-unstable.80 so the esm patch can be dropped
  • @mattrglobal/node-bbs-signatures has no Node 24 prebuilt binary (NODE_MODULE_VERSION 137); install logs a non-fatal warning, but BBS verifiable-credential operations fall back to the JS path
  • Reconcile noUnusedLocals in guardian-service, policy-service, mrv-sender (still false)
  • Consolidate per-workspace tsconfigs into a shared tsconfig.base.json

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

Test Results

0 files   -  32  0 suites   - 64   0s ⏱️ -1s
0 tests  -  35  0 ✅  -   4  0 💤 ±0  0 ❌  - 31 
0 runs   - 165  0 ✅  - 134  0 💤 ±0  0 ❌  - 31 

Results for commit 07a68f9. ± Comparison against base commit 3514e2f.

♻️ This comment has been updated with latest results.

@Pyatakov Pyatakov changed the title Migrate to Node.js 24.15.0 feat: Migrate to Node.js 24.15.0 May 12, 2026
@Pyatakov Pyatakov self-assigned this May 12, 2026
@Pyatakov Pyatakov force-pushed the feat/node24-version branch 4 times, most recently from a9a04cd to dc9b175 Compare May 13, 2026 12:11
@Pyatakov Pyatakov force-pushed the feat/node24-version branch from dc9b175 to acf351d Compare May 13, 2026 12:49
Pyatakov and others added 10 commits May 19, 2026 16:03
Bump Node.js base image to 24.15.0 across all Dockerfiles. Update dependencies and devDependencies for multiple services, including major upgrades to NestJS, MikroORM, Express, Axios, RxJS, and related type packages. Add patch-package and postinstall scripts where needed. Refactor TypeScript configuration files to use ES2023, NodeNext module resolution, and update strictness and source map settings for consistency.
Upgraded various dependencies in e2e-tests and frontend package.json and package-lock.json files.
Update package-lock.json

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
All GitHub Actions workflow files now use Node.js version 24.15.0 instead of 20.20.2

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Consolidated the import of FindOptions from '@mikro-orm/core' in database-server.ts and db-helper.ts, removing unnecessary type-only imports.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Deleted multiple obsolete test files from guardian-service and policy-service, including API and unit tests

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Replaces deprecated 'url.parse' with 'new URL' for node address parsing. Updates file upload logic to wrap files in Uint8Array before creating Blob for compatibility with IPFS providers.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Added "noUnusedLocals" and "noUnusedParameters" TypeScript compiler options to all project and production tsconfig.json files

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Cleaned up unused imports and variables

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Deleted helia-node.ts, ipfs-node.ts, and kudo-node.ts from the IPFS loaders directory as these files are no longer needed

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Updated all imports of Node.js core modules to use the 'node:' prefix for improved clarity and compatibility with modern Node.js standards. This change affects various files across multiple services, replacing imports such as 'fs', 'path', 'process', 'crypto', and others with their 'node:' equivalents.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Under module:NodeNext, default imports of CJS packages can resolve to the
module namespace rather than the runtime export, and some dep bumps moved
public types out of the package's barrel. Adjusts four call sites:
- api-gateway cache-provider: switch ioredis to a named import so Redis
  resolves as a class.
- auth-service metrics: import expressMiddleware by name from
  prometheus-api-metrics instead of the default.
- auth-service meeco.service: drop the base64url package in favor of
  Buffer.toString('base64url') (built into Node since 16).
- policy-service math-context: derive BoxedExpression from
  ComputeEngine['box']'s return type since @cortex-js/compute-engine 0.27
  no longer re-exports the interface at the top level.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
@Pyatakov Pyatakov force-pushed the feat/node24-version branch from 30efd7b to 07a68f9 Compare May 19, 2026 15:23
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