Skip to content

Hebrew Calendar: fix broken customizer, upgrade hebcal to v6, split code/data#4235

Open
barakplasma wants to merge 4 commits into
espruino:masterfrom
barakplasma:claude/youthful-dijkstra-EvNjX
Open

Hebrew Calendar: fix broken customizer, upgrade hebcal to v6, split code/data#4235
barakplasma wants to merge 4 commits into
espruino:masterfrom
barakplasma:claude/youthful-dijkstra-EvNjX

Conversation

@barakplasma
Copy link
Copy Markdown
Contributor

Fix customizer: @hebcal/core was loaded from skypack which now 404s/CORS-fails → switched to esm.sh and upgraded v3→v6 (updates Location/Zmanim constructors).

Fix runtime crashes: undefined "Upcoming" layout child, duplicate layout ids, crash when the calendar is exhausted, non-numeric lat/lon to Location.

Stop duplicating the whole app.js inside customizer.html; ship the calendar as a separate hebrew_calendar.json data file the app reads via Storage.readJSON.
setUI before loadWidgets (clock-app convention); allow emulator; remove dead code.

claude and others added 4 commits May 30, 2026 17:04
- switch hebcal/core import from skypack (now 404/CORS) to esm.sh
- fix undefined item appended to Upcoming list crashing Layout render
- fix duplicate layout id (upcomingEvents+1 -> +i)
- guard findNextEvent() so an exhausted calendar no longer crashes
- pass numeric lat/lon to Location constructor
- upgrade @hebcal/core 3 -> 6 (esm.sh): update Location (now needs tzid,
  taken from the browser) and Zmanim (new (location, date, useElevation)
  signature) constructors
- stop duplicating app.js inside customizer.html (~180 lines): ship the
  static app.js via url and the generated calendar as a separate
  hebrew_calendar.json data file; app reads it with Storage.readJSON
- add app.js + the data file to metadata storage/data so a base install
  works and the data is cleaned up on uninstall
- app handles an empty calendar gracefully with a hint to customize
- remove dead enc()/heatshrink helper; allow_emulator -> true
Adding app.js to storage made sanitycheck apply the clock check, which
flags loadWidgets being called before setUI. Register as a clock first
(also the recommended order so widgets know a clock app is running).
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