mirror of
https://github.com/zadam/trilium.git
synced 2026-09-12 19:50:20 +05:00
Vitest 5 handed the webdriverio provider to community maintenance, and no
stable 5.x of `@vitest/browser-webdriverio` was ever published — npm `latest`
is still 4.1.11, with only a 5.0.0-rc.1 from before vitest 5.0.0 shipped.
Pairing that v4 provider with `@vitest/browser` 5 kills the suite at startup:
TypeError: Cannot read properties of undefined (reading 'project')
at createBrowserServer (@vitest/browser/dist/index.js:7900:26)
`@vitest/browser-playwright` 5.0.0 is stable and first-party, and Playwright
1.62.1 is already here for the e2e suites, so the browser toolchain costs
nothing new. Only two of the 129 specs touch provider-visible API at all, both
through the provider-agnostic `userEvent`.
Playwright drives the browser over CDP with no separate driver, so the
chromedriver half of the NixOS workaround goes away: the dev shell keeps
`pkgs.chromium` and `CHROME_BIN`, which now reaches the provider as
`launchOptions.executablePath`. CI installs the browser in a step of its own
rather than inside the test step, whose 15-minute cap exists to catch a browser
session that never starts and should not also have to cover a 190 MB download.
Two specs depended on webdriverio behaviour and are fixed rather than skipped:
- The token-cost assertion read `1.234` where it wanted `1,234`.
`toLocaleString()` takes the browser's locale, and Playwright inherits the
host's where the old Chrome defaulted to en-US. Pinning `contextOptions.locale`
keeps the suite from depending on the developer's machine.
- The format painter's drag-selection selected nothing. Playwright's
`dragAndDrop` turns on drag interception, so the press reaches the page as an
HTML5 drag intent instead of selecting text. Driving the press, move and
release over CDP restores what the test is actually for: proving a *native*
pointer interaction has updated the model selection by the time the `mouseup`
listener runs.
Vitest 5 also moved failure screenshots from `.vitest-attachments` to
`.vitest`, which needs ignoring.
Verified: 127 files / 1626 tests green, coverage 99.91/99.54/100/99.98 against
the 99.5 gate. The Nix path is unexercised — `executablePath` is ordinary
Playwright, but it was not run from a dev shell.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
103 lines
4.4 KiB
JSON
103 lines
4.4 KiB
JSON
{
|
|
"name": "@triliumnext/source",
|
|
"version": "0.105.0",
|
|
"description": "Build your personal knowledge base with Trilium Notes",
|
|
"directories": {
|
|
"doc": "docs"
|
|
},
|
|
"scripts": {
|
|
"client:test": "pnpm run --filter client test",
|
|
"client:build": "pnpm run --filter client build",
|
|
"client:coverage": "pnpm run --filter client test --coverage",
|
|
"client:stylelint": "pnpm run --filter client stylelint",
|
|
"server:test": "pnpm run --filter server test",
|
|
"server:build": "pnpm run --filter server build",
|
|
"server:coverage": "pnpm run --filter server test --coverage",
|
|
"server:start": "pnpm run --filter server dev",
|
|
"server:start-alt": "pnpm run --filter server dev-alt",
|
|
"server:start-prod": "pnpm run --filter server start-prod",
|
|
"desktop:start": "pnpm run --filter desktop dev",
|
|
"desktop:build": "pnpm run --filter desktop build",
|
|
"desktop:start-prod": "pnpm run --filter desktop start-prod",
|
|
"standalone:start": "pnpm run --filter standalone dev",
|
|
"standalone:build": "pnpm run --filter standalone build",
|
|
"standalone:test": "pnpm run --filter standalone test",
|
|
"mobile:sync": "pnpm run --filter mobile sync",
|
|
"desktop:start-prod-no-dir": "pnpm run --filter desktop start-prod-no-dir",
|
|
"edit-docs:edit-docs": "pnpm run --filter edit-docs edit-docs",
|
|
"edit-docs:build": "pnpm run --filter edit-docs build",
|
|
"website:start": "pnpm run --filter website dev",
|
|
"website:build": "pnpm run --filter website build",
|
|
"electron:build": "pnpm desktop:build",
|
|
"electron:start": "pnpm desktop:start",
|
|
"electron:start-prod": "pnpm desktop:start-prod",
|
|
"chore:ci-update-nightly-version": "tsx ./scripts/update-nightly-version.ts",
|
|
"chore:release-notes-body": "node --experimental-strip-types ./scripts/release-notes-body.mts",
|
|
"chore:update-build-info": "tsx ./scripts/update-build-info.ts",
|
|
"chore:update-flake-electron": "tsx ./scripts/update-flake-electron.ts",
|
|
"chore:update-version": "tsx ./scripts/update-version.ts",
|
|
"chore:wipe-node-modules": "node --experimental-strip-types ./scripts/wipe-node-modules.mts",
|
|
"docs:build": "pnpm run --filter build-docs start",
|
|
"docs:preview": "pnpm http-server site -p 9000",
|
|
"edit-docs:edit-demo": "pnpm run --filter edit-docs edit-demo",
|
|
"scripts:test": "vitest run --project scripts",
|
|
"test:all": "pnpm test:parallel && pnpm test:sequential && pnpm scripts:test",
|
|
"test:parallel": "pnpm --filter=!server --filter=!ckeditor5 --parallel test",
|
|
"test:sequential": "pnpm --filter=server --filter=ckeditor5 --sequential test",
|
|
"typecheck": "tsx scripts/filter-tsc-output.mts",
|
|
"dev:format-check": "eslint -c eslint.format.config.mjs .",
|
|
"dev:format-fix": "eslint -c eslint.format.config.mjs . --fix",
|
|
"dev:linter-check": "cross-env NODE_OPTIONS=--max_old_space_size=4096 eslint .",
|
|
"dev:linter-fix": "cross-env NODE_OPTIONS=--max_old_space_size=4096 eslint . --fix",
|
|
"postinstall": "pnpm prepare",
|
|
"prepare": "pnpm run --filter pdfjs-viewer --filter share-theme build && pnpm run --filter web-clipper postinstall",
|
|
"update-contributors": "tsx ./scripts/update-contributors.ts"
|
|
},
|
|
"private": true,
|
|
"devDependencies": {
|
|
"@fast-csv/parse": "5.0.7",
|
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
"@playwright/test": "1.62.1",
|
|
"@triliumnext/server": "workspace:*",
|
|
"@types/express": "5.0.6",
|
|
"@types/node": "24.13.3",
|
|
"@typescript/native": "npm:typescript@7.0.2",
|
|
"@vitest/browser-playwright": "5.0.0",
|
|
"@vitest/coverage-v8": "5.0.0",
|
|
"@vitest/ui": "5.0.0",
|
|
"cross-env": "10.1.0",
|
|
"dpdm": "4.3.0",
|
|
"esbuild": "0.28.2",
|
|
"eslint": "10.9.1",
|
|
"eslint-config-preact": "2.0.0",
|
|
"eslint-plugin-playwright": "2.11.0",
|
|
"eslint-plugin-simple-import-sort": "14.0.0",
|
|
"happy-dom": "20.14.0",
|
|
"http-server": "14.1.1",
|
|
"jiti": "2.7.0",
|
|
"js-yaml": "5.4.1",
|
|
"playwright": "1.62.1",
|
|
"tslib": "2.8.1",
|
|
"tsx": "4.23.13",
|
|
"typescript": "6.0.3",
|
|
"typescript-eslint": "8.69.0",
|
|
"vite": "8.2.2",
|
|
"vitest": "5.0.0"
|
|
},
|
|
"license": "AGPL-3.0-only",
|
|
"author": {
|
|
"name": "Trilium Notes Team",
|
|
"email": "contact@eliandoran.me",
|
|
"url": "https://triliumnotes.org"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/TriliumNext/Trilium.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/TriliumNext/Trilium/issues"
|
|
},
|
|
"homepage": "https://triliumnotes.org",
|
|
"packageManager": "pnpm@12.3.1"
|
|
}
|