diff --git a/config/tsconfig.types.json b/config/tsconfig.types.json index d7793213ba6..6c0a65fc9a8 100644 --- a/config/tsconfig.types.json +++ b/config/tsconfig.types.json @@ -3,6 +3,7 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../dist/types", + "rootDir": "../src", "declaration": true, "emitDeclarationOnly": true, "declarationMap": false, diff --git a/package.json b/package.json index c92c1df3505..4b84512de60 100644 --- a/package.json +++ b/package.json @@ -470,7 +470,7 @@ "test:replication-google-drive": "npm run transpile && cross-env DEFAULT_STORAGE=dexie tsx ./node_modules/mocha/bin/mocha --config ./config/.mocharc.cjs ./test/replication-google-drive.test.ts", "test:replication-microsoft-onedrive": "npm run transpile && cross-env DEFAULT_STORAGE=dexie tsx ./node_modules/mocha/bin/mocha --config ./config/.mocharc.cjs ./test/replication-microsoft-onedrive.test.ts", "test:full": "npm run transpile && mocha ./test_tmp/unit/full.node.js", - "test:typings": "npm run build:plugins && tsc --allowImportingTsExtensions --noEmit --skipLibCheck --lib \"ES2022,DOM\" ./test/typings.test.ts", + "test:typings": "npm run build:plugins && npm run tsc7 -- --ignoreConfig --allowImportingTsExtensions --noEmit --skipLibCheck --lib \"ES2022,DOM\" ./test/typings.test.ts", "test:deps": "npm run build && dependency-check ./package.json ./dist/cjs/index.js ./dist/cjs/plugins/validate-is-my-json-valid/index.js ./dist/cjs/plugins/attachments-compression/index.js ./dist/cjs/plugins/validate-ajv/index.js ./dist/cjs/plugins/update/index.js ./dist/cjs/plugins/key-compression/index.js ./dist/cjs/plugins/dev-mode/index.js ./dist/cjs/plugins/encryption-crypto-js/index.js ./dist/cjs/plugins/replication-graphql/index.js ./dist/cjs/plugins/replication-webrtc/index.js ./dist/cjs/plugins/replication-websocket/index.js ./dist/cjs/plugins/replication-firestore/index.js ./dist/cjs/plugins/replication-nats/index.js ./dist/cjs/plugins/validate-z-schema/index.js ./dist/cjs/plugins/storage-dexie/index.js ./dist/cjs/plugins/storage-memory/index.js ./dist/cjs/plugins/storage-mongodb/index.js ./dist/cjs/plugins/reactivity-angular/index.js ./dist/cjs/plugins/reactivity-vue/index.js ./dist/cjs/plugins/react/index.js ./dist/cjs/plugins/reactivity-preact-signals/index.js --no-dev --ignore-module url --ignore-module ws --ignore-module graphql --ignore-module as-typed --ignore-module \"@types/*\"", "test:circular": "npm run build && npm run build:test && madge --circular ./dist/esm/index.js && madge --circular ./dist/esm/plugins/storage-dexie/index.js && madge --circular test_tmp", "test:performance:dexie": "npm run transpile && cross-env DEFAULT_STORAGE=dexie CI=true karma start ./config/karma.performance.conf.cjs --single-run", @@ -504,13 +504,15 @@ "lint:fix": "eslint . --fix", "lint:debug:files": "DEBUG=eslint:cli-engine eslint .", "lint:debug:time": "TIMING=1 eslint .", - "check-types": "tsc", + "// tsc7": "TypeScript v7 (native) compiler. Invoked by explicit path because its 'tsc' bin name collides with the classic typescript@5 kept for typescript-eslint.", + "tsc7": "node ./node_modules/typescript7/bin/tsc", + "check-types": "npm run tsc7", "transpile": "npm run build:version && node scripts/transpile.mjs && cp ./scripts/module_package.json test_tmp/package.json", "build:version": "node ./scripts/update-version-variable.mjs", "build:cjs": "npm run build:version && rimraf -rf --max-retries=3 dist/cjs && cross-env NODE_ENV=es5 babel src --out-dir dist/cjs --source-maps --extensions \".ts,.tsx,.js\"", "build:test": "npm run build:version && rimraf -rf --max-retries=3 test_tmp && cross-env NODE_ENV=es6 babel test --out-dir test_tmp --source-maps --extensions \".ts,.tsx,.js\" && cp ./scripts/module_package.json test_tmp/package.json", "build:esm": "npm run build:version && rimraf -rf --max-retries=3 dist/esm && cross-env NODE_ENV=es6 babel src --out-dir dist/esm --source-maps --extensions \".ts,.tsx,.js\" && cp ./scripts/module_package_no_side.json dist/esm/package.json", - "build:types": "npm run build:version && rimraf -rf --max-retries=3 ./dist/types && tsc --project ./config/tsconfig.types.json && cp -r ./src/types ./dist/types/types && node ./scripts/fix-types.mjs", + "build:types": "npm run build:version && rimraf -rf --max-retries=3 ./dist/types && npm run tsc7 -- --project ./config/tsconfig.types.json && cp -r ./src/types ./dist/types/types && node ./scripts/fix-types.mjs", "build": "npm run clear && npm run build:version && concurrently \"npm run build:cjs\" \"npm run build:esm\" \"npm run build:types\" \"npm run build:plugins\"", "build:plugins": "node ./scripts/generate-plugins-package-json.mjs", "build:webpack": "npm run build && cross-env NODE_ENV=build webpack --config ./config/webpack.config.js", @@ -626,8 +628,8 @@ "@types/node": "24.13.3", "@types/react": "19.2.17", "@types/source-map-support": "0.5.10", - "@typescript-eslint/eslint-plugin": "8.63.0", - "@typescript-eslint/parser": "8.63.0", + "@typescript-eslint/eslint-plugin": "8.64.0", + "@typescript-eslint/parser": "8.64.0", "appwrite": "26.1.0", "assert": "2.1.0", "async-test-util": "2.5.0", @@ -700,6 +702,7 @@ "ts-loader": "9.6.2", "tsx": "4.23.0", "typescript": "5.9.3", + "typescript7": "npm:typescript@7.0.2", "vue": "3.5.39", "walk-sync": "4.0.2", "watch": "1.0.2", @@ -714,4 +717,4 @@ "dexie": "4.4.2" }, "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" -} \ No newline at end of file +}