codeflash-internal/.github/workflows/vscode-extension-build.yml
Kevin Turcios 60ba2d44ac
fix: upgrade Next.js to 16.2.3 and fix theme/roadmap issues (#2591)
## Summary
- Upgrade Next.js from 16.1.6 to 16.2.3
- Add `suppressHydrationWarning` to `<html>` tag to fix `next-themes`
hydration mismatch
- Remove unnecessary `isClient` guard in `ThemeProvider` that caused
script tag warning
- Redirect unauthenticated `/roadmap` visitors to `/login` instead of
`/`

## Test plan
- [ ] Verify `/roadmap` redirects to `/login` when not logged in
- [ ] Verify `/roadmap` loads correctly when logged in as team member
- [ ] Verify no hydration warnings in browser console
- [ ] Verify dark/light theme switching still works
2026-04-10 03:51:28 -05:00

66 lines
1.8 KiB
YAML

name: Build VSCode Extension
on:
pull_request:
paths:
- 'js/VSC-Extension/**'
workflow_dispatch:
jobs:
check-min-version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Extract MIN_CODEFLASH_VERSION from constants file
id: extract-version
run: |
FILE="js/VSC-Extension/src/constants/cf_min_version.ts"
VERSION=$(grep -oP 'MIN_CODEFLASH_VERSION\s*=\s*"\K[^"]+' $FILE)
if [ -z "$VERSION" ]; then
echo "❌ Could not find MIN_CODEFLASH_VERSION in $FILE"
exit 1
fi
echo "✅ Found MIN_CODEFLASH_VERSION=$VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Check version exists on PyPI
run: |
# Check if this version exists on PyPI
VERSION="${{ steps.extract-version.outputs.version }}"
if pip index versions codeflash | grep -q "Available versions: .*$VERSION"; then
echo "✅ Version $VERSION exists on PyPI."
else
echo "❌ Version $VERSION not found on PyPI"
exit 1
fi
build:
runs-on: ubuntu-latest
needs: check-min-version
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Use Node.js v20
uses: actions/setup-node@v6
with:
node-version: 20
cache: "npm"
cache-dependency-path: js/VSC-Extension/package-lock.json
- name: Install dependencies
working-directory: js/VSC-Extension
run: npm ci
- name: Package VSCode Extension
working-directory: js/VSC-Extension
run: npm run vsce
- name: Upload VSIX artifact
uses: actions/upload-artifact@v7
with:
name: vscode-extension
path: js/VSC-Extension/*.vsix