Skip to content

chore(deps): upgrade Vite 8, Tailwind CSS 4 and Electron Forge 8 - #38

Merged
dbfx merged 1 commit into
mainfrom
deps/major-upgrades
Oct 13, 2026
Merged

dbfx merged 1 commit into
mainfrom
deps/major-upgrades

Conversation

@dbfx

@dbfx dbfx commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Lands the three Dependabot major upgrades that each fail CI on their own, as one change. They interact (Forge's Vite plugin, the Vite version and the Tailwind build integration), so they are done together.

Supersedes

Those PRs are left open; close them once this merges.

What changed

Electron Forge 8

Vite 8

  • @vitejs/plugin-react ^4.3.4 → ^6.1.2 (v4 only peers Vite 4–7; this was the ERESOLVE in chore(deps-dev): bump vite from 5.4.21 to 8.3.4 #33). The config never used the removed babel option.
  • vite.*.config.ts → vite.*.config.mts (and the references in forge.config.ts) so the configs load as native ESM.

Tailwind CSS 4

  • Uses the @tailwindcss/vite plugin; postcss.config.js, autoprefixer and the direct postcss dependency are removed.
  • tailwind.config.js is replaced by @theme in src/renderer/styles/globals.css (surface colours, Inter / JetBrains Mono font stacks, pulse-slow and glow animations, class-based dark variant).
  • v3 defaults that v4 changed are pinned in globals.css: default border colour (gray-200), placeholder colour (gray-400), cursor: pointer on buttons, hover: applying unconditionally, and gradients interpolating in sRGB (bg-linear-to-*/srgb).
  • Renamed utilities in components: flex-shrink-0 → shrink-0, outline-none → outline-hidden, bg-gradient-to-* → bg-linear-to-*/srgb.

package-lock.json was regenerated with npm 10 (Node 22). Every version change in it follows from the bumps above.

One intended visual difference

The status dot in the target input (status-dot-idle, -running, …) is now coloured. On main those classes are built dynamically (status-dot-${status}), so Tailwind 3 purged them and the dot rendered transparent. Tailwind 4 does not purge plain CSS in @layer components, so the dot now shows as the stylesheet always intended.

Tailwind 4's default palette is defined in OKLCH rather than hex, so palette colours can differ by an imperceptible amount.

Verified (Linux, Node 22.23 / npm 10.9)

  • npm ci from a clean tree, npx tsc --noEmit, npm run package (the three CI steps).
  • electron-forge make for the zip maker.
  • Launched the packaged app headless: the window loads, the preload bridge (window.mtrApi) is present, and the start screen matches a main build in a side-by-side screenshot and computed-style check, apart from the status dot above.

Not verified

  • Anything on Windows beyond what CI runs here (install, type-check, package).
  • The Squirrel installer and the release.yml flow (npm run make, latest.yml generation, auto-update) under Forge 8.
  • npm start dev server / HMR.
  • Views other than the start screen (map, visual trace, loss monitor, alerts, about) were not compared visually.

🤖 Generated with Claude Code

Combines the three Dependabot major upgrades that could not pass CI
individually: PRs 30, 33 and 34.

Electron Forge 7 to 8, with @electron/fuses 2
- Forge 8 requires Node 22.13 or newer, so CI and release use Node 22.
- plugin-vite now emits main.cjs and preload.cjs; update the package
  "main" field and the preload path in the main process.
- Type-check with moduleResolution "bundler" so the ESM-only Forge
  packages resolve.

Vite 5 to 8, with @vitejs/plugin-react 6
- Rename the Vite configs to .mts so they load as native ESM.

Tailwind CSS 3 to 4
- Use @tailwindcss/vite instead of the PostCSS plugin; drop
  postcss.config.js, autoprefixer and postcss.
- Move tailwind.config.js into @theme in globals.css.
- Pin v3 defaults that v4 changed, namely border colour, placeholder
  colour, button cursor, unconditional hover and sRGB gradients.
- Rename flex-shrink-0, outline-none and bg-gradient-to-*.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant