Skip to content

Conversation

@marcj
Copy link
Owner

@marcj marcj commented Nov 29, 2025

  • Add tsconfig.base.json with shared compiler options
  • Enable isolatedModules for compatibility with esbuild/swc/Babel
  • Convert const enums to regular enums (required for isolatedModules)
  • Remove emitDecoratorMetadata (unused, Deepkit uses type-compiler)
  • All package tsconfigs now extend the base config

BREAKING CHANGE: const enums converted to regular enums in:

  • MappedModifier (type-spec)
  • BinaryBigIntType (type)
  • BrokerType (broker)
  • RpcMessageRouteType (rpc)
  • AuthMechanism (mongo)

  - Add tsconfig.base.json with shared compiler options
  - Enable isolatedModules for compatibility with esbuild/swc/Babel
  - Convert const enums to regular enums (required for isolatedModules)
  - Remove emitDecoratorMetadata (unused, Deepkit uses type-compiler)
  - All package tsconfigs now extend the base config

BREAKING CHANGE: const enums converted to regular enums in:
  - MappedModifier (type-spec)
  - BinaryBigIntType (type)
  - BrokerType (broker)
  - RpcMessageRouteType (rpc)
  - AuthMechanism (mongo)
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR establishes a centralized TypeScript configuration pattern by introducing tsconfig.base.json with shared compiler options, most notably enabling isolatedModules for compatibility with modern fast transpilers (esbuild, swc, Babel). All package-level tsconfig.json files now extend this base configuration, eliminating duplication across 50+ packages.

Key changes:

  • Created tsconfig.base.json with shared TypeScript compiler options including isolatedModules: true
  • Converted all const enum declarations to regular enum (required for isolatedModules)
  • Removed emitDecoratorMetadata from all configs (unused since Deepkit uses type-compiler)

Reviewed changes

Copilot reviewed 62 out of 62 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsconfig.base.json New centralized TypeScript configuration with shared compiler options and isolatedModules enabled
packages/*/tsconfig.json All package configs now extend the base config, removing duplicated options
packages/type/src/reflection/type.ts Converted BinaryBigIntType from const enum to regular enum
packages/type-spec/src/type.ts Converted MappedModifier from const enum to regular enum
packages/rpc/src/protocol.ts Converted RpcMessageRouteType from const enum to regular enum
packages/broker/src/model.ts Converted BrokerType from const enum to regular enum
packages/mongo/src/client/command/handshake.ts Converted AuthMechanism from const enum to regular enum
Comments suppressed due to low confidence (4)

packages/orm-browser-gui/tsconfig.json:28

  • These compiler options (forceConsistentCasingInFileNames, strict, noFallthroughCasesInSwitch, sourceMap, experimentalDecorators, esModuleInterop, moduleResolution, skipLibCheck) are redundant as they're already defined in tsconfig.base.json. Consider removing them to avoid duplication and potential inconsistencies.
    packages/framework-debug-gui/tsconfig.json:27
  • These compiler options (forceConsistentCasingInFileNames, strict, noFallthroughCasesInSwitch, sourceMap, experimentalDecorators, esModuleInterop, moduleResolution, skipLibCheck) are redundant as they're already defined in tsconfig.base.json. Consider removing them to avoid duplication and potential inconsistencies.
    "forceConsistentCasingInFileNames": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "noFallthroughCasesInSwitch": true,
    "sourceMap": true,
    "skipLibCheck": true,
    "declaration": false,
    "composite": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2022",
    "module": "ES2022",
    "useDefineForClassFields": false,
    "types": [
      "dagre",
      "file-saver",
      "jasmine",
      "marked"
    ]

packages/api-console-gui/tsconfig.json:25

  • These compiler options (forceConsistentCasingInFileNames, strict, noFallthroughCasesInSwitch, sourceMap, experimentalDecorators, esModuleInterop, moduleResolution, skipLibCheck) are redundant as they're already defined in tsconfig.base.json. Consider removing them to avoid duplication and potential inconsistencies.
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "noFallthroughCasesInSwitch": true,
    "allowSyntheticDefaultImports": true,
    "sourceMap": true,
    "skipLibCheck": true,
    "declaration": false,
    "composite": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2022",
    "module": "ES2022",
    "useDefineForClassFields": false,
    "types": [
      "jasmine",
      "marked"
    ]

packages/desktop-ui/tsconfig.json:28

  • These compiler options (moduleResolution, experimentalDecorators, downlevelIteration, sourceMap, strict, esModuleInterop, skipLibCheck) are redundant as they're already defined in tsconfig.base.json. Consider removing them to avoid duplication and potential inconsistencies.
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "downlevelIteration": true,
    "sourceMap": true,
    "strict": true,
    "target": "es2022",
    "useDefineForClassFields": false,
    "noImplicitAny": true,
    "esModuleInterop": true,
    "preserveSymlinks": true,
    "types": [
      "fs-extra",
      "node"
    ],
    "paths": {
      "angular-desktop-ui": [
        "dist/"
      ]
    },
    "skipLibCheck": true

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@marcj marcj merged commit c730cfc into master Nov 29, 2025
17 checks passed
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.

2 participants