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..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\"", @@ -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/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"); 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, 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/"] +}