Commit Graph

164 Commits

Author SHA1 Message Date
Sunil Pai de9b679f24 harden CI workflows: frozen-lockfile, checksum verification (#113)
- Add --frozen-lockfile to pnpm install in ci.yml, deploy-examples.yml, benchmarks.yml, preview-release.yml
- Add SHA256 checksum verification for hyperfine .deb download in benchmarks.yml
2026-02-26 12:24:27 +00:00
Steve Faulkner f1e5c31c2e Fix AI Gateway auth (use cf-aig-authorization) and show Google Chat error body (#69) 2026-02-25 13:47:39 -06:00
Steve Faulkner 4d0a008644 Add AI-generated release summary + Google Chat notification to publish workflow (#68)
* Skip deploy previews for fork PRs that lack Cloudflare secrets

Fork PRs don't have access to repository secrets (CLOUDFLARE_API_TOKEN,
CLOUDFLARE_ACCOUNT_ID), so deploy/smoke-test/comment steps always fail.
Add a fork detection condition to skip these steps gracefully. The build
steps still run, so example builds are still validated for fork PRs.

* Add AI-generated release summary + Google Chat notification to publish workflow
2026-02-25 13:09:16 -06:00
Steve Faulkner f6ba607258 fix: make chat notification non-fatal and add charset to content-type (#62) 2026-02-25 16:21:08 +00:00
Steve Faulkner 8558c2d68e ci: notify Google Chat on npm publish (#55) 2026-02-25 15:41:11 +00:00
Steve Faulkner 0866ddaa2f ci: wire up npm publishing with OIDC trusted publishing (#54)
- Add version bump input (patch/minor/major) to publish workflow
- Gate publish on full CI suite (lint, typecheck, vitest, e2e)
- Use npm OIDC trusted publishing instead of long-lived NPM_TOKEN
- Tag releases in git after publish
- Make ci.yml callable via workflow_call
- Fix repository URL format in package.json for OIDC validation
2026-02-25 09:03:57 -06:00
Steve Faulkner 61554eaf37 fix: install react-server-dom-webpack during init and deploy for App Router (#31)
* fix: install react-server-dom-webpack during init and deploy for App Router

vinext init was missing react-server-dom-webpack from its dependency list,
causing 'Could not resolve react-server-dom-webpack/server.edge' errors on
fresh create-next-app projects. Additionally, react-server-dom-webpack@19.2.4
requires react@^19.2.4, but create-next-app ships react@19.2.3 -- the version
mismatch caused npm to nest rsdw inside vinext/node_modules where Vite can't
resolve it.

Fix: add react-server-dom-webpack to getInitDeps for App Router, detect when
the installed React version is too old, and upgrade react/react-dom as regular
dependencies before installing dev deps (avoiding ERESOLVE peer-dep conflicts
and keeping react in 'dependencies' rather than 'devDependencies').

Also applies the same fix to vinext deploy for parity, and adds a CI job that
scaffolds a real create-next-app project, runs vinext init, and verifies the
dev server returns HTTP 200.

Closes #22

* refactor: use createRequire for package resolution instead of direct node_modules reads

Address review feedback (PR #18 pattern): replace fs.existsSync(node_modules/...)
with createRequire-based resolution, which handles hoisting, pnpm symlinks,
monorepos, and Yarn PnP correctly.

- deploy.ts: extract isPackageResolvable() helper using createRequire, use it
  in getMissingDeps for react-server-dom-webpack detection
- init.ts: refactor getReactUpgradeDeps() to use createRequire + findPackageVersion
  walk-up pattern instead of reading node_modules/react/package.json directly
- tests: add isPackageResolvable unit tests, use dependency injection for
  getMissingDeps rsdw test (Vitest's createRequire intercepts resolution)

* ci: add Windows to create-next-app smoke test

Run the create-next-app compatibility test on both ubuntu-latest and
windows-latest. Replace bash-specific server health check (curl, kill,
backgrounding) with a cross-platform Node script using child_process
and http. Use runner.temp instead of /tmp for portable paths.

* fix: use pathToFileURL for dynamic import() calls on Windows

On Windows, Node's ESM loader requires file:// URLs for absolute paths.
Bare paths like D:\... are rejected with ERR_UNSUPPORTED_ESM_URL_SCHEME.

Wrap all dynamic import() calls that receive absolute paths from
require.resolve() or path.join() with pathToFileURL().href:

- index.ts: RSC plugin import, RSC transforms import, PostCSS config
  loading, PostCSS plugin resolution (5 call sites)
- cli.ts: Vite module import from project root

* fix: pathToFileURL for cache-runtime codegen and test imports

Additional Windows fixes found via PR #43 review:

- index.ts: use pathToFileURL for runtimeModulePath in 'use cache'
  transform code generation (2 locations) — these embed absolute paths
  into generated import() statements via JSON.stringify
- pages-router.test.ts: wrap 9 import(serverEntryPath) calls with
  pathToFileURL so tests work on Windows
2026-02-25 08:38:54 -06:00
Steve Faulkner 388d3e6b79 ci: use --pnpm flag for pkg-pr-new publish (#36) 2026-02-24 21:44:59 -06:00
Steve Faulkner ecdebab977 ci: add pkg.pr.new preview releases for PRs (#34) 2026-02-25 02:51:33 +00:00
Steve Faulkner 01793e79d9 ci: disable scheduled tip workflow for now (#10) 2026-02-24 12:36:48 -05:00
Matt Silverlock 45224abbc7 ci: Bonk should fail faster (#4)
* Bonk should fail faster

Check for mentions earlier in the action.

* Update bigbonk.yml
2026-02-24 16:44:52 +00:00
Steve Faulkner d1180e11e9 chore: set version 0.0.1, disable auto-publish for now 2026-02-24 09:57:54 -06:00
Steve Faulkner 8c3a0e0802 ci: add npm publish workflow with OIDC trusted publishing (#422) 2026-02-24 09:48:37 -06:00
Steve Faulkner 12fea722b6 Initial public release of vinext 2026-02-24 09:29:39 -06:00