Files
poli0981andClaude Opus 5.5 0f600a99aa build(web): migrate to SvelteKit 3 and adapter-static 4
@sveltejs/kit 2.70.3 -> 3.1.0, @sveltejs/adapter-static 3.0.10 -> 4.0.0.
Closes GHSA-27mw-82g8-phjj and GHSA-pfhg-q3qv-9q6r (dismissed in v4.4.1
as not applicable), and drops the cookie override kit 2 needed: npm audit
reports nothing.

- Config: svelte.config.js is refused by kit 3. Its options are now
  sveltekitConfig(tauri) in build/sveltekit-config.ts, passed by
  vite.config.ts as sveltekit(sveltekitConfig(IS_TAURI)), with tests for
  both CSP flavours, paths.relative, the sitemap entry and the prerender
  404 handler. The unused, now-deprecated "@" alias and typescript.config
  hook are gone; tsconfig.json extends $app/tsconfig and owns `include`.
- $lib -> #lib (package.json imports), with .js on module imports.
  tsconfig repeats the mapping in `paths`: svelte-check --tsgo only maps
  .svelte imports through `paths`, and without it every #lib component
  fell back to the *.svelte shim (props unchecked; proven with a planted
  error).
- Param matchers: src/params/legaldoc.ts -> src/params.ts (defineParams).
  vite build imports that file with Node's own import(), so it imports
  #lib/legal.ts and legal.ts imports ./schema.ts by their real names.
- PWA: @vite-pwa/sveltekit never supported kit 3 and wrote the worker when
  the SERVER build closed, which kit 3's environment build does first.
  build/pwa.ts wires vite-plugin-pwa in a buildApp hook after kit's
  prerender and before its adapter, with the same globs and URL mapping.
- goto options renamed (replace, reset: false, refreshAll); the /games
  filter write is a shallow goto; a legacy /#/ path that matches no route
  falls back to location.replace (kit 3's goto rejects it). Hook types
  from @sveltejs/kit/hooks; the client handleError returns nothing to keep
  kit's message.
- runed 0.35 (bits-ui) peers kit ^2: overridden to our kit, as for
  echarts-wordcloud.

Verified against a kit 2 build of the same commit: same 11,037 files bar
hashed chunks, same non-immutable precache URLs, navigateFallback "/",
identical CSP per page (hashes masked), manifest and sitemap byte-equal,
same visible text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:35:49 +07:00

111 lines
4.7 KiB
YAML

# NOTE: committing this file REPLACES the Dependabot configuration currently
# set through repo settings.
#
# web/worker/ and web/admin/ need no entry of their own: they are built from
# web/package.json, which the /web entry below covers.
version: 2
updates:
# ── Frontend ──────────────────────────────────────────────────────────────
- package-ecosystem: npm
directory: /web
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 10
groups:
# Collapses the long tail of transitive advisories (brace-expansion,
# fast-uri, nanoid, postcss, browserslist, …) into ONE PR instead of
# one per package, which is what produced the current alert backlog.
npm-security:
applies-to: security-updates
patterns: ['*']
npm-minor-patch:
applies-to: version-updates
update-types: [minor, patch]
radix:
applies-to: version-updates
patterns: ['@radix-ui/*']
tanstack:
applies-to: version-updates
patterns: ['@tanstack/*']
tauri-js:
applies-to: version-updates
patterns: ['@tauri-apps/*']
ignore:
# Framework majors are migrations with their own staged PRs, not
# something to take as an unattended bump (SvelteKit 3 moved its config,
# its $lib alias, its param matchers and the PWA wiring; see CLAUDE.md).
- dependency-name: '@sveltejs/kit'
update-types: [version-update:semver-major]
- dependency-name: '@sveltejs/adapter-static'
update-types: [version-update:semver-major]
- dependency-name: svelte
update-types: [version-update:semver-major]
- dependency-name: tailwindcss
update-types: [version-update:semver-major]
# `typescript` must stay 6: svelte-check and `svelte-kit sync` need the
# JavaScript API that TypeScript 7 does not have. TypeScript 7 is the
# `@typescript/native` alias (npm:typescript@~7.0.x), bumped by hand with
# it - Dependabot mishandles `npm:` aliases (dependabot-core #16488).
# See CLAUDE.md, docs/plan/16-toolchain-2026.md and, for the day 7.1
# lets TypeScript 6 go, docs/plan/17-typescript-7.1.md.
- dependency-name: typescript
update-types: [version-update:semver-major]
- dependency-name: '@typescript/native'
# The type definitions follow the Node the build runs on (web/.node-version,
# which every setup-node repeats), not the newest Node.
- dependency-name: '@types/node'
update-types: [version-update:semver-major]
# ── Desktop / Android shell ───────────────────────────────────────────────
- package-ecosystem: cargo
directory: /web/src-tauri
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 5
groups:
cargo-security:
applies-to: security-updates
patterns: ['*']
cargo-minor-patch:
applies-to: version-updates
update-types: [minor, patch]
# ── Python pipeline ───────────────────────────────────────────────────────
# requirements.txt and requirements-test.txt pin every package, transitive
# ones included, with the sha256 of each file; an update must bring the new
# hashes too, and CI installs with --require-hashes, so a PR whose hashes
# are wrong fails python-tests instead of reaching a data job.
- package-ecosystem: pip
directory: /
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 5
groups:
pip-all:
patterns: ['*']
# ── GitHub Actions ────────────────────────────────────────────────────────
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 5
groups:
actions-all:
patterns: ['*']
ignore:
# Majors of these two are taken by hand, for every workflow at once: the
# data jobs that check out, commit and push run only on a schedule, so a
# pull request's CI never exercises them. Keep ONE major across all
# workflows - the Node 20 ones (checkout v4, setup-python v5) printed a
# deprecation warning on every run until 2026-10-26.
- dependency-name: actions/checkout
update-types: [version-update:semver-major]
- dependency-name: actions/setup-python
update-types: [version-update:semver-major]