Repository navigation
fix(bundle): load every chunk before an upgrade - #448
Merged
Merged
Conversation
leemour
force-pushed
the
fix/upgrade-preloads-chunks
branch
from
November 2, 2026 03:59
3a3c1ba to
74183ff
Compare
wa upgrade 0.22.0 → 0.23.0 installed the new version and then failed with MODULE_NOT_FOUND: pnpm removes the folder the running version was loaded from, and the command imported a lazy chunk after the install. A server already preloads every chunk for the same reason; an upgrade now awaits them before it starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
leemour
force-pushed
the
fix/upgrade-preloads-chunks
branch
from
November 2, 2026 04:07
74183ff to
4f253f4
Compare
Merged
leemour
added a commit
that referenced
this pull request
Nov 2, 2026
Dates the Unreleased section as 0.75.0: `--full-history` (#447), the upgrade chunk preload (#448), and a native list's help without `OR` (#449). Only package.json and the CHANGELOG heading change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <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.
Task
wa upgrade(0.22.0 → 0.23.0, pnpm) installed the new version, then failed withMODULE_NOT_FOUND.Why
pnpm's
add -gremoves the versioned folder the old process was loaded from; the bundle keeps lazyimport()s lazy, so a chunk imported after the install no longer exists. A server already preloads every chunk against exactly this (bundle.tsheader);upgradedid not.What
isUpgrade(words)(upgradeamong the first two plain words) in the loader: it awaits every chunk before importing the entry. Changelog.Testing
New
bundle.test.tscase (which argv count as an upgrade; the loader carries the check). Full vitest, typecheck, lint, docs:check. Not reproduced end to end: the failure needs a real global pnpm upgrade.🤖 Generated with Claude Code