Skip to content

chore(embed): @event-calendar/core 5.22.0, moving Svelte with it - #195

Merged
hhkaos merged 1 commit into
mainfrom
chore/event-calendar-5.21.2
Nov 26, 2026
Merged

hhkaos merged 1 commit into
mainfrom
chore/event-calendar-5.21.2

Conversation

@hhkaos

@hhkaos hhkaos commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Supersedes #192, whose CI is red.

Why #192 cannot land on its own

Could not resolve "svelte/internal/init-operations"
@event-calendar/core@5.21.2/dist/index.js:7:7

The library's 5.21.2+ bundle imports a Svelte internals subpath that 5.57.3 does not export, and pnpm-workspace.yaml pins Svelte exactly — on purpose, because nothing here imports it and a silent bump breaks a public widget's layout. So the two move together. Svelte goes to 5.59.1, which is what the library asks for (svelte: ^5.59.1); the library goes to 5.22.0 rather than Dependabot's 5.21.2 because that is npm's latest today and both want the same Svelte.

The pin note in pnpm-workspace.yaml now records the pairs that were measured — including the two that fail, and how each fails — plus the commands that print what is pinned today, instead of prose that goes stale.

One test needed a DOM environment

Since 5.21.2 the library's bundle touches window at module evaluation, so merely importing calendar-layout.ts throws ReferenceError: window is not defined under vitest's default Node environment. test/calendar-layout.test.ts gets the jsdom pragma its siblings already have. The shipped widget is unaffected: main.ts never imports that module statically and element.ts loads it in a browser.

Cost

dist/calendar-layout.js 143.9KB → 157.6KB. Only layout="calendar" loads it; dist/ote-events.js is unchanged at 185.5KB.

How it was verified

The failure this pairing has already produced was a TypeError thrown inside the library's own compiled template — the suites did not see it. So the same probe was run against both pairs in a real headless Chrome over CDP, the old pair built from a worktree of main:

5.18.1 + svelte 5.57.3 (main) 5.22.0 + svelte 5.59.1 (this PR)
events drawn / +N more links / day cells 13 / 1 / 35 13 / 1 / 35
popover opens, events in it yes, 9 yes, 9
click inside popover → modal (Shadow DOM retargeting fix) opens opens
bounded month: data-day-rows, widget height, .ec-main 3, 300px, 195/249 3, 300px, 195/249
sticky weekday header sticky sticky
narrow container → list fallback yes yes
header title / paging / density steps ok ok
console errors none none

pnpm install --frozen-lockfile && pnpm lint && pnpm build && pnpm typecheck && pnpm test passes locally (357 tests in apps/embed).

🤖 Generated with Claude Code

Dependabot's bump of the library alone (#192) fails the build:

    Could not resolve "svelte/internal/init-operations"

That subpath is new in the library's 5.21.2+ bundle and absent from Svelte
5.57.3's `exports`, which `pnpm-workspace.yaml` pins exactly. The two are
compiled against each other, so moving either means moving both: Svelte
goes to 5.59.1, the version the library asks for, and the pin note now
records the pairs that were measured rather than the semver ranges that
suggest them. 5.22.0 rather than Dependabot's 5.21.2 because it is what npm
serves as latest today, and both want the same Svelte.

`test/calendar-layout.test.ts` needed a DOM environment: since 5.21.2 the
library's bundle touches `window` at module evaluation, so merely importing
`calendar-layout.ts` throws under the default Node environment. Nothing in
the shipped widget is affected — `main.ts` never imports that module
statically, and `element.ts` loads it in a browser.

`dist/calendar-layout.js` grows 143.9KB → 157.6KB. Only `layout="calendar"`
loads it.

Verified by running the same probe against both pairs in a real headless
Chrome over CDP — the old pair built from a worktree of `main` — because the
failure mode this pairing has already produced was a `TypeError` thrown
inside the library's own compiled template, which the suites did not see:
13 events drawn on the right days, one `+N more` link, its popover opening
with 9 events and a click inside it still opening the modal (the Shadow DOM
retargeting fix), the bounded month's `data-day-rows` sizing and sticky
header, the narrow list fallback and the header's own density steps, paging
and the month title. Identical output on both, no console errors.

Supersedes #192, which Dependabot closes on its own once this lands.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@hhkaos
hhkaos merged commit eabed3d into main Nov 26, 2026
1 check passed
@hhkaos
hhkaos deleted the chore/event-calendar-5.21.2 branch November 26, 2026 21:48
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.

1 participant