fix: enable demo fixture loading in dev mode#33
Merged
Conversation
…ne server entry - Replace `require()` with `fs.readFileSync` + `JSON.parse` in `getSpecWrightDir()` so package.json detection works under tsx/ESM - Add `import.meta.url` guard to web-server.ts so `tsx src/web-server.ts` actually starts the server
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The Codex CLI logo was a generic placeholder SVG. Replace it with the actual OpenAI icon from Simple Icons, since Codex CLI is an OpenAI product.
github-actions Bot
pushed a commit
that referenced
this pull request
Feb 25, 2026
## [3.6.3](v3.6.2...v3.6.3) (2026-02-25) ### Bug Fixes * enable demo fixture loading in dev mode ([#33](#33)) ([eb72ff3](eb72ff3))
|
🎉 This PR is included in version 3.6.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixed two critical issues that prevented the demo fixtures from loading when running the server with
npm run dev:server:Package detection fails under ESM:
getSpecWrightDir()usedrequire()to read package.json, which silently fails in ESM mode with tsx. This caused the server to look inspecwright/outputs/instead ofoutputs/, creating a mismatch between the file watcher and fixture location.No standalone server entry point:
web-server.tsonly exportsstartWebServer()but doesn't call it when run directly, sotsx src/web-server.tswould load the module and exit.These fixes ensure demo fixtures load correctly and enable taking website screenshots with the demo projects.
Changes
require()withfs.readFileSync+JSON.parsein constants.tsimport.meta.urlguard to auto-start server when run directly