From e6639caef7e251208bc96c302f1bd1adbf2e938b Mon Sep 17 00:00:00 2001 From: Matt Carey Date: Mon, 15 Dec 2025 12:26:37 +0000 Subject: [PATCH 1/2] Update TypeScript config to ES2020 with bundler resolution and fix Ajv import Changes module system from Node16 to ES2020 with bundler resolution, adds allowSyntheticDefaultImports flag, and updates Ajv import to use default import instead of named import. --- src/validation/ajv-provider.ts | 2 +- tsconfig.json | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/validation/ajv-provider.ts b/src/validation/ajv-provider.ts index 115a98521..3c2967c3a 100644 --- a/src/validation/ajv-provider.ts +++ b/src/validation/ajv-provider.ts @@ -2,7 +2,7 @@ * AJV-based JSON Schema validator provider */ -import { Ajv } from 'ajv'; +import Ajv from 'ajv'; import _addFormats from 'ajv-formats'; import type { JsonSchemaType, JsonSchemaValidator, JsonSchemaValidatorResult, jsonSchemaValidator } from './types.js'; diff --git a/tsconfig.json b/tsconfig.json index c7346e4fe..34343b3b6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,15 @@ { "compilerOptions": { - "target": "es2018", - "module": "Node16", - "moduleResolution": "Node16", + "target": "es2020", + "module": "es2020", + "moduleResolution": "bundler", "declaration": true, "declarationMap": true, "sourceMap": true, "outDir": "./dist", "strict": true, "esModuleInterop": true, + "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, "isolatedModules": true, From e9844447f90d7be252f7b7bfad40b3d8c8324743 Mon Sep 17 00:00:00 2001 From: Matt Carey Date: Mon, 15 Dec 2025 14:19:10 +0000 Subject: [PATCH 2/2] use es2022 for top level await --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 34343b3b6..9ec1d479d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "es2020", - "module": "es2020", + "module": "es2022", "moduleResolution": "bundler", "declaration": true, "declarationMap": true,