Skip to content

chore: migrate backend to Node 24 ESM, Vitest, and Biome - #23

Merged
CrazzyBuilds merged 3 commits into
mainfrom
chore/update-backend-dependencies
Aug 7, 2026
Merged

chore: migrate backend to Node 24 ESM, Vitest, and Biome#23
CrazzyBuilds merged 3 commits into
mainfrom
chore/update-backend-dependencies

Conversation

@CrazzyBuilds

Copy link
Copy Markdown
Contributor

Description

This Pull Request modernizes the backend codebase (variamos_ms_admin) by upgrading it to Node 24 native ES Modules (ESM). It replaces the slow Jest runner with Vitest for fast, native ESM test runs, and swaps ESLint/Prettier with Biome (Rust-based) for lightning-fast linting and formatting. TypeScript compilation constraints have also been hardened by removing generic any/unknown types in favor of strict domain-specific types.

Key Changes

  • Dependency Upgrades: Upgraded all target dependencies (such as uuid, cookie, helmet, and google-auth-library) to their latest major versions, and updated all remaining packages to their latest stable minor/patch versions.
  • Native ESM (Node 24): Enabled "type": "module" in package.json, set tsconfig.json to "moduleResolution": "node16", and automated the addition of .js//index.js extensions required by ESM.
  • Production Build: Integrated tsc-alias into the build process to rewrite @src/* path aliases to relative imports, removing the runtime dependency on module-alias.
  • Jest ➔ Vitest: Migrated the entire test suite to Vitest. Created vitest.config.ts and refactored dynamic mocks from synchronous Jest APIs to Vitest's asynchronous await vi.importActual.
  • ESLint/Prettier ➔ Biome: Migrated to Biome v2 for formatting, linting, and imports organization, decreasing validation times to ~250ms. Configured biome.json and cleaned up all deprecated ESLint/Prettier dependencies.
  • Strict Typing: Eradicated any/unknown types from repository filter parameters (BaseRepository and query parameters) by implementing strict SQL-compliant union types and TypeScript generics.
  • Stryker & CI/CD: Updated Stryker mutation testing configurations to use the official @stryker-mutator/vitest-runner, and updated GitHub Actions (ci.yml) to run Biome checks.
  • Dependency Management: Added taze (runnable via npm run check-updates) to easily check and manage minor/patch package updates.

How to Test

  1. Run npm install to ensure all packages are up to date.
  2. Run npm run typecheck to verify TypeScript types compile successfully under TS 6.
  3. Run npm run lint to execute Biome and verify that the linter/formatter returns zero errors or warnings.
  4. Run npm run test to verify that all unit and integration tests run and pass under Vitest.
  5. Run npm run check-arch to verify that Clean Architecture boundaries are respected (dependency-cruiser).
  6. Run npm run build to ensure the production build compiles with all path aliases resolved.

@CrazzyBuilds CrazzyBuilds self-assigned this Aug 7, 2026
@CrazzyBuilds
CrazzyBuilds force-pushed the chore/update-backend-dependencies branch from 02a44bc to efca093 Compare August 7, 2026 19:23
@CrazzyBuilds
CrazzyBuilds merged commit 744bd27 into main Aug 7, 2026
1 of 2 checks passed
@CrazzyBuilds
CrazzyBuilds deleted the chore/update-backend-dependencies branch August 7, 2026 19:25
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