Files
KomediruzeckiGitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
36b1a84276 build(deps): bring root dev tooling current (#480)
* build(deps-dev): bump the dev-tooling group with 15 updates

Bumps the dev-tooling group with 15 updates:

| Package | From | To |
| --- | --- | --- |
| [prettier](https://github.com/prettier/prettier) | `3.8.3` | `3.9.6` |
| [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) | `4.1.9` | `4.1.11` |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.61.1` | `1.62.1` |
| [@squoosh/lib](https://github.com/GoogleChromeLabs/squoosh) | `0.3.1` | `0.5.3` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.58.2` | `8.67.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.58.2` | `8.67.0` |
| [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) | `4.1.9` | `4.1.11` |
| [eslint-plugin-import-x](https://github.com/un-ts/eslint-plugin-import-x) | `4.16.2` | `4.17.1` |
| [eslint-plugin-solid](https://github.com/solidjs-community/eslint-plugin-solid) | `0.14.5` | `0.16.0` |
| [eslint-plugin-sonarjs](https://github.com/SonarSource/SonarJS) | `4.1.0` | `4.2.0` |
| [playwright](https://github.com/microsoft/playwright) | `1.61.1` | `1.62.1` |
| [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.58.2` | `8.67.0` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `8.1.0` | `8.2.2` |
| [vite-bundle-analyzer](https://github.com/nonzzz/vite-bundle-analyzer) | `1.3.8` | `1.3.9` |
| [vite-plugin-solid](https://github.com/solidjs/vite-plugin-solid) | `2.11.12` | `2.11.14` |


Updates `prettier` from 3.8.3 to 3.9.6
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.8.3...3.9.6)

Updates `vitest` from 4.1.9 to 4.1.11
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.11/packages/vitest)

Updates `@playwright/test` from 1.61.1 to 1.62.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.61.1...v1.62.1)

Updates `@squoosh/lib` from 0.3.1 to 0.5.3
- [Commits](https://github.com/GoogleChromeLabs/squoosh/commits)

Updates `@typescript-eslint/eslint-plugin` from 8.58.2 to 8.67.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.67.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.58.2 to 8.67.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.67.0/packages/parser)

Updates `@vitest/coverage-v8` from 4.1.9 to 4.1.11
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.11/packages/coverage-v8)

Updates `eslint-plugin-import-x` from 4.16.2 to 4.17.1
- [Release notes](https://github.com/un-ts/eslint-plugin-import-x/releases)
- [Changelog](https://github.com/un-ts/eslint-plugin-import-x/blob/master/CHANGELOG.md)
- [Commits](https://github.com/un-ts/eslint-plugin-import-x/compare/v4.16.2...v4.17.1)

Updates `eslint-plugin-solid` from 0.14.5 to 0.16.0
- [Release notes](https://github.com/solidjs-community/eslint-plugin-solid/releases)
- [Commits](https://github.com/solidjs-community/eslint-plugin-solid/compare/v0.14.5...v0.16.0)

Updates `eslint-plugin-sonarjs` from 4.1.0 to 4.2.0
- [Release notes](https://github.com/SonarSource/SonarJS/releases)
- [Changelog](https://github.com/SonarSource/SonarJS/blob/master/docs/RELEASE.md)
- [Commits](https://github.com/SonarSource/SonarJS/commits)

Updates `playwright` from 1.61.1 to 1.62.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.61.1...v1.62.1)

Updates `typescript-eslint` from 8.58.2 to 8.67.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.67.0/packages/typescript-eslint)

Updates `vite` from 8.1.0 to 8.2.2
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v8.2.2/packages/vite)

Updates `vite-bundle-analyzer` from 1.3.8 to 1.3.9
- [Release notes](https://github.com/nonzzz/vite-bundle-analyzer/releases)
- [Changelog](https://github.com/nonzzz/vite-bundle-analyzer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nonzzz/vite-bundle-analyzer/compare/v1.3.8...v1.3.9)

Updates `vite-plugin-solid` from 2.11.12 to 2.11.14
- [Release notes](https://github.com/solidjs/vite-plugin-solid/releases)
- [Changelog](https://github.com/solidjs/solid-vite-plugin/blob/main/CHANGELOG.md)
- [Commits](https://github.com/solidjs/vite-plugin-solid/compare/vite-plugin-solid@2.11.12...vite-plugin-solid@2.11.14)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.9.6
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-tooling
- dependency-name: vitest
  dependency-version: 4.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-tooling
- dependency-name: "@playwright/test"
  dependency-version: 1.62.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-tooling
- dependency-name: "@squoosh/lib"
  dependency-version: 0.5.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-tooling
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.67.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-tooling
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.67.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-tooling
- dependency-name: "@vitest/coverage-v8"
  dependency-version: 4.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-tooling
- dependency-name: eslint-plugin-import-x
  dependency-version: 4.17.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-tooling
- dependency-name: eslint-plugin-solid
  dependency-version: 0.16.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-tooling
- dependency-name: eslint-plugin-sonarjs
  dependency-version: 4.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-tooling
- dependency-name: playwright
  dependency-version: 1.62.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-tooling
- dependency-name: typescript-eslint
  dependency-version: 8.67.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-tooling
- dependency-name: vite
  dependency-version: 8.2.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-tooling
- dependency-name: vite-bundle-analyzer
  dependency-version: 1.3.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-tooling
- dependency-name: vite-plugin-solid
  dependency-version: 2.11.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-tooling
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump @fontsource/fraunces from 5.2.9 to 5.3.0

Bumps [@fontsource/fraunces](https://github.com/fontsource/font-files/tree/HEAD/fonts/google/fraunces) from 5.2.9 to 5.3.0.
- [Changelog](https://github.com/fontsource/font-files/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fontsource/font-files/commits/HEAD/fonts/google/fraunces)

---
updated-dependencies:
- dependency-name: "@fontsource/fraunces"
  dependency-version: 5.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump eslint-plugin-simple-import-sort

Bumps [eslint-plugin-simple-import-sort](https://github.com/lydell/eslint-plugin-simple-import-sort) from 12.1.1 to 14.0.0.
- [Changelog](https://github.com/lydell/eslint-plugin-simple-import-sort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lydell/eslint-plugin-simple-import-sort/compare/v12.1.1...v14.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-simple-import-sort
  dependency-version: 14.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bring root dev tooling current, and fix what the new linters caught

Lands #472, #475 and #476 as one branch. They were raised separately and the last two
conflicted with whichever merged first on pnpm-lock.yaml, so the lockfile resolves once here.

playwright 1.59.1 -> 1.62.1, typescript-eslint 8.58.2 -> 8.67.0, vite 8.0.9 -> 8.2.2,
vitest -> 4.1.11, prettier 3.8.3 -> 3.9.6, eslint-plugin-solid 0.14.5 -> 0.16.0,
eslint-plugin-sonarjs 4.1.0 -> 4.2.0, eslint-plugin-simple-import-sort 12.1.1 -> 14.0.0,
@squoosh/lib 0.3.1 -> 0.5.3, @fontsource/fraunces 5.2.9 -> 5.3.0.

Two new linter versions found real things, fixed rather than suppressed:

simple-import-sort 14 changed its ordering and Dashboard.tsx violated it. Autofixed.

sonarjs 4.2.0 added no-fixed-wait-in-tests, which caught page.waitForTimeout(1200) in
pwa-shots.spec.ts — a guess at how long Chart.js needs for its first draw. Replaced with
the condition that guess stood in for: the init script wraps requestAnimationFrame to
record when a frame callback last ran, and the shot waits for 400ms of no frames. Faster
when charts settle early, correct when they take longer than the guess allowed, and
tolerated rather than awaited so a permanently animating view degrades to an early
screenshot instead of failing the run.

Also switches vitest.config.ts to import.meta.dirname, which Vite 8.2 warns about, and
folds in the seven files prettier 3.9.6 reformats — this is the commit that introduces
that prettier, so the alternative is the next person getting the churn in their diff.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-26 00:13:49 +02:00

53 lines
2.3 KiB
TypeScript

import { resolve } from 'path'
import { defineConfig } from 'vitest/config'
import solid from 'vite-plugin-solid'
export default defineConfig({
// Solid JSX transform so tests can import .tsx modules (components, brand icons).
plugins: [solid()],
// Build-identity constants (vite.config.ts `define`) for modules that read them
// (core/appVersion). Values are stable fakes so decision logic is deterministic.
define: {
__APP_VERSION__: JSON.stringify('0.0.0-test'),
__GIT_SHA__: JSON.stringify('testsha'),
},
resolve: {
alias: {
'@': resolve(import.meta.dirname, 'src'),
'@/core': resolve(import.meta.dirname, 'src/core'),
'@/features': resolve(import.meta.dirname, 'src/features'),
'@/components': resolve(import.meta.dirname, 'src/components'),
'@/stores': resolve(import.meta.dirname, 'src/stores'),
'@/types': resolve(import.meta.dirname, 'src/types'),
'@/lib': resolve(import.meta.dirname, 'src/lib'),
// packages/pwa-kit is app-agnostic source, deliberately outside the pnpm workspace so it
// costs the lockfile nothing until it is extracted. Aliased rather than installed.
'@pwa-kit': resolve(import.meta.dirname, '../packages/pwa-kit/src/index.ts'),
},
},
// Mirror vite.config.ts. Without it a kebab-case class reached through its camelCase name —
// `styles.createCard` for `.create-card`, which is how this codebase writes them — resolves to
// `undefined` under test, so every rendered component carries `class="… undefined"` and no test
// can assert on a class at all.
css: {
modules: {
localsConvention: 'camelCase',
},
},
test: {
environment: 'jsdom',
// Process CSS so `?raw` imports of stylesheets return their source. Under the default
// (css: false) vitest short-circuits every CSS import to empty content, which makes a
// `?raw` import silently resolve to '' and any test asserting on stylesheet source pass
// vacuously (vitest#10788). cssModuleHygiene.test.ts depends on this.
css: true,
globals: true,
include: [
'src/**/__tests__/**/*.test.{ts,tsx}',
// The kit ships its own tests; they run here so CI covers them with no extra job.
'../packages/pwa-kit/test/**/*.test.ts',
],
setupFiles: ['./src/test-setup.ts'],
},
})