Skip to content

Migrate to pnpm catalogs - #104

Merged
krispya merged 4 commits into
mainfrom
refactor/pnpm-catalog
Apr 8, 2026
Merged

Migrate to pnpm catalogs#104
krispya merged 4 commits into
mainfrom
refactor/pnpm-catalog

Conversation

@krispya

@krispya krispya commented Apr 7, 2026

Copy link
Copy Markdown
Member

Swaps to pnpm for the package manager (like the rest of our repos) and syncpack for making sure all of the demos are running the same versions of our libraries. At first I was using pnpm catalogs but this doesn't work correctly with degit which duplicates the package out of the monorepo workspace.

@krispya
krispya merged commit 68b3f42 into main Apr 8, 2026
2 checks passed
krispya added a commit that referenced this pull request Apr 8, 2026
* Migrate to pnpm catalogs (#104)

* Migrate to pnpm catalogs

* Switch from catalogs to syncpack

* Attemp to fix CI script

* Another CI fix

* Improve examples menu UI

* Hoist bin files like npm
Comment thread .syncpackrc.json
{
"versionGroups": [
{
"label": "Demos must use identical versions of shared dependencies",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there, to ensure identical versions you'll need to remove "policy": "sameRange" as that policy relaxes the rules https://syncpack.dev/version-groups/same-range/

abernier added a commit that referenced this pull request Jul 30, 2026
* Type-only import in playwright.config.ts: Node 24 type stripping loads the config natively, where PlaywrightTestConfig has no runtime export

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe

* Update @playwright/test to 1.62.0 and turbo to 2.10.7 for Node 24 / pnpm 11

Playwright 1.45.3 predates Node 24: its ESM loader thread deadlocks before
any browser launches, so every e2e test hung forever. 1.62.0 runs fine.

Turbo 2.9.4 could not parse the patchedDependencies format written by
pnpm 11 in pnpm-lock.yaml (bare hash string); 2.10.7 parses it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe

* Add aquarium darwin baseline (Chromium 151) for local macOS runs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe

* CI: bump Playwright image to v1.62.0-jammy and re-enable pnpm test

The test step had been commented out since the pnpm catalogs migration
(#104). Note: only 3 demos have linux baselines; the others will fail
with 'snapshot doesn't exist' until their baselines are generated in
the CI container.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe

* CI: bump caching-for-turbo to v2.5.1, v1.5 stopped persisting caches

The repo's Actions cache contains only setup-node pnpm-store entries —
zero turbo artifacts — so every CI run rebuilds all 160 demos. v1.x of
the action predates GitHub's cache service v2 migration (legacy backend
shut down early 2025) and has been silently failing to save since.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe

* CI: workflow_dispatch input to regenerate playwright baselines

gh workflow run CI --ref <branch> -f update_snapshots=true
then download the 'snapshots' artifact and commit it. Baselines must be
generated on the CI runner (amd64 + CI Chromium build) to match what
the test step compares against.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe

* Raise playwright test timeout to 60s: 30s flakes on 2-core CI runners

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe

* CI: skip build/deploy on baseline-regen dispatches, pin deploy to main

The github-pages environment protection already rejects non-main deploys
(the regen dispatch run failed on this); make it explicit and stop
wasting the build on regen runs.

Also drop the stale aquarium linux baseline (Chromium 127): its drift
under Chromium 151 sits right at the 5% threshold, so update-snapshots
'changed' mode won't reliably rewrite it — a missing baseline always is.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe

* Baseline regen: turbo --force + playwright --update-snapshots=all

--force because a cached test task restores its cached outputs — i.e.
the very stale baselines being regenerated (bitten by this: a regen run
went FULL TURBO and resurrected a deleted baseline). =all because mode
'changed' keeps baselines whose drift sits under the diff threshold.
e2e-test now forwards the mode value to playwright.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe

* Regenerate linux baselines under Chromium 151 (playwright 1.62 container)

Generated by the update_snapshots dispatch (run 30529310256).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe

* Drop the darwin baseline: machine-specific, unused by CI

Regenerate locally on demand: pnpm --filter @demo/aquarium test -- --update-snapshots

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVkETanfY1gFZwmAS1peWe

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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