chore: update all dependencies (#1209)

* chore: update all dependencies

* chore: remove lint errors

* fix(client): restore typecheck after dependency bump

vitest 4 types vi.fn() as Mock<Procedure | Constructable>, which no
longer assigns to the strictly-typed onUpdate prop; type the mock
explicitly. TS6 + the new transitive @types/node 25 stopped auto-
including node builtin module types, so import('node:buffer') failed;
add @types/node as a direct client devDependency and a scoped node
type reference in the one test that needs it.

* test: fix constructor mocks for vitest 4 Reflect.construct semantics

vitest 4 resolves new-invoked mocks via Reflect.construct, which rejects
arrow-function implementations (including mockReturnValue sugar) as
non-constructable. Convert mapbox-gl and better-sqlite3 mocks that the
code instantiates with new to regular function implementations.
This commit is contained in:
jubnl
2026-06-16 18:56:42 +02:00
committed by GitHub
parent 1547258c0c
commit 54e81b0785
14 changed files with 7031 additions and 2845 deletions
+32 -17
View File
@@ -5,38 +5,53 @@
"description": "Shared API contracts (Zod schemas) — single source of truth for TREK server and client.",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"module": "./dist/index.mjs",
"types": "./dist/index.d.cts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./i18n": {
"types": "./dist/i18n/index.d.ts",
"import": "./dist/i18n/index.js",
"require": "./dist/i18n/index.cjs"
"import": {
"types": "./dist/i18n/index.d.mts",
"default": "./dist/i18n/index.mjs"
},
"require": {
"types": "./dist/i18n/index.d.cts",
"default": "./dist/i18n/index.cjs"
}
},
"./i18n/*": {
"types": "./dist/i18n/*/index.d.ts",
"import": "./dist/i18n/*/index.js",
"require": "./dist/i18n/*/index.cjs"
"import": {
"types": "./dist/i18n/*/index.d.mts",
"default": "./dist/i18n/*/index.mjs"
},
"require": {
"types": "./dist/i18n/*/index.d.cts",
"default": "./dist/i18n/*/index.cjs"
}
}
},
"typesVersions": {
"*": {
"i18n": [
"./dist/i18n/index.d.ts"
"./dist/i18n/index.d.cts"
],
"i18n/*": [
"./dist/i18n/*/index.d.ts"
"./dist/i18n/*/index.d.cts"
]
}
},
"scripts": {
"build": "tsup",
"build:watch": "tsup --watch",
"build": "tsdown",
"build:watch": "tsdown --watch",
"test": "vitest run",
"test:watch": "vitest",
"typecheck": "tsc --noEmit",
@@ -59,9 +74,9 @@
"eslint-plugin-prettier": "^5.5.5",
"prettier": "3.8.3",
"prettier-plugin-organize-imports": "^4.3.0",
"tsup": "^8.5.1",
"tsdown": "^0.22.2",
"typescript": "^6.0.2",
"typescript-eslint": "^8.58.2",
"vitest": "^3.2.4"
"vitest": "^4.1.9"
}
}
@@ -1,4 +1,4 @@
import { defineConfig } from 'tsup'
import { defineConfig } from 'tsdown'
export default defineConfig({
// Root barrel + i18n metadata barrel + one entry per locale (lazy-load chunks)
@@ -6,5 +6,8 @@ export default defineConfig({
format: ['cjs', 'esm'],
dts: true,
clean: true,
external: ['zod'],
deps: {
neverBundle: ['zod'],
},
target: false,
})