diff --git a/config/tsconfig.types.json b/config/tsconfig.types.json index 7a6200f3..7f95a7ff 100644 --- a/config/tsconfig.types.json +++ b/config/tsconfig.types.json @@ -4,6 +4,7 @@ "compilerOptions": { "module": "es2022", "outDir": "../dist/types", + "rootDir": "../src", "declaration": true, "emitDeclarationOnly": true, "declarationMap": false, diff --git a/package.json b/package.json index 50b4447d..2c30fca8 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "build:bundle": "rimraf -rf rxdb-server.tgz && npx yarn@1.22.10 pack ./ --filename ./rxdb-server.tgz", "version": "node ./scripts/version.js", "check-types": "npm run build && tsc", - "test:unit": "npm run build && mocha --require ts-node/register ./test/unit.test.ts --bail --exit", + "test:unit": "npm run build && mocha --import=tsx ./test/unit.test.ts --bail --exit", "test:integration:init": "(cd ./scripts && bash test-integration-init.sh)", "test:integration:memory": "(cd test-integration && npm run transpile && npm run test:node:memory)", "test:integration:foundationdb": "(cd test-integration && npm run transpile && npm run test:node:foundationdb)", @@ -105,7 +105,7 @@ "rimraf": "6.1.3", "rxdb": "https://github.com/pubkey/rxdb/archive/5e03fdd02c1324efa52fe9965accd302abaa8b62.tar.gz", "rxjs": "7.8.2", - "ts-node": "10.9.2", - "typescript": "5.9.3" + "tsx": "4.23.15", + "typescript": "7.0.2" } } diff --git a/test/unit/perf-rest-set.ts b/test/unit/perf-rest-set.ts index 716bd20b..79837be6 100644 --- a/test/unit/perf-rest-set.ts +++ b/test/unit/perf-rest-set.ts @@ -4,9 +4,9 @@ * that was changed by the overwrite-protection fix. * * Run with: - * npx ts-node --esm ./test/unit/perf-rest-set.ts + * npx tsx ./test/unit/perf-rest-set.ts * or - * npx mocha --require ts-node/register ./test/unit/perf-rest-set.ts --exit + * npx mocha --import=tsx ./test/unit/perf-rest-set.ts --exit */ import { addRxPlugin, diff --git a/tsconfig.json b/tsconfig.json index eb6c2d8d..dfb3ae9a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ "target": "es2022", // Search under node_modules for non-relative imports. // https://www.youtube.com/watch?v=H91aqUHn8sE - "moduleResolution": "node", + "moduleResolution": "bundler", // "module": "NodeNext", // Process & infer types from .js files. "allowJs": false,