Skip to content

Migrate MyApp.Client to the Vite+ (VoidZero) toolchain - #1

Merged
mythz merged 6 commits into
mainfrom
voidzero
Oct 31, 2026
Merged

mythz merged 6 commits into
mainfrom
voidzero

Conversation

@mythz

@mythz mythz commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Moves MyApp.Client tooling to Vite+ (vite-plus 1.4.0). Next.js still builds the app (next dev / next build unchanged), and Vite+ provides tests, lint, format and type checking from one vite.config.ts.

Changes

  • Toolchain: vite-plus pinned with npm overrides (vite → @voidzero-dev/vite-plus-core). vitest.config.ts is merged into vite.config.ts, and tests import from vite-plus/test.
  • Scripts: check, lint, fmt, typecheck (vp check --no-fmt --no-lint), test, test:run, test:ui, plus outdated and upgrade. upgrade runs npm-check-updates with the Vite+ pins excluded.
  • Lint: Oxlint with eslint:recommended and typescript-eslint recommended equivalents, plus React hooks and Next.js rules. The template had no ESLint before, so I fixed what it found: unused imports and variables, extends {}, and ValidateAuth hook naming/order. The useMetadata and appAuth() warnings are suppressed per line.
  • Removed: postinstall.mjs (empty databases are now migrated on app startup), autoprefixer, and baseUrl from tsconfig.json.
  • Upgrades: TypeScript 7, @vitejs/plugin-react 6, Next.js 16.4 and lucide-react 1.x.
  • Tests: seed tests for gateway and the HelloApi component.
  • CI: a new client job in build.yml runs vp check, vp test run and npm run build. build-container.yml uses voidzero-dev/setup-vp.
  • Docs and editor: AGENTS.md and README.md updated. They now say dtos.ts is regenerated on .NET startup. Added MyApp.Client/AGENTS.md (Vite+ guidance, plus the block next dev maintains) and MyApp.code-workspace for the Oxc VS Code extension.
  • Formatting: the Oxfmt reformat is its own commit (7f5b8fa) and is listed in .git-blame-ignore-revs.

Verification

  • npm run check: 0 errors (16 warnings, kept non-blocking)
  • npm run test:run: 8 passed
  • npm run build: static export to dist/. Next's own type check works with TypeScript 7 and catches a deliberately planted type error.
  • vp check passes on a fresh tree with no dist/ or .next/
  • dotnet run with an empty App_Data: "Empty database detected" bootstrap ran, /api/Hello responded, and the home page loaded through the Next dev proxy

Please merge with a merge commit, not squash or rebase, so the formatting commit SHA in .git-blame-ignore-revs stays valid.

🤖 Generated with Claude Code

mythz and others added 6 commits November 1, 2026 00:37
Next.js keeps building the app (next dev/build/start unchanged). Vite+
(vite-plus 1.4.0) takes over the rest of the tooling: Vitest 5, Oxlint
(type-aware, via tsgolint) and Oxfmt, configured in one vite.config.ts.
npm scripts stay the entry points, so no global `vp` install is required.

- vite-plus pinned with npm overrides for vite -> @voidzero-dev/vite-plus-core
- vitest.config.ts merged into vite.config.ts; tests import from vite-plus/test
- new check/lint/fmt scripts; typecheck now runs `vp check --no-fmt --no-lint`
- lint: eslint:recommended + typescript-eslint recommended equivalents, plus
  react hooks and nextjs rules (the template had no ESLint before)
- fix lint findings: unused imports/vars, `extends {}`, ValidateAuth hook
  naming/order in lib/auth.tsx; suppress useMetadata and appAuth() false
  positives without changing the shared appAuth() API
- remove postinstall.mjs (empty DBs are migrated on app startup), autoprefixer
- drop tsconfig baseUrl (removed in TypeScript Go)
- add seed tests (gateway, HelloApi component)
- upgrade deps, incl. TypeScript 7, @vitejs/plugin-react 6, Next.js 16.4

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Formatting-only change, no code changes, so it can be ignored in git blame
via .git-blame-ignore-revs. Uses the fmt settings in vite.config.ts from the
previous Vite+ migration commit (4-space indent, no semicolons, single quotes,
160 char print width).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- build.yml: new client job (vp check, vp test run, npm run build)
- build-container.yml: voidzero-dev/setup-vp replaces setup-node + npm install
- AGENTS.md / README.md: Vite+ commands; dtos.ts is regenerated on .NET
  startup, so `npm run dtos` is typically never needed
- MyApp.code-workspace: adds MyApp.Client as its own root so the Oxc
  extension resolves the local vite-plus; TypeScript 7 language server
- .git-blame-ignore-revs: ignore the Oxfmt formatting commit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated by vp migrate (VITE PLUS START/END markers), followed by the
block next dev maintains (BEGIN/END nextjs-agent-rules).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mythz
mythz merged commit 1866a80 into main Oct 31, 2026
4 checks passed
@mythz
mythz deleted the voidzero branch October 31, 2026 17:06
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