Repository navigation
chore(embed): @event-calendar/core 5.22.0, moving Svelte with it - #195
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #192, whose CI is red.
Why #192 cannot land on its own
The library's 5.21.2+ bundle imports a Svelte internals subpath that 5.57.3 does not export, and
pnpm-workspace.yamlpins 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'slatesttoday and both want the same Svelte.The pin note in
pnpm-workspace.yamlnow 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
windowat module evaluation, so merely importingcalendar-layout.tsthrowsReferenceError: window is not definedunder vitest's default Node environment.test/calendar-layout.test.tsgets thejsdompragma its siblings already have. The shipped widget is unaffected:main.tsnever imports that module statically andelement.tsloads it in a browser.Cost
dist/calendar-layout.js143.9KB → 157.6KB. Onlylayout="calendar"loads it;dist/ote-events.jsis unchanged at 185.5KB.How it was verified
The failure this pairing has already produced was a
TypeErrorthrown 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 ofmain:main)+N morelinks / day cellsdata-day-rows, widget height,.ec-main3, 300px, 195/2493, 300px, 195/249stickystickypnpm install --frozen-lockfile && pnpm lint && pnpm build && pnpm typecheck && pnpm testpasses locally (357 tests inapps/embed).🤖 Generated with Claude Code