You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4b05ab2
Browse filesBrowse the repository at this point in the historyBrowse files
Fix yarn global folder moved by global-folder (#1629) (#1696)
* Start fix for #1629
Assisted-by: Claude Code:claude-opus-5-5
* Fix --update hint for a moved yarn global folder
A `yarn global add` install whose global folder was moved with yarn's
`global-folder` setting (YARN_GLOBAL_FOLDER, npm_config_global_folder,
~/.yarnrc, ~/.npmrc, ...) to a folder not named `global` looked like a
small yarn project, so `socket-patch --update` told the user to run
`yarn add` from wherever they were. That edits some other project and
leaves the installed copy stale.
Self-update now reads the `global-folder` values yarn 1 reads, resolves
each path the way yarn 1.22 does, and treats an install inside one of
those folders as yarn's global folder: `yarn global add …@latest`.
Assisted-by: Claude Code:claude-opus-5-5
* Read yarn's global-folder like yarn does
Review follow-ups for the moved yarn global folder fix:
- Accept a `--global-folder` default flag in a .yarnrc.
- Read a .yarnrc value as one token of yarn's rc grammar, so a
trailing `# comment` is dropped and a double-quoted value has its
escapes decoded (Windows paths).
- Decode an .npmrc value like npm's ini parser (inline comments,
quotes, escapes) and expand its ${NAME} references like yarn.
- Read yarn's config only when a yarn install is being classified,
so other install channels never walk the rc files.
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments