Skip to content

feat: Migrate to Node.js 24 LTS#6063

Open
Pyatakov wants to merge 15 commits into
developfrom
feat/node24-version
Open

feat: Migrate to Node.js 24 LTS#6063
Pyatakov wants to merge 15 commits into
developfrom
feat/node24-version

Conversation

@Pyatakov

@Pyatakov Pyatakov commented May 12, 2026

Copy link
Copy Markdown
Contributor

Description

  • Bump Node.js base image to 24.18.0 across all backend Dockerfiles and GitHub Actions workflows
  • Bump dependencies for Node 24 compatibility, plus many deps 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)
  • Remove dead module-alias / rewire devDeps from 6 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

@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown

Test Results

 32 files  ±0   64 suites  ±0   6m 22s ⏱️ + 1m 58s
 35 tests ±0   33 ✅ ±0  0 💤 ±0  2 ❌ ±0 
165 runs  ±0  163 ✅ ±0  0 💤 ±0  2 ❌ ±0 

For more details on these failures, see this check.

Results for commit 409c0cf. ± Comparison against base commit 0bb0cbb.

♻️ 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 2 times, most recently from 30efd7b to 07a68f9 Compare May 19, 2026 15:23
@Pyatakov Pyatakov changed the title feat: Migrate to Node.js 24.15.0 feat: Migrate to Node.js 24 LTS Jun 19, 2026
@Pyatakov Pyatakov force-pushed the feat/node24-version branch 9 times, most recently from 548e45b to 712d475 Compare June 25, 2026 14:45
@Pyatakov Pyatakov marked this pull request as ready for review June 25, 2026 21:21
@Pyatakov Pyatakov requested review from a team as code owners June 25, 2026 21:21
@Pyatakov Pyatakov force-pushed the feat/node24-version branch 2 times, most recently from eae385c to baa051a Compare June 26, 2026 14:35
@Pyatakov Pyatakov requested a review from a team as a code owner June 26, 2026 15:05
@Pyatakov Pyatakov requested a review from leninmehedy June 26, 2026 15:05
@Pyatakov Pyatakov force-pushed the feat/node24-version branch from 01d5fd6 to 82786f5 Compare June 26, 2026 20:18
Pyatakov and others added 15 commits June 27, 2026 00:15
Bump Node.js base image to 24.18.0-alpine across all Dockerfiles. Update dependencies and devDependencies for multiple services and related type packages. 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>

Update tsconfig.production.json

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
All GitHub Actions workflow files now use Node.js version 24.18.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>
Regenerate yarn.lock to upgrade multiple dependencies and transitive packages.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Insert "rootDir" (mostly "./src", guardian-cli uses ".") into many tsconfig.json and tsconfig.production.json files across services and libraries to standardize TypeScript compilation roots. Also remove/adjust some legacy entries (removed baseUrl in several configs, replaced empty paths/removed compileOnSave) to ensure consistent outDir/sourceMap behavior and reliable builds across environments.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Refactor guardian-cli helpers to use the correct Node path APIs and remove unused code: replace incorrect Path usages with path, update imports, and remove an unused _splitContractBytecode helper and an unused path import where no longer required. Fix a typo in a JSDoc param (Network). Simplify SDK imports in contract helper by removing unused symbols. Update guardian-cli package.json: change bin to string form and bump solc from 0.8.28 to 0.8.35. Add guardian-cli to root workspaces and regenerate yarn.lock entries to reflect the solc bump and workspace/package changes.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Normalize import paths to use relative imports so modules resolve correctly. No functional changes.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
- Update Node.js requirement to v24.15+ across all documentation files.
- Bump NATS to 2.9.25 and update IPFS storage options to include Storacha, Filebase, and Kubo.
- Update built-with documentation to reflect current tech stack: NestJS instead of Express, Verifiable Credentials JS instead of Transmute, and PrimeNG for frontend.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
@Pyatakov Pyatakov force-pushed the feat/node24-version branch from 82786f5 to 409c0cf Compare June 26, 2026 23:15
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