fix: normalize dev version in static notebook asset URL#9592
Merged
Conversation
jsdelivr treats `.dev` as a separate path segment, so dev versions need to be rewritten to use `-dev` for the CDN URL to resolve.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes static notebook exports so dev-versioned frontend assets resolve correctly from jsDelivr by converting Python dev version formatting to the npm package version format.
Changes:
- Normalizes
.devto-devwhen constructing the default static notebook CDN asset URL. - Adds tests covering dev and release version asset URLs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
marimo/_server/templates/templates.py |
Normalizes dev versions before building the jsDelivr frontend asset URL. |
tests/_server/templates/test_templates.py |
Adds regression tests for dev and release static notebook asset URLs. |
Contributor
There was a problem hiding this comment.
No issues found across 2 files
Architecture diagram
sequenceDiagram
participant Server as Marimo Server
participant CDN as jsDelivr CDN
participant Static as Static Notebook Export
Note over Server,Static: Static Notebook Asset URL Construction
Server->>Server: Read __version__ (e.g., "0.16.5.dev6+gabc")
Server->>Server: NEW: Replace ".dev" with "-dev" in version string
Note over Server: "0.16.5.dev6+gabc" → "0.16.5-dev6+gabc"
alt Dev version (".dev" present)
Server->>Server: version = "0.16.5-dev6+gabc"
else Release version (no ".dev")
Server->>Server: version = "0.16.5" (unchanged)
end
Server->>Server: Construct CDN URL with normalized version
Note over Server: "https://cdn.jsdelivr.net/npm/@marimo-team/frontend@{version}/dist"
Server->>CDN: Request frontend assets from CDN
alt Dev version
Note over CDN: jsDelivr resolves "0.16.5-dev6"<br/>as path segment (works)
else Release version
Note over CDN: Standard version resolution (unchanged)
end
CDN-->>Server: Serve frontend assets
Server-->>Static: Generate notebook HTML with correct CDN URL
Light2Dark
approved these changes
May 20, 2026
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.23.7-dev59 |
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.
jsdelivr treats
.devas a separate path segment, so dev versionsneed to be rewritten to use
-devfor the CDN URL to resolve.