Skip to content

Commit 817d4ed

Browse files
chore: modern yarn (4.0) (#1517)
* chore: upgrade to Yarn 4 * chore: upgrade examples/basic * chore: add git ignores * chore: upgrade website yarn * chore: fix yarn scripts * chore: git ignore tweaks * chore: git ignore tweaks
1 parent 84ba56e commit 817d4ed

File tree

11 files changed

+21122
-14819
lines changed

11 files changed

+21122
-14819
lines changed

.github/actions/setup-deps/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ runs:
1818

1919
- name: Install deps
2020
if: steps.yarn-cache.outputs.cache-hit != 'true'
21-
run: yarn install --frozen-lockfile
21+
run: yarn install --immutable
2222
shell: bash

.github/actions/setup-website-deps/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ runs:
1818

1919
- name: Install website deps
2020
if: steps.yarn-cache-website.outputs.cache-hit != 'true'
21-
run: yarn --cwd website install --frozen-lockfile
21+
run: yarn --cwd website install --immutable
2222
shell: bash

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# General Node.js
12
node_modules
23
coverage
34
*.log
@@ -6,6 +7,16 @@ build
67
.idea
78
.DS_Store
89

10+
# Yarn 4.x
11+
.pnp.*
12+
.yarn/*
13+
!.yarn/patches
14+
!.yarn/plugins
15+
!.yarn/releases
16+
!.yarn/sdks
17+
!.yarn/versions
18+
919
# Ignore lock files in examples for now
1020
examples/**/yarn.lock
1121
.docusaurus
22+

.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

examples/basic/.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# General Node.js
12
node_modules/
23
.expo/
34
dist/
@@ -10,5 +11,15 @@ npm-debug.*
1011
*.orig.*
1112
web-build/
1213

14+
# Yarn 4.x
15+
.pnp.*
16+
.yarn/*
17+
!.yarn/patches
18+
!.yarn/plugins
19+
!.yarn/releases
20+
!.yarn/sdks
21+
!.yarn/versions
22+
1323
# macOS
1424
.DS_Store
25+

examples/basic/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@
2020
"devDependencies": {
2121
"@babel/core": "^7.20.0",
2222
"@testing-library/jest-native": "^5.4.3",
23-
"@testing-library/react-native": "^12.3.0",
23+
"@testing-library/react-native": "^12.3.2",
2424
"@types/react": "~18.2.14",
2525
"jest": "^29.7.0",
2626
"react-test-renderer": "18.2.0",
2727
"typescript": "^5.2.2"
2828
},
29-
"private": true
29+
"private": true,
30+
"packageManager": "yarn@4.0.1"
3031
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"MattAgn <matthieua@bam.tech> (https://github.com/MattAgn)"
1818
],
1919
"license": "MIT",
20-
"private": false,
2120
"keywords": [
2221
"react-native",
2322
"react",
@@ -92,5 +91,6 @@
9291
"build:ts:watch": "yarn build:ts --watch --preserveWatchOutput",
9392
"build": "yarn clean && yarn build:js && yarn build:ts && yarn copy-flowtypes",
9493
"prepare": "yarn build"
95-
}
94+
},
95+
"packageManager": "yarn@4.0.1"
9696
}

website/.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,12 @@
1818
npm-debug.log*
1919
yarn-debug.log*
2020
yarn-error.log*
21+
22+
# Yarn 4.x
23+
.pnp.*
24+
.yarn/*
25+
!.yarn/patches
26+
!.yarn/plugins
27+
!.yarn/releases
28+
!.yarn/sdks
29+
!.yarn/versions

website/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
"last 1 firefox version",
2828
"last 1 safari version"
2929
]
30-
}
30+
},
31+
"packageManager": "yarn@4.0.1"
3132
}

0 commit comments

Comments
 (0)