From 5f3302eaf9d76ee631bb71e47c327ec3d04ab6eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ianar=C3=A9=20S=C3=A9vi?= Date: Mon, 21 Sep 2026 15:49:23 +0200 Subject: [PATCH 1/3] :arrow_up: migrate to TypeScript 6.0 --- package-lock.json | 14 +++++++------- package.json | 2 +- tsconfig.json | 1 - 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index a48d260e..8cf80fc6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,7 @@ "tslib": "^2.8.1", "tsx": "^4.21.0", "typedoc": "^0.28.18", - "typescript": "^5.9.3", + "typescript": "^6.0.3", "typescript-eslint": "^8.70.0" }, "engines": { @@ -6212,9 +6212,9 @@ "license": "0BSD" }, "node_modules/tsx": { - "version": "4.23.12", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.12.tgz", - "integrity": "sha512-FDf4L4sYzKtzWYhU/Xm0AQFdTjdIxNo9ElTf2mxXM6k8YMHXzYUe4yODVaXP4V9uMFbVg8c0qyBccK2OOxb45Q==", + "version": "4.23.15", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.15.tgz", + "integrity": "sha512-Yiex1Ovn8z2xPpOWckIiysV1SSyRMY9BkLF++q0yKiDxCqRhosKfMg3janKkiLBwZ5c/YryloKwGZcrEmtwxKw==", "dev": true, "license": "MIT", "dependencies": { @@ -6284,9 +6284,9 @@ } }, "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/package.json b/package.json index 42e90808..cef77f21 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "tslib": "^2.8.1", "tsx": "^4.21.0", "typedoc": "^0.28.18", - "typescript": "^5.9.3", + "typescript": "^6.0.3", "typescript-eslint": "^8.70.0" }, "keywords": [ diff --git a/tsconfig.json b/tsconfig.json index 9c53af32..aeca98c4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "baseUrl": "./", "rootDir": "./", "declaration": true, "importHelpers": false, From e709a738188f74feab6c47ee7cb73f002b37b7e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ianar=C3=A9=20S=C3=A9vi?= Date: Wed, 23 Sep 2026 17:15:42 +0200 Subject: [PATCH 2/3] add tsconfig for tests --- tsconfig.test.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tsconfig.test.json diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 00000000..6ff271cf --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { "noEmit": true }, + "include": ["./src/**/*", "./bin/**/*", "./tests/**/*"], + "exclude": ["./node_modules/", "./dist/"] +} From 869af4397fb8fe1a084e6b81b0467cc0e2985623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ianar=C3=A9=20S=C3=A9vi?= Date: Wed, 23 Sep 2026 17:40:22 +0200 Subject: [PATCH 3/3] use the test config --- package.json | 6 +++--- tests/v2/fileOperations/split.integration.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cef77f21..fe4791fb 100644 --- a/package.json +++ b/package.json @@ -39,9 +39,9 @@ "test:light": "node tests/runner.mjs spec", "test:integration": "node tests/runner.mjs integration", "test:integration:light": "node tests/runner.mjs integration", - "test:v2": "tsc --noEmit && node tests/runner.mjs spec v2", - "lint": "tsc --noEmit && eslint --report-unused-disable-directives './src/**/*.ts' './tests/**/*.ts'", - "lint:fix": "tsc --noEmit && eslint --fix --report-unused-disable-directives './src/**/*.ts' './tests/**/*.ts'", + "test:v2": "tsc -p tsconfig.test.json && node tests/runner.mjs spec v2", + "lint": "tsc -p tsconfig.test.json && eslint --report-unused-disable-directives './src/**/*.ts' './tests/**/*.ts'", + "lint:fix": "tsc -p tsconfig.test.json && eslint --fix --report-unused-disable-directives './src/**/*.ts' './tests/**/*.ts'", "lint:package": "npm run build:dist && publint ./dist && attw --pack ./dist --profile esm-only", "lint:secrets": "secretlint '**/*'", "license:check": "license-checker-rseidelsohn --onlyAllow \"MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC;LGPL-3.0-or-later;LGPL-3.0-only;Python-2.0;BlueOak-1.0.0;CC-BY-3.0;CC-BY-4.0;CC0-1.0;0BSD;WTFPL;Artistic-2.0;Unlicense\"", diff --git a/tests/v2/fileOperations/split.integration.ts b/tests/v2/fileOperations/split.integration.ts index 2d352344..91b40cbb 100644 --- a/tests/v2/fileOperations/split.integration.ts +++ b/tests/v2/fileOperations/split.integration.ts @@ -5,9 +5,9 @@ import * as fs from "node:fs"; import { fileURLToPath } from "node:url"; import { Client, PathInput } from "@/index.js"; +import { ExtractedPdfs } from "@/pdf/index.js"; import { Split } from "@/v2/product/split/index.js"; import { Extraction, ExtractionResponse } from "@/v2/product/extraction/index.js"; -import { SplitFiles } from "@/v2/fileOperations/splitFiles.js"; import { V2_PRODUCT_PATH } from "../../index.js"; import { SimpleField } from "@/v2/parsing/inference/field/index.js"; import { hasAllOptionalDependencies } from "../../helpers/optionalDeps.js"; @@ -65,7 +65,7 @@ describe("MindeeV2 - Integration - Product - Split #OptionalDepsRequired", assert.equal(response.inference.file.pageCount, 2); - const extractedPdfs: SplitFiles = await response.inference.result.extractFromInputSource(splitInput); + const extractedPdfs: ExtractedPdfs = await response.inference.result.extractFromInputSource(splitInput); assert.equal(extractedPdfs.length, 2); assert.equal(extractedPdfs[0].filename, "default_sample_page_001-001.pdf");