mirror of
https://github.com/cloudflare/vinext.git
synced 2026-09-14 19:04:59 +08:00
735a443169
* chore: upgrade vitest to 4.1 * fix: clear console.warn spy state before asserting call counts Vitest 4 changed vi.spyOn to return the same mock when called on an already-intercepted function. This means console.warn call records from earlier tests accumulate in the spy, causing toHaveBeenCalledTimes(2) to see 4 calls instead of 2. Adding mockClear() after each spy creation resets the call count so the assertions only reflect calls made within the test itself.
59 lines
1.4 KiB
JSON
59 lines
1.4 KiB
JSON
{
|
|
"name": "vinext-monorepo",
|
|
"private": true,
|
|
"scripts": {
|
|
"build": "pnpm --filter vinext run build",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"generate:google-fonts": "node scripts/generate-google-fonts.js",
|
|
"typecheck": "tsgo --noEmit",
|
|
"fmt": "oxfmt",
|
|
"fmt:check": "oxfmt --check",
|
|
"lint": "oxlint --deny-warnings",
|
|
"test:e2e": "playwright test"
|
|
},
|
|
"dependencies": {
|
|
"@mdx-js/react": "^3.1.1",
|
|
"@mdx-js/rollup": "^3.1.1",
|
|
"@unpic/react": "^1.0.2"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.58.2",
|
|
"@types/node": "^25.2.3",
|
|
"@types/react": "^19.2.14",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@typescript/native-preview": "^7.0.0-dev.20260213.1",
|
|
"@vitejs/plugin-rsc": "^0.5.19",
|
|
"image-size": "2.0.2",
|
|
"next": "^16.1.6",
|
|
"oxfmt": "^0.36.0",
|
|
"oxlint": "^1.47.0",
|
|
"playwright": "^1.52.0",
|
|
"react": "^19.2.4",
|
|
"react-dom": "^19.2.4",
|
|
"typescript": "^5.7.0",
|
|
"vite": "^7.3.1",
|
|
"vitest": "^4.1.0"
|
|
},
|
|
"packageManager": "pnpm@10.30.0",
|
|
"pnpm": {
|
|
"overrides": {
|
|
"rollup": "^4.59.0"
|
|
},
|
|
"peerDependencyRules": {
|
|
"ignoreMissing": [
|
|
"next",
|
|
"webpack"
|
|
]
|
|
},
|
|
"onlyBuiltDependencies": [
|
|
"better-sqlite3",
|
|
"esbuild",
|
|
"sharp",
|
|
"workerd",
|
|
"@parcel/watcher",
|
|
"@swc/core"
|
|
]
|
|
}
|
|
}
|