Repository navigation
feat(docs): build and save a virtual filesystem in the browser - #338
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes for Bun's isolated workspace dependency resolution across demo tests, the TypeScript workbench, and repository builds.
- Workbench types: Resolve
undici-typesrelative to the installed@types/nodepackage. - Demo tests: Import Alchemy's crypto layer through its declared dependency and share the root
@effect/vitestinstallation with virtual-build. - Build dependencies: Declare virtual-build's Node types, the docs' shared TypeScript configuration, and the root
tsxexecutable, with corresponding lockfile updates.
Validation passed: bun install --frozen-lockfile, bun run build (including documentation example checks), bun run test -- --project virtual-build --project demo-alchemy (19 tests), and the workbench's native test suite under Node 26.11.1 (7 tests).
gpt-6.1-sol | 𝕏
47504b7 to
fb59938
Compare
|
Deployment failed for project effect-vfs-docs with the following error: Learn More: https://vercel.com/lloydrichards-projects?upgradeToPro=build-rate-limit |

Goal/Scope
Let readers edit, build, and save a virtual filesystem directly in the static docs. Keep the native Node workbench available as a local example.
Description
The playground bundles JavaScript modules from an in-memory Effect VFS using the browser build of esbuild. Readers can browse the file tree, edit modules, and build with either an Editor or Reader caller. Both use the same volume. The Reader can build but lacks write access to the example files. Saving captures the volume as a snapshot, writes it to a SQLite BLOB, and stores the database bytes in IndexedDB. Readers can query the saved row and reopen the checkpoint after a reload. The page diagrams the two callers and the path from memory through SQLite to IndexedDB. Both WebAssembly engines load from the docs site on demand.
The local Node workbench resolves its Node declarations without
NODE_PATH. The dependency fixes also let Alchemy, virtual-build, and the documentation build resolve their test and build tools under Bun’s isolated layout.Comment
The playground keeps one saved checkpoint per site and browser profile. Reloading starts a fresh working copy. Reopen saved restores the last explicit save.