Repository navigation
chore: finish migrating from Yarn 1 to Yarn 4 - #175
Merged
Merged
Conversation
- packageManager yarn@4.19.0, committed under .yarn/releases and pointed to by yarnPath, with nodeLinker: node-modules (same setup as react-native-menu/menu) - regenerate root, example and fabric-example lockfiles with Yarn 4 - examples depend on the library via link:../ instead of copying it; Yarn 4 archives the whole parent directory for file:../ (including the example's own node_modules), which runs out of memory. Metro resolves the library and its peers explicitly, as fabric-example already did. - CI/release: yarn config get cacheFolder, --immutable instead of --pure-lockfile; drop the .yarnrc ignore-engines workaround Closes #174 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Yarn 4 migration wrote settings that preserve legacy behaviour, including two that loosen safety defaults (npmMinimalAgeGate: 0 and approvedGitRepositories: "**"). Keep only nodeLinker and yarnPath, as react-native-menu/menu does. No dependency has install scripts, so the enableScripts: false default is safe. Lockfiles change only in checksums (cacheKey) from the compressionLevel default. 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.
Closes #174
Finishes the half-done Yarn migration from #153 (Berry lockfile, but
packageManager: yarn@1.22.22), using the same setup as react-native-menu/menu.Changes
packageManager, release committed at.yarn/releases/yarn-4.19.0.cjs,.yarnrc.ymlwithyarnPath+nodeLinker: node-modules. The runner's global Yarn 1 delegates to it viayarnPath(checked:npx yarn@1.22.22 --version→4.19.0), so CI needs no corepack.example/andfabric-example/regenerated with Yarn 4. The root lockfile is now honoured again, so CI stops re-resolving everything on each run (e.g.@types/nodeis back to the locked 18.0.0).link:../): Yarn 4 resolvesfile:../by archiving the entire parent directory, including the example's ownnode_modules, and runs out of memory ("Couldn't allocate enough memory"). Metro (RN 0.68) doesn't follow symlinks, soexample/metro.config.jsnow resolves the library and its peers explicitly (watchFolders,extraNodeModules, root copies ofreact/react-nativeblocked), asfabric-examplealready did.yarn cache dir→yarn config get cacheFolder,--pure-lockfile→--immutable..gitignore: commit.yarn/releases, ignore the rest of.yarn/(also in sub-projects). Dropped the.yarnrcignore-enginesworkaround from chore: automate npm releases with release-it and Trusted Publishing #173; Yarn 4 doesn't fail installs on dependencyengines.Verified locally
yarn lint,type-check,flow,testpassexample:yarn install --immutablestill passes after editing a library file (no content hash in the lockfile), andbuild:ios/build:androidbundle the library from../jswith noreact/react-nativefrom the rootnode_modulesfabric-example: install +build:iosbundle OKyarn release patch --ci --dry-run→1.5.0...1.5.1;npm pack --dry-runhas no.yarnfiles🤖 Generated with Claude Code