GitNexus/.github/actions/setup-gitnexus-web/action.yml
Gergő Magyar 3ed8e08bc4
chore(web): bump vite 6.4.2 -> 7.3.2 (iter 2 of 3) (#1062)
Step 2 of the iterative vite 5 -> 8 migration. Tightens engines.node
to satisfy vite 7's require(esm) floor; no vite.config.ts edits.

Changes:
- vite ^6.4.2 -> ^7.3.2
- @vitejs/plugin-react ^5.1.0 -> ^5.1.4 (npm picked 5.2.0 within ^5.1.4,
  which already lists vite ^8 as a peer -> iter 3 won't need to re-bump)
- gitnexus-web engines.node: >=20.0.0 -> ^20.19.0 || >=22.12.0 (vite 7
  requirement; gitnexus CLI engines untouched since CLI doesn't use vite)
- .github/actions/setup-gitnexus-web: pin node-version to '20.19.0' so we
  don't depend on the floating "20" alias resolving to a high enough patch.
  CLI-side actions stay on '20'.

Why no other config changes: vite 7's removed surfaces (sass legacy API,
splitVendorChunkPlugin, transformIndexHtml.transform, optimizeDeps.entries
glob semantics, CORS middleware order) are not used here. The five
resolve.alias entries (@, @shared, gitnexus-shared, anthropic deep import,
mermaid ESM) keep working - alias plugin precedence is unchanged.

Verified locally (Node v22.14.0, well above the new floor):
- npm install: clean, no peer warnings
- npx tsc -b --noEmit: clean
- npm test: 220/220 pass
- npm run build: clean (11.41s, dist tree shape identical, hashes
  shifted as expected because vite 7 changed default build.target from
  'modules' to 'baseline-widely-available' - bundle is 1-4% smaller)

Iter 3 (vite 8) will follow once this bakes on main.

Made-with: Cursor
2026-04-24 13:51:12 +01:00

24 lines
828 B
YAML

name: Setup GitNexus Web
description: Setup Node.js 20.19+ (vite 7 floor), build gitnexus-shared, install web dependencies
runs:
using: composite
steps:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
# Vite 7 requires Node ^20.19.0 || >=22.12.0 (require(esm) support).
# Pin explicitly so we don't depend on the floating "20" alias resolving
# to a high enough patch version on every runner image.
node-version: '20.19.0'
cache: npm
cache-dependency-path: gitnexus-web/package-lock.json
- name: Build gitnexus-shared
run: npm install && npm run build
shell: bash
working-directory: gitnexus-shared
- name: Install web dependencies
run: npm ci
shell: bash
working-directory: gitnexus-web