Repository navigation
fix(fix): keep peer ranges out of install descriptors and the install check (0.7.4 regression) - #85
Merged
Merged
Conversation
… check A 0.7.4 regression from #79. upgradeInstall read sections in the order dependencies, devDependencies, optionalDependencies, peerDependencies, so a workspace declaring the moved package as a widened peer (`^18.3.1 || ^19.0.0`) next to a bumped devDependency (`^19.3.0`) had the peer range overwrite the installable one: - the post-install check looked the peer range up, which is no lockfile descriptor; Yarn read an old copy and fix stopped with "Requested [email protected], but packages/design-system/icons resolved 17.0.2" (medusajs/medusa); - npm and pnpm installed with the peer range rewritten to the exact version. Only dependencies, devDependencies and optionalDependencies now feed the install, `yarn set resolution` and the check; peer ranges are validated and widened in the manifest only. Fixture fixtures/lockfiles/peer-widened (npm, pnpm, Yarn 3, Yarn 4): all four cases fail on main and pass here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmiChUUtLdjbg6mNzKqVep Signed-off-by: Claude <[email protected]>
lucasbraum
force-pushed
the
fix/peer-ranges-install-check
branch
from
October 12, 2026 05:11
ce5699c to
7b6b53d
Compare
Merged
lucasbraum
pushed a commit
that referenced
this pull request
Oct 12, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). 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 ## [email protected] ### Patch Changes - [#83](#83) [`bda0b35`](bda0b35) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Find more of what an upgrade breaks. Named checks now also compile the files that directly import a package's importers when what they import depends on the package, within a 20% memory budget relative to the same program's estimate (the same files on every machine), so a test calling a wrapped tool's `execute` is reported. Files the budget leaves out are named per workspace in the check and fix summaries, `report.json` and the HTML report. The `ai` pack flags `ToolLoopAgent`, `Agent` and `ToolLoopAgentSettings` type arguments, whose third position is now the runtime context, and finds renamed options inside spread objects, behind `as`/`satisfies`, and in an agent's `stream`/`generate` calls. Breaking recall: `ai` 36% → 82%, `zod` 71% → 74%, with no false positives. - [#84](#84) [`5c59257`](5c59257) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Yarn 2 and 3 lockfiles: follow dependency references written without the `npm:` protocol, so a moved package's own subtree is recognized. `fix` no longer rejects a new major that swaps its dependencies (for example `cmdk` 0.2 → 1.0 replacing `@radix-ui/*` 1.0.0 with 1.1.x) as "changed resolutions outside the dependency subtree", and importer resolutions in these lockfiles are now compared too. Changes reached only from packages that did not move are still rejected. The report lists each allowed transitive change under the package that moved it. A root `resolutions`, `overrides` or `pnpm.overrides` entry that pins a package the upgrade moves now stops the run before the baseline and the install, naming the entry, instead of failing after the install (on medusa: 33 s instead of 11 min). With Yarn 2+, a moved package whose range the plan rewrote is pinned to the exact planned version too (it resolved the newest match before). Temporary clones are removed on exit, including after a failed or interrupted run. `--keep-temp` (or `--debug`, which also prints every phase) keeps one; `--keep` still works as before. - [#85](#85) [`0af3fed`](0af3fed) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Fix a 0.7.4 regression: when a workspace declares the upgraded package both in `peerDependencies` and in `dependencies` or `devDependencies`, the widened peer range (for example `^18.3.1 || ^19.0.0`) replaced the installable range in the install and in the check that follows it. With Yarn it is no lockfile descriptor, so the check read an old copy and `fix` stopped with "Requested [email protected], but … resolved 17.0.2". Peer ranges are now only validated and widened in the manifest: `dependencies`, `devDependencies` and `optionalDependencies` alone feed the install, `yarn set resolution` and the check. - [#86](#86) [`191c89e`](191c89e) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Fix `uptide pr --yes` opening a ready-for-review pull request when `--draft` is omitted. New pull requests now default to drafts, matching `fix --pr --yes` and the migration report's instructions. - [#81](#81) [`ac01a01`](ac01a01) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Respect the repository's JavaScript compiler setting when selecting scoped analysis roots. This prevents an `escapedName` crash during upgrades in mixed TypeScript/JavaScript monorepos while preserving analysis of enabled JavaScript files. Co-authored-by: uptide-release[bot] <338861287+uptide-release[bot]@users.noreply.github.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.
What and why
A regression from #79, shipped in 0.7.4.
upgradeInstallwalked a workspace's sections in the orderdependencies,devDependencies,optionalDependencies,peerDependencies. Take a workspace that declares the moved package as a widened peer (^18.3.1 || ^19.0.0, which #79 introduced) next to a bumped devDependency (^19.3.0). There, the peer range overwrote the installable one:fixstopped. On medusajs/medusa (Yarn 3.2.1),packages/design-system/iconsgave:Requested [email protected], but packages/design-system/icons resolved 17.0.2; verification cannot use a different target.peerDependencies.react: "19.3.0").Now only
dependencies,devDependenciesandoptionalDependenciesfeed the install descriptors,yarn set resolutionand the check. Peer ranges are validated and widened in the manifest only. A workspace that declares the package only as a peer isn't checked, since it doesn't install it.Rebased onto
mainafter #84 landed; one commit, signed off. The only conflict was the Yarn Berryset resolutionloop, which #84 had also changed. The result keeps #84's change (rewritten ranges are pinned too) and loops over the installed sections only.How it was verified
New fixture
fixtures/lockfiles/peer-widened/for npm (v3), pnpm (v9), Yarn 3 (lockfile v6) and Yarn 4 (v8).packages/uideclareslibasdevDependencies: ^2.0.0(bumped) andpeerDependencies: ^1.0.0 || ^2.0.0(widened), andold-toolkeeps[email protected]in the lockfile. The test runs the realupgradeInstallwith the manager mocked to write the after-lockfile. It asserts that the install succeeds,libresolves to the target 2.0.0, and the peer range at every install is the widened one, never an install descriptor.main(with #84)2.0.02.0.0The Yarn 3 fixtures from #84 and these, run together on the rebased branch:
subtree-swap,pinning-overrides,peer-widenedandupgradeall pass (44 tests). Withmain'supgrade.ts, only the fourpeer-widenedcases fail.On medusa, the same check passes with the dev range (
parseYarnon medusa's lockfile:^19.3.0→ 19.3.0,^18.3.1 || ^19.0.0→ 17.0.2). This was the next stop after #84 on a local copy of medusa with its@types/reactresolutions pin relaxed.pnpm lint(only the existingbiome.jsonschema note),pnpm build,pnpm typecheck,pnpm test: core 1195 passed / 28 skipped, CLI 393 passed.Checklist
mainpnpm lint && pnpm typecheck && pnpm testpass.changeset/peer-ranges-not-install-descriptors.md, patch, names the 0.7.4 regression)🤖 Generated with Claude Code
https://claude.ai/code/session_01EmiChUUtLdjbg6mNzKqVep