mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-19 13:21:46 +00:00
54e81b0785
* 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.
83 lines
2.1 KiB
JSON
83 lines
2.1 KiB
JSON
{
|
|
"name": "@trek/shared",
|
|
"version": "3.0.22",
|
|
"private": true,
|
|
"description": "Shared API contracts (Zod schemas) — single source of truth for TREK server and client.",
|
|
"type": "module",
|
|
"main": "./dist/index.cjs",
|
|
"module": "./dist/index.mjs",
|
|
"types": "./dist/index.d.cts",
|
|
"exports": {
|
|
".": {
|
|
"import": {
|
|
"types": "./dist/index.d.mts",
|
|
"default": "./dist/index.mjs"
|
|
},
|
|
"require": {
|
|
"types": "./dist/index.d.cts",
|
|
"default": "./dist/index.cjs"
|
|
}
|
|
},
|
|
"./i18n": {
|
|
"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/*": {
|
|
"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.cts"
|
|
],
|
|
"i18n/*": [
|
|
"./dist/i18n/*/index.d.cts"
|
|
]
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "tsdown",
|
|
"build:watch": "tsdown --watch",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"typecheck": "tsc --noEmit",
|
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
"lint": "eslint --fix \"src/**/*.ts\"",
|
|
"i18n:parity": "node scripts/i18n-parity.mjs",
|
|
"i18n:parity:strict": "node scripts/i18n-parity.mjs --strict"
|
|
},
|
|
"dependencies": {
|
|
"isomorphic-dompurify": "^3.15.0",
|
|
"zod": "^4.3.6"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
"eslint": "^10.3.0",
|
|
"eslint-config-flat-gitignore": "^2.3.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-plugin-prettier": "^5.5.5",
|
|
"prettier": "3.8.3",
|
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
"tsdown": "^0.22.2",
|
|
"typescript": "^6.0.2",
|
|
"typescript-eslint": "^8.58.2",
|
|
"vitest": "^4.1.9"
|
|
}
|
|
}
|