File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 - name : Build docs bundle
3737 run : deno task docs:bundle
3838
39+ - name : Stamp build SHA (cache bust)
40+ run : sed -i "s/__BUILD_SHA__/${GITHUB_SHA}/g" docs/index.html
41+
3942 - name : Configure Pages
4043 uses : actions/configure-pages@v5
4144
Original file line number Diff line number Diff line change @@ -164,6 +164,8 @@ let activeEntEl = null;
164164let cardPinned = false ;
165165let cardHideTimer = 0 ;
166166
167+ const BUILD = globalThis . __TS_DUCKLING_BUILD__ || "dev" ;
168+
167169const ATOMIC_KINDS = new Set ( [
168170 "ip" ,
169171 "url" ,
@@ -251,7 +253,9 @@ const setSelection = (set) => {
251253
252254const ensureWorker = ( ) => {
253255 if ( worker ) return worker ;
254- worker = new Worker ( new URL ( "./worker.js" , import . meta. url ) , {
256+ const u = new URL ( "./worker.js" , import . meta. url ) ;
257+ u . searchParams . set ( "v" , BUILD ) ;
258+ worker = new Worker ( u , {
255259 type : "module" ,
256260 } ) ;
257261 worker . onmessage = ( ev ) => {
Original file line number Diff line number Diff line change @@ -375,6 +375,9 @@ <h2 class="text-sm font-semibold tracking-wide text-slate-900">
375375 </ div >
376376 </ div >
377377
378- < script type ="module " src ="./app.js?v=20260208-1 "> </ script >
378+ < script >
379+ globalThis . __TS_DUCKLING_BUILD__ = "__BUILD_SHA__" ;
380+ </ script >
381+ < script type ="module " src ="./app.js?v=__BUILD_SHA__ "> </ script >
379382 </ body >
380383</ html >
Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ const loadModule = () => {
77 // Prefer local bundle for development/preview, but fall back to esm.sh for
88 // production (GitHub Pages) or when the bundle is missing.
99 modPromise = ( async ( ) => {
10- const local = new URL ( "./vendor/ts-duckling.js" , import . meta. url ) . href ;
10+ const build = globalThis . __TS_DUCKLING_BUILD__ || "dev" ;
11+ const local = new URL (
12+ `./vendor/ts-duckling.js?v=${ encodeURIComponent ( build ) } ` ,
13+ import . meta. url ,
14+ ) . href ;
1115 try {
1216 return await import ( local ) ;
1317 } catch {
You can’t perform that action at this time.
0 commit comments