Repository navigation
Keep consumer packages small and publish independent runtime releases to R2 - #1200
Merged
Merged
Conversation
The Markdown npm package and the VS Code extension shipped every large element runtime and grew too big to publish. Markdown 0.85.0 never reached npm. - Markdown's npm package leaves out the Pyodide, GeoGebra, Typst, Blockflow and Excalidraw runtimes and keeps their integration files. Blockflow's default CDN is now blockflow.openpatch.org and Excalidraw's is its own packages on UNPKG, so every `cdn: true` default still resolves. OpenSCAD, Online IDE and SQL IDE stay, because their default CDN is this package on UNPKG. A test packs a fixture with npm and enforces this split. - The VS Code extension leaves all eight runtimes out through .vscodeignore. The preview detects a missing runtime and loads it from the element's default CDN, unless the book sets its own CDN URL. A test lists the package with vsce. - @hyperbook/types exports elementRuntimeFiles, now shared by the CLI's asset manager and the VS Code preview. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsgtLGX2AgDYCZnqCYUHhz
The VS Code preview now resolves element runtimes like a Hyperbook build instead of always falling back to a CDN. - Elements with a `cdn` setting load from that CDN, as in a build. - Other elements use their runtime from the Hyperbook CLI's asset cache. The extension ships the CLI's asset manifest and shares the CLI's content-addressed, SHA-256 verified bundles, so a runtime fetched by either one works for both. - Runtimes that are not downloaded yet load from their default CDN, and the preview offers to download the ones the page uses. - New commands "Download Element Runtimes..." and "Download All Element Runtimes" mirror `hyperbook assets fetch` and `--all`. The asset manager moves from the CLI into @hyperbook/fs so both can use it. The CLI keeps a thin wrapper with its default paths. The shared build script now treats Node built-ins as external, which leaves the other packages' bundles unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsgtLGX2AgDYCZnqCYUHhz
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Large element runtimes are excluded from the CLI, Markdown package and VS Code extension. The extension uses the configured CDN or the CLI's shared, verified asset cache, and provides commands to download runtimes for offline previews.
PyIDE now uses Pyodide's pinned jsDelivr CDN by default because the complete local distribution is very large. CLI prefetching and builds skip its runtime when
cdnis omitted. Explicitelements.pyide.cdn: falseretains local and offline builds, and VS Code follows the same default even when a local runtime is cached. English and German element/configuration docs explain the default and offline setup. New hosting guides cover the shared runtime cache, GitHub Actions cache reuse, HTML revalidation and immutable caching only for versioned asset URLs.Online IDE, SQL IDE and OpenSCAD defaults now point to immutable releases on
cdn.openpatch.org, independently of the Markdown npm package. The IDE source repositories publish their own verified GitHub release archives to R2 (Online IDE PR, SQL IDE PR); Hyperbook publishes OpenSCAD directly from pinned upstream WASM, fonts and libraries. New CDN releases preserve all older files and are checked through the public hostname. Hyperbook's package release workflow verifies every pinned CDN file against its local runtime payload before publishing.Wrangler uses organization secret
CLOUDFLARE_R2_CDNand variable or secretCLOUDFLARE_ACCOUNT_ID. Cloudflare API operations require Account → Workers R2 Storage → Edit (R2 Admin Read & Write). Full setup and retry commands are indocs/cdn-releases.md.Validation: all 874 Hyperbook tests and 8 publisher tests pass; CLI, Markdown and VS Code builds and type checks succeed; actionlint passes. Actual npm tarballs and VSIX were checked for excluded runtimes and isolated consumer startup. Both documentation translations build offline; the new hosting links, anchors and workflow examples render correctly.
The initial R2 uploads succeeded for Online IDE
v2.2.1-hyperbook.28, SQL IDEv2.0.0-hyperbook.4and OpenSCAD2026.10.08-1. All 532 runtime files pass live public CDN checks for SHA-256, MIME type, CORS and immutable caching against Hyperbook's local payloads. Chromium loaded the actual CDNs, executed Java and SQL, and rendered an OpenSCAD cube with no browser errors. A separate generated book with no PyIDE configuration loaded the actual jsDelivr runtime and NumPy, executed Python with the expected output, and exported no local Pyodide distribution. Merge the owning repository workflows to enable publication for future releases.