Skip to content

Commit 92e001a

Browse files
Read berry restore registry like yarn does (#1017) (#1323)
* WIP: Fix berry restore registry lookup sources (#1017) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Read berry restore registry like yarn does Hosted yarn berry rollback, remove and the takeover restore read only the project .yarnrc.yml's top-level npmRegistryServer. A mirror set through npmScopes, YARN_NPM_REGISTRY_SERVER, a parent-directory or home .yarnrc.yml, or a ${VAR:-default} value was ignored. The restore then dropped the mirror's __archiveUrl binding without a warning, and the next cold immutable install failed YN0035. The restore now resolves each package's registry the way yarn merges its settings, and warns upstream_registry_fallback when the registry cannot be determined. Fixes #1017 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Never expand set env vars into a registry URL A checked-in .yarnrc.yml could name any variable of the socket-patch process (a token) in npmRegistryServer. The restore would then request, and on a failed lookup print, a URL carrying it. A reference to a variable that is set is now treated as an undeterminable registry. The restore falls back to the default registry with upstream_registry_fallback, as the Bun and pnpm settings readers already do. An unset variable's default is still read the way yarn reads it. The hosted-unwind test runner also clears YARN_NPM_REGISTRY_SERVER and YARN_RC_FILENAME, so an ambient value can't steer the fixtures. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent ce95d8a commit 92e001a

3 files changed

Lines changed: 564 additions & 34 deletions

File tree

0 commit comments

Comments
 (0)