Skip to content

fix(runtime): sync CDN CSS version#64

Merged
demtario merged 1 commit into
feature/DEV-2099_Versioned-docs-examplesfrom
feature/DEV-2103_rewrite-cdn-css-link
Jul 17, 2026
Merged

fix(runtime): sync CDN CSS version#64
demtario merged 1 commit into
feature/DEV-2099_Versioned-docs-examplesfrom
feature/DEV-2103_rewrite-cdn-css-link

Conversation

@demtario

@demtario demtario commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Task: https://app.clickup.com/t/9015210959/DEV-2103

  • rewrite baked Handsontable unpkg CSS links when a selected semver changes
  • apply the shared transform in Sandpack, container, and authoring version flows
  • cover root and Angular-style HTML paths plus pkg.pr.new no-op behavior

Test plan

  • pnpm test
  • pnpm --filter @handsontable/demo-runtime typecheck
  • pnpm --filter @handsontable/demo-editor-shell typecheck
  • pnpm --filter @handsontable/demo-authoring typecheck
  • Manually switched the 18.0 docs Sparkline example to 17.1.0; verified its package dependencies, CDN CSS URL, and Sandpack preview

PR intentionally merged into another feature branch, to not break production logic with partial changes.


Note

Low Risk
Localized, pure string rewrite on demo file maps with tests; no auth or persistence changes beyond keeping preview assets in sync.

Overview
Fixes a version-switch bug where npm deps were repinned but baked unpkg CSS in HTML stayed on the old semver, so previews could load mismatched JS and styles.

Adds applyHandsontableCss, which rewrites unpkg.com/handsontable@…/dist/handsontable.full.min.css in /index.html or /src/index.html to match the selected version. It is a no-op for pkg.pr.new builds (not on unpkg) and returns the input unchanged when there is nothing to rewrite.

The transform is chained after applyHandsontableVersion in authoring (version useEffect, including HTML in the “no change” check), SandpackRuntime, and ContainerRuntime, and is exported from @handsontable/demo-runtime. runner/pipeline/version.test.mjs covers root vs src/ HTML and the no-op cases.

Reviewed by Cursor Bugbot for commit da85cf2. Bugbot is set up for automated code reviews on this repo. Configure here.

@demtario
demtario merged commit 2a515e1 into feature/DEV-2099_Versioned-docs-examples Jul 17, 2026
2 checks passed
@demtario
demtario deleted the feature/DEV-2103_rewrite-cdn-css-link branch July 17, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants