Repository navigation
Version Packages - #460
Merged
Merged
Version Packages#460
Conversation
Contributor
Benchmarks: Patchwork with this PR against main
every benchmark: the median of 3 runs of main and 3 runs of the PR, their range in brackets
|
Contributor
🪡 PatchworkTorn down. |
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
October 23, 2026 01:12
ccae879 to
d26ede3
Compare
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@inkandswitch/patchwork-bootloader@0.8.5
Patch Changes
3d2d0b0: The service worker no longer mistakes a booting automerge worker for a missing one. The worker only asked for its lock once its whole import graph (most of a megabyte) had loaded, so asset requests made in that window found no lock and logged "no automerge worker; asking tabs to start one". Each tab then dropped its connection to the booting worker and reconnected sync. In a single tab that happened on every reload.
The worker's script,
automerge-protocol-handler-worker.js, is now a small module that takes the lock and holds on to connecting tabs before it imports the worker itself, now@inkandswitch/patchwork-bootloader/automerge-protocol-handler. The vite plugin emits that as a second file,automerge-protocol-handler.js, beside the first. As a backstop, the service worker waits three seconds before nudging, and only nudges if the request is still unanswered and there's still no lock. The nudge is throttled to once every five seconds, however many requests are waiting. Before, every request that raced the same cold start got past the throttle and logged its own nudge.The e2e suite gains
automerge-worker.spec.ts, which checks that the worker holds its lock once a tab is up and that a request racing a cold worker boot isn't reported as a missing worker.3d2d0b0: Package heads lookups no longer pile up on a busy automerge worker. A package doc that's still syncing, as everything is on a fresh login, reports a change with every batch that arrives. The
ModuleWatcherstarted a lookup for each one, and the automerge worker ran each as a full resolve with its own 30-second timeout. A worker slowed by the login sync then timed them all out, and each logged its own 557.The
ModuleWatchernow runs one change-triggered lookup per package at a time. Changes that land while one is in flight collapse into a single lookup after it. The automerge worker shares one resolve between concurrent requests for the same package url without heads, so tabs asking at once wait on the same lookup.Only cache resolved paths when the root and every followed link pin their document heads.
Updated dependencies [3d2d0b0]
Updated dependencies [3d2d0b0]
Updated dependencies
@inkandswitch/patchwork-filesystem@0.2.14
Patch Changes
3d2d0b0: Package heads lookups no longer pile up on a busy automerge worker. A package doc that's still syncing, as everything is on a fresh login, reports a change with every batch that arrives. The
ModuleWatcherstarted a lookup for each one, and the automerge worker ran each as a full resolve with its own 30-second timeout. A worker slowed by the login sync then timed them all out, and each logged its own 557.The
ModuleWatchernow runs one change-triggered lookup per package at a time. Changes that land while one is in flight collapse into a single lookup after it. The automerge worker shares one resolve between concurrent requests for the same package url without heads, so tabs asking at once wait on the same lookup.3d2d0b0: When the service worker can't redirect a package url to its heads, the error now includes the automerge worker's reason (the first line of its 557 body — e.g. the doc is unavailable, or the resolve timed out) instead of only the status.
Only cache resolved paths when the root and every followed link pin their document heads.
@inkandswitch/patchwork@0.8.7
Patch Changes
3d2d0b0: The service worker no longer mistakes a booting automerge worker for a missing one. The worker only asked for its lock once its whole import graph (most of a megabyte) had loaded, so asset requests made in that window found no lock and logged "no automerge worker; asking tabs to start one". Each tab then dropped its connection to the booting worker and reconnected sync. In a single tab that happened on every reload.
The worker's script,
automerge-protocol-handler-worker.js, is now a small module that takes the lock and holds on to connecting tabs before it imports the worker itself, now@inkandswitch/patchwork-bootloader/automerge-protocol-handler. The vite plugin emits that as a second file,automerge-protocol-handler.js, beside the first. As a backstop, the service worker waits three seconds before nudging, and only nudges if the request is still unanswered and there's still no lock. The nudge is throttled to once every five seconds, however many requests are waiting. Before, every request that raced the same cold start got past the throttle and logged its own nudge.The e2e suite gains
automerge-worker.spec.ts, which checks that the worker holds its lock once a tab is up and that a request racing a cold worker boot isn't reported as a missing worker.Updated dependencies [3d2d0b0]
Updated dependencies [3d2d0b0]
Updated dependencies [3d2d0b0]
Updated dependencies
@inkandswitch/patchwork-e2e@0.2.3
Patch Changes
3d2d0b0: The service worker no longer mistakes a booting automerge worker for a missing one. The worker only asked for its lock once its whole import graph (most of a megabyte) had loaded, so asset requests made in that window found no lock and logged "no automerge worker; asking tabs to start one". Each tab then dropped its connection to the booting worker and reconnected sync. In a single tab that happened on every reload.
The worker's script,
automerge-protocol-handler-worker.js, is now a small module that takes the lock and holds on to connecting tabs before it imports the worker itself, now@inkandswitch/patchwork-bootloader/automerge-protocol-handler. The vite plugin emits that as a second file,automerge-protocol-handler.js, beside the first. As a backstop, the service worker waits three seconds before nudging, and only nudges if the request is still unanswered and there's still no lock. The nudge is throttled to once every five seconds, however many requests are waiting. Before, every request that raced the same cold start got past the throttle and logged its own nudge.The e2e suite gains
automerge-worker.spec.ts, which checks that the worker holds its lock once a tab is up and that a request racing a cold worker boot isn't reported as a missing worker.