From 17e229b2e1c656042e0606c51922895228d286ea Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 25 Sep 2026 16:13:43 +0000 Subject: [PATCH 1/2] Update dependency typescript to v7 --- package.json | 2 +- pnpm-lock.yaml | 263 +++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 234 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index d0ebd1e..ea133f6 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "prettier": "^3.6.0", "supertest": "^7.2.0", "tsx": "^4.20.0", - "typescript": "^5.9.0", + "typescript": "^7.0.0", "vitest": "^4.0.0", "wrangler": "^4.130.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index adf0f20..95f4946 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -183,7 +183,7 @@ importers: version: 0.28.2 kysely-codegen: specifier: ^0.19.0 - version: 0.19.0(kysely@0.29.5)(pg@8.23.0)(typescript@5.9.3) + version: 0.19.0(kysely@0.29.5)(pg@8.23.0)(typescript@7.0.2) miniflare: specifier: 5.20260908.0-alpha version: 5.20260908.0-alpha @@ -192,13 +192,13 @@ importers: version: 3.9.6 supertest: specifier: ^7.2.0 - version: 7.2.2 + version: 7.2.2(supports-color@10.2.2) tsx: specifier: ^4.20.0 version: 4.23.13 typescript: - specifier: ^5.9.0 - version: 5.9.3 + specifier: ^7.0.0 + version: 7.0.2 vitest: specifier: ^4.0.0 version: 4.1.11(@types/node@24.13.3)(vite@8.2.2(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.13)(yaml@2.9.0)) @@ -304,7 +304,7 @@ importers: version: 8.23.0 testcontainers: specifier: ^12.1.0 - version: 12.1.0 + version: 12.1.0(supports-color@10.2.2) turndown: specifier: ^7.2.0 version: 7.2.4 @@ -1206,6 +1206,126 @@ packages: '@types/turndown@5.0.6': resolution: {integrity: sha512-ru00MoyeeouE5BX4gRL+6m/BsDfbRayOskWqUvh7CLGW+UXxHQItqALa38kKnOiZPqJrtzJUgAC2+F0rL1S4Pg==} + '@typescript/typescript-aix-ppc64@7.0.2': + resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [aix] + + '@typescript/typescript-darwin-arm64@7.0.2': + resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/typescript-darwin-x64@7.0.2': + resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/typescript-freebsd-arm64@7.0.2': + resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [freebsd] + + '@typescript/typescript-freebsd-x64@7.0.2': + resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [freebsd] + + '@typescript/typescript-linux-arm64@7.0.2': + resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/typescript-linux-arm@7.0.2': + resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/typescript-linux-loong64@7.0.2': + resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} + engines: {node: '>=16.20.0'} + cpu: [loong64] + os: [linux] + + '@typescript/typescript-linux-mips64el@7.0.2': + resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} + engines: {node: '>=16.20.0'} + cpu: [mips64el] + os: [linux] + + '@typescript/typescript-linux-ppc64@7.0.2': + resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [linux] + + '@typescript/typescript-linux-riscv64@7.0.2': + resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} + engines: {node: '>=16.20.0'} + cpu: [riscv64] + os: [linux] + + '@typescript/typescript-linux-s390x@7.0.2': + resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} + engines: {node: '>=16.20.0'} + cpu: [s390x] + os: [linux] + + '@typescript/typescript-linux-x64@7.0.2': + resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/typescript-netbsd-arm64@7.0.2': + resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [netbsd] + + '@typescript/typescript-netbsd-x64@7.0.2': + resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [netbsd] + + '@typescript/typescript-openbsd-arm64@7.0.2': + resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [openbsd] + + '@typescript/typescript-openbsd-x64@7.0.2': + resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [openbsd] + + '@typescript/typescript-sunos-x64@7.0.2': + resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [sunos] + + '@typescript/typescript-win32-arm64@7.0.2': + resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/typescript-win32-x64@7.0.2': + resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + '@vitest/expect@4.1.11': resolution: {integrity: sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==} @@ -2577,9 +2697,9 @@ packages: tweetnacl@0.14.5: resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} - typescript@5.9.3: - resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} - engines: {node: '>=14.17'} + typescript@7.0.2: + resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} + engines: {node: '>=16.20.0'} hasBin: true undici-types@5.26.5: @@ -3197,9 +3317,9 @@ snapshots: '@js-sdsl/ordered-map@4.4.2': {} - '@kwsites/file-exists@1.1.1': + '@kwsites/file-exists@1.1.1(supports-color@10.2.2)': dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@10.2.2) transitivePeerDependencies: - supports-color @@ -3372,6 +3492,66 @@ snapshots: '@types/turndown@5.0.6': {} + '@typescript/typescript-aix-ppc64@7.0.2': + optional: true + + '@typescript/typescript-darwin-arm64@7.0.2': + optional: true + + '@typescript/typescript-darwin-x64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-x64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm@7.0.2': + optional: true + + '@typescript/typescript-linux-loong64@7.0.2': + optional: true + + '@typescript/typescript-linux-mips64el@7.0.2': + optional: true + + '@typescript/typescript-linux-ppc64@7.0.2': + optional: true + + '@typescript/typescript-linux-riscv64@7.0.2': + optional: true + + '@typescript/typescript-linux-s390x@7.0.2': + optional: true + + '@typescript/typescript-linux-x64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-sunos-x64@7.0.2': + optional: true + + '@typescript/typescript-win32-arm64@7.0.2': + optional: true + + '@typescript/typescript-win32-x64@7.0.2': + optional: true + '@vitest/expect@4.1.11': dependencies: '@standard-schema/spec': 1.1.0 @@ -3691,14 +3871,14 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig@9.0.2(typescript@5.9.3): + cosmiconfig@9.0.2(typescript@7.0.2): dependencies: env-paths: 2.2.1 import-fresh: 3.3.1 js-yaml: 4.3.2 parse-json: 5.2.0 optionalDependencies: - typescript: 5.9.3 + typescript: 7.0.2 cpu-features@0.0.10: dependencies: @@ -3729,9 +3909,11 @@ snapshots: css-what@6.2.2: {} - debug@4.4.3: + debug@4.4.3(supports-color@10.2.2): dependencies: ms: 2.1.3 + optionalDependencies: + supports-color: 10.2.2 defu@6.1.7: {} @@ -3750,21 +3932,21 @@ snapshots: dependencies: yaml: 2.9.0 - docker-modem@5.0.7: + docker-modem@5.0.7(supports-color@10.2.2): dependencies: - debug: 4.4.3 + debug: 4.4.3(supports-color@10.2.2) readable-stream: 3.6.2 split-ca: 1.0.1 ssh2: 1.17.0 transitivePeerDependencies: - supports-color - dockerode@5.0.1: + dockerode@5.0.1(supports-color@10.2.2): dependencies: '@balena/dockerignore': 1.0.2 '@grpc/grpc-js': 1.14.4 '@grpc/proto-loader': 0.7.15 - docker-modem: 5.0.7 + docker-modem: 5.0.7(supports-color@10.2.2) protobufjs: 7.6.6 tar-fs: 2.1.5 transitivePeerDependencies: @@ -4107,10 +4289,10 @@ snapshots: kleur@4.1.5: {} - kysely-codegen@0.19.0(kysely@0.29.5)(pg@8.23.0)(typescript@5.9.3): + kysely-codegen@0.19.0(kysely@0.29.5)(pg@8.23.0)(typescript@7.0.2): dependencies: chalk: 4.1.2 - cosmiconfig: 9.0.2(typescript@5.9.3) + cosmiconfig: 9.0.2(typescript@7.0.2) dotenv: 17.4.2 dotenv-expand: 12.0.3 git-diff: 2.0.7 @@ -4406,9 +4588,9 @@ snapshots: retry: 0.12.0 signal-exit: 3.0.7 - properties-reader@3.0.1: + properties-reader@3.0.1(supports-color@10.2.2): dependencies: - '@kwsites/file-exists': 1.1.1 + '@kwsites/file-exists': 1.1.1(supports-color@10.2.2) mkdirp: 3.0.1 transitivePeerDependencies: - supports-color @@ -4665,11 +4847,11 @@ snapshots: optionalDependencies: '@types/node': 24.13.3 - superagent@10.3.0: + superagent@10.3.0(supports-color@10.2.2): dependencies: component-emitter: 1.3.1 cookiejar: 2.1.4 - debug: 4.4.3 + debug: 4.4.3(supports-color@10.2.2) fast-safe-stringify: 2.1.1 form-data: 4.0.6 formidable: 3.5.4 @@ -4679,11 +4861,11 @@ snapshots: transitivePeerDependencies: - supports-color - supertest@7.2.2: + supertest@7.2.2(supports-color@10.2.2): dependencies: cookie-signature: 1.2.2 methods: 1.1.2 - superagent: 10.3.0 + superagent: 10.3.0(supports-color@10.2.2) transitivePeerDependencies: - supports-color @@ -4744,19 +4926,19 @@ snapshots: - bare-abort-controller - react-native-b4a - testcontainers@12.1.0: + testcontainers@12.1.0(supports-color@10.2.2): dependencies: '@balena/dockerignore': 1.0.2 '@types/dockerode': 4.0.1 archiver: 7.0.1 async-lock: 1.4.1 byline: 5.0.0 - debug: 4.4.3 + debug: 4.4.3(supports-color@10.2.2) docker-compose: 1.4.2 - dockerode: 5.0.1 + dockerode: 5.0.1(supports-color@10.2.2) get-port: 5.1.1 proper-lockfile: 4.1.2 - properties-reader: 3.0.1 + properties-reader: 3.0.1(supports-color@10.2.2) ssh-remote-port-forward: 1.0.4 tar-fs: 3.1.3 tmp: 0.2.7 @@ -4805,7 +4987,28 @@ snapshots: tweetnacl@0.14.5: {} - typescript@5.9.3: {} + typescript@7.0.2: + optionalDependencies: + '@typescript/typescript-aix-ppc64': 7.0.2 + '@typescript/typescript-darwin-arm64': 7.0.2 + '@typescript/typescript-darwin-x64': 7.0.2 + '@typescript/typescript-freebsd-arm64': 7.0.2 + '@typescript/typescript-freebsd-x64': 7.0.2 + '@typescript/typescript-linux-arm': 7.0.2 + '@typescript/typescript-linux-arm64': 7.0.2 + '@typescript/typescript-linux-loong64': 7.0.2 + '@typescript/typescript-linux-mips64el': 7.0.2 + '@typescript/typescript-linux-ppc64': 7.0.2 + '@typescript/typescript-linux-riscv64': 7.0.2 + '@typescript/typescript-linux-s390x': 7.0.2 + '@typescript/typescript-linux-x64': 7.0.2 + '@typescript/typescript-netbsd-arm64': 7.0.2 + '@typescript/typescript-netbsd-x64': 7.0.2 + '@typescript/typescript-openbsd-arm64': 7.0.2 + '@typescript/typescript-openbsd-x64': 7.0.2 + '@typescript/typescript-sunos-x64': 7.0.2 + '@typescript/typescript-win32-arm64': 7.0.2 + '@typescript/typescript-win32-x64': 7.0.2 undici-types@5.26.5: {} From 5b774f4079680773db9fc1f3f27722b9d90bef2c Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Fri, 25 Sep 2026 09:43:58 -0700 Subject: [PATCH 2/2] Adapt TypeScript 7 type checks and query test --- packages/auth/src/better-auth-testing.ts | 2 +- scripts/verify-packages.ts | 11 +++++- tests/integration/query-types.test.ts | 47 ++++++++++++++++-------- 3 files changed, 43 insertions(+), 17 deletions(-) diff --git a/packages/auth/src/better-auth-testing.ts b/packages/auth/src/better-auth-testing.ts index 1225a23..fa1d77b 100644 --- a/packages/auth/src/better-auth-testing.ts +++ b/packages/auth/src/better-auth-testing.ts @@ -33,7 +33,7 @@ const ScopedDate: DateConstructor = new Proxy(NativeDate, { const scopedCrypto = new Proxy(nativeCrypto, { get(target, key) { if (key === 'getRandomValues') - return (array: ArrayBufferView) => { + return (array: ArrayBufferView) => { const random = deterministicScope.getStore()?.random; if (!random) return target.getRandomValues(array); if ( diff --git a/scripts/verify-packages.ts b/scripts/verify-packages.ts index c8a9621..e98c092 100644 --- a/scripts/verify-packages.ts +++ b/scripts/verify-packages.ts @@ -9,6 +9,12 @@ await mkdir(join(directory, 'vendor')); const { packageManager } = JSON.parse( await readFile(join(projectRoot, 'package.json'), 'utf8'), ) as { packageManager: string }; +const { version: typescriptVersion } = JSON.parse( + await readFile( + join(projectRoot, 'node_modules/typescript/package.json'), + 'utf8', + ), +) as { version: string }; const dependencies: Record = {}; // The consumer owns every shared library, at the version this workspace tests. const peers: Record = {}; @@ -53,7 +59,10 @@ await writeFile( type: 'module', packageManager, dependencies: { ...dependencies, ...peers }, - devDependencies: { '@types/node': '24.13.3', typescript: '5.9.3' }, + devDependencies: { + '@types/node': '24.13.3', + typescript: typescriptVersion, + }, }, null, 2, diff --git a/tests/integration/query-types.test.ts b/tests/integration/query-types.test.ts index 2c3c8f1..db16d22 100644 --- a/tests/integration/query-types.test.ts +++ b/tests/integration/query-types.test.ts @@ -1,6 +1,6 @@ +import { spawnSync } from 'node:child_process'; import { mkdir, mkdtemp, writeFile, rm, readFile } from 'node:fs/promises'; import { join } from 'node:path'; -import ts from 'typescript'; import { test, expect } from 'vitest'; import { allocateDatabase, @@ -24,20 +24,37 @@ test('regenerated types include new tables and make renamed-column queries fail query, "import {Kysely} from 'kysely';\nimport type {DB} from './db.ts';\ndeclare const db: Kysely;\ndb.selectFrom('users').select('email');\n", ); - const diagnostics = () => - ts - .getPreEmitDiagnostics( - ts.createProgram([query], { - module: ts.ModuleKind.NodeNext, - moduleResolution: ts.ModuleResolutionKind.NodeNext, - target: ts.ScriptTarget.ES2023, - strict: true, - noEmit: true, - skipLibCheck: true, - allowImportingTsExtensions: true, - }), - ) - .map((error) => ts.flattenDiagnosticMessageText(error.messageText, '\n')); + const diagnostics = () => { + const result = spawnSync( + process.execPath, + [ + join(projectRoot, 'node_modules/typescript/bin/tsc'), + query, + '--ignoreConfig', + '--module', + 'NodeNext', + '--moduleResolution', + 'NodeNext', + '--target', + 'ES2023', + '--strict', + '--noEmit', + '--skipLibCheck', + '--allowImportingTsExtensions', + '--pretty', + 'false', + ], + { encoding: 'utf8' }, + ); + if (result.error) throw result.error; + const output = result.stdout + result.stderr; + const errors = output + .split(/(?=^.*error TS\d+:)/m) + .filter((diagnostic) => /error TS\d+:/.test(diagnostic)); + if (result.status !== 0 && errors.length === 0) + throw new Error(`TypeScript exited with ${result.status}: ${output}`); + return errors; + }; await generateTypes(lease.url, definitions); expect(diagnostics()).toEqual([]); await queryDatabase(