Skip to content

fix(room-source): avoid stale default-branch imports - #12

Open
kchen0x wants to merge 1 commit into
glink25:mainfrom
kchen0x:fix/github-branch-import-cache
Open

fix(room-source): avoid stale default-branch imports#12
kchen0x wants to merge 1 commit into
glink25:mainfrom
kchen0x:fix/github-branch-import-cache

Conversation

@kchen0x

@kchen0x kchen0x commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #11

Summary

  • resolve branch refs to their current commit SHA before requesting package files
  • keep the original branch name for source metadata and UI, while using the immutable SHA for jsDelivr tree and file URLs
  • retain tag behavior and CDN-based distribution without issuing one GitHub API request per package file
  • add a regression test that rejects any @main jsDelivr request after resolving a branch

Validation

  • vitest run packages/room-source/src/githubSource.test.ts
  • tsc -b
  • vitest run (110 files, 661 tests)
  • vite build in apps/web

The bug was browser-reproduced with kchen0x/parti-decrypto: root URL import returned stale 1.0.0; tree/v1.0.2 imported the current filesystem package.

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.

Bug: GitHub imports can fetch stale default-branch packages

1 participant