Skip to content

Commit 0d1a66a

Browse files
Saadnajmiclaude
andcommitted
Migrate to Yarn v6 (rc.15) via Yarn Switch
- Switch packageManager from yarn@4.13.0 to yarn@6.0.0-rc.15 - Change nodeLinker from pnpm to node-modules (PnP not ready for this repo) - Remove yarnPath (Yarn Switch manages the binary instead) - Remove preinstall script (node not in PATH in Yarn v6 subprocesses) - Add @typescript/native-preview: latest to devDependencies - Add resolutions for packages with invalid ^0.x semver - Add .mise.toml for managing node and yarn versions - Update getCatalog.ts to handle yarn config failures gracefully - Regenerate yarn.lock with Yarn v6 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3fc95f6 commit 0d1a66a

File tree

7 files changed

+23716
-26764
lines changed

7 files changed

+23716
-26764
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ apps/*/.vscode/.react/
113113
**/.yarn/*
114114
!**/.yarn/patches
115115
!**/.yarn/plugins
116-
!**/.yarn/releases
117116
!**/.yarn/sdks
118117
!**/.yarn/versions
119118

.mise.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tools]
2+
node = "22"
3+
yarn = "6.0.0-rc.15"

.yarn/releases/yarn-4.13.0.cjs

Lines changed: 0 additions & 940 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,17 +241,13 @@ catalogs:
241241

242242
dynamicPackageExtensions: ./scripts/dynamic.extensions.mjs
243243

244-
enableGlobalCache: false
245-
246244
enableScripts: false
247245

248-
globalFolder: .yarn/store
249-
250246
logFilters:
251247
- code: YN0060
252248
level: discard
253249

254-
nodeLinker: pnpm
250+
nodeLinker: node-modules
255251

256252
packageExtensions:
257253
"@svgr/core@*":
@@ -309,4 +305,3 @@ plugins:
309305
path: .yarn/plugins/@rnx-kit/yarn-plugin-dynamic-extensions.cjs
310306
spec: "https://raw.githubusercontent.com/microsoft/rnx-kit/main/incubator/yarn-plugin-dynamic-extensions/index.js"
311307

312-
yarnPath: .yarn/releases/yarn-4.13.0.cjs

package.json

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,28 @@
2626
"check-publishing": "node ./scripts/src/cli.mjs check-publishing",
2727
"lint-fix": "cross-env FURN_FIX_MODE=true lage lint",
2828
"lint-package-fix": "cross-env FURN_FIX_MODE=true lage lint-package",
29-
"preinstall": "node ./scripts/src/preinstall/use-yarn-please.js",
3029
"format": "oxfmt",
3130
"format:check": "oxfmt --check",
3231
"lint-lockfile": "lint-lockfile",
3332
"test-links": "markdown-link-check"
3433
},
3534
"devDependencies": {
36-
"@babel/core": "catalog:",
37-
"@babel/plugin-proposal-private-property-in-object": "catalog:",
38-
"@babel/preset-env": "catalog:",
39-
"@babel/preset-react": "catalog:",
40-
"@babel/preset-typescript": "catalog:",
41-
"@babel/runtime": "catalog:",
35+
"@babel/core": "^7.20.0",
36+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
37+
"@babel/preset-env": "^7.20.0",
38+
"@babel/preset-react": "^7.20.0",
39+
"@babel/preset-typescript": "^7.20.0",
40+
"@babel/runtime": "^7.20.0",
4241
"@changesets/changelog-github": "^0.5.0",
4342
"@changesets/cli": "^2.30.0",
44-
"@rnx-kit/align-deps": "catalog:",
45-
"@rnx-kit/lint-lockfile": "catalog:",
43+
"@rnx-kit/align-deps": "^3.4.2",
44+
"@rnx-kit/lint-lockfile": "^0.1.3",
45+
"@typescript/native-preview": "latest",
4646
"babel-jest": "^29.7.0",
47-
"cross-env": "catalog:",
47+
"cross-env": "^10.1.0",
4848
"eslint": "^9.39.2",
4949
"eslint-plugin-import": "^2.32.0",
50-
"lage": "catalog:",
50+
"lage": "^2.14.19",
5151
"markdown-link-check": "^3.8.7",
5252
"oxfmt": "^0.35.0",
5353
"typescript": "^5.8.0",
@@ -56,12 +56,20 @@
5656
"resolutions": {
5757
"axios": "^1.13.5",
5858
"expect-webdriverio": "patch:expect-webdriverio@npm%3A5.6.1#~/.yarn/patches/expect-webdriverio-npm-5.6.1-69666d39e9.patch",
59-
"unicorn-magic": "^0.4.0"
59+
"unicorn-magic": "^0.4.0",
60+
"@xmldom/xmldom": "^0.8.11",
61+
"appium-ios-remotexpc": "^0.31.1",
62+
"bplist-creator": "^0.1.1",
63+
"bplist-parser": "^0.3.2",
64+
"moment-timezone": "^0.6.0",
65+
"xpath": "^0.0.34",
66+
"appium-ios-tuntap": "^0.1.3",
67+
"js2xmlparser2": "^0.2.0"
6068
},
6169
"engines": {
6270
"node": ">=22.12"
6371
},
64-
"packageManager": "yarn@4.13.0",
72+
"packageManager": "yarn@6.0.0-rc.15",
6573
"rnx-kit": {
6674
"kitType": "library"
6775
}

scripts/src/utils/getCatalog.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ import { scriptsDir } from './ispnpm.ts';
33

44
export async function getCatalog(): Promise<Record<string, string>> {
55
const command = 'yarn config get catalog --json';
6-
const output = await execWithOutput(command);
7-
return JSON.parse(output) as Record<string, string>;
6+
try {
7+
const output = await execWithOutput(command);
8+
return JSON.parse(output) as Record<string, string>;
9+
} catch {
10+
// Yarn v6 does not support the catalog: protocol; return empty object
11+
return {};
12+
}
813
}
914

1015
function execWithOutput(command: string): Promise<string> {

0 commit comments

Comments
 (0)