Skip to content

Migrate typescript config to support TS 6 and node24#74

Merged
jarkkoskyt merged 7 commits intomainfrom
feature/update-tsconfig-to-support-ts6
Apr 8, 2026
Merged

Migrate typescript config to support TS 6 and node24#74
jarkkoskyt merged 7 commits intomainfrom
feature/update-tsconfig-to-support-ts6

Conversation

@jarkkoskyt
Copy link
Copy Markdown
Contributor

No description provided.

@jarkkoskyt
Copy link
Copy Markdown
Contributor Author

Summary

Update @digabi/typescript-config and monorepo to support TypeScript 6 on Node 24.

Shared config (@digabi/typescript-config)

common-tsconfig.json

  • Removed moduleResolution: "node" (removed in TS 6); each child config now sets its own strategy

root/tsconfig.json (backend/Node.js)

  • module: "commonjs""nodenext" (CJS output preserved since packages lack "type": "module")
  • target/lib: "es2022""es2024" + ESNext libs matching @tsconfig/node24 best practice
  • Added types: ["node"] (required for @types/node globals under nodenext)
  • Removed resolveJsonModule (automatic under nodenext)

public/tsconfig.json (frontend/React)

  • module: "es2022""preserve" (pass-through for bundlers)
  • Added moduleResolution: "bundler" (no .js extensions needed for frontend)
  • target: "es6""es2020" (es6 removed in TS 6)
  • lib: updated to "es2024"

Root dependency

  • typescript: "^5.8.3""^6.0.0"

All 17 packages + template

  • Added rootDir: "./src" to tsconfig.build.json (TS 6 requires explicit rootDir when outDir is set)

Source fix

  • Added .js extensions to 3 dynamic import() calls in examination-utils/__tests__/examination-period.test.ts (static imports are unaffected since CJS require() supports extensionless paths)

Migration notes for consuming repos

  • Backend repos extending root/tsconfig.json: upgrade to TS 6, add rootDir: "./src" to build configs, and add .js extensions to any dynamic import() calls with relative paths
  • Frontend repos extending public/tsconfig.json: upgrade to TS 6, no source changes needed (bundler resolution doesn't require extensions)

@jarkkoskyt jarkkoskyt merged commit c13d16b into main Apr 8, 2026
6 checks passed
@jarkkoskyt jarkkoskyt deleted the feature/update-tsconfig-to-support-ts6 branch April 8, 2026 05:51
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