Skip to content

Commit 2f4d007

Browse files
authored
chore: upgrade to Yarn v4 (#1835)
* chore: upgrade to Yarn v4 * disable scripts and add minimum age gate * ci fixes * yarnPath * ignore install state * better gitignore * update yarnrc.yml * additional "plz don't install" measures * missing-fixtures * update asar hash
1 parent 74aba83 commit 2f4d007

File tree

21 files changed

+7659
-4524
lines changed

21 files changed

+7659
-4524
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
node-version-file: '.nvmrc'
2121
- name: Install dependencies
22-
run: yarn --frozen-lockfile
22+
run: yarn --immutable
2323
- name: Build API documentation
2424
run: yarn build:docs
2525
- name: Azure login

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
node-version-file: .nvmrc
2828
cache: 'yarn'
2929
- name: Install
30-
run: yarn install --frozen-lockfile
30+
run: yarn install --immutable
3131
- uses: continuousauth/action@4e8a2573eeb706f6d7300d6a9f3ca6322740b72d # v1.0.5
3232
timeout-minutes: 60
3333
with:

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ jobs:
2828
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2929
with:
3030
node-version: '${{ matrix.node-version }}'
31-
cache: 'yarn'
3231
- name: Setup CI Environment
3332
run: test/ci/before_install.sh
3433
- name: Install
35-
run: yarn install --frozen-lockfile
34+
run: yarn install --immutable
3635
- name: Build
3736
run: yarn build
3837
- name: Electron Cache

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,12 @@ typedoc
1515
npm-debug.log
1616
dist/
1717
.eslintcache
18+
19+
# yarn v4
20+
.pnp.*
21+
.yarn/*
22+
!.yarn/patches
23+
!.yarn/plugins
24+
!.yarn/releases
25+
!.yarn/sdks
26+
!.yarn/versions

.yarn/releases/yarn-4.10.2.cjs

Lines changed: 942 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
enableScripts: false
2+
3+
nodeLinker: node-modules
4+
5+
# 1 week
6+
npmMinimalAgeGate: 10080
7+
8+
npmPreapprovedPackages:
9+
- "@electron/*"
10+
11+
yarnPath: .yarn/releases/yarn-4.10.2.cjs

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"junk": "^4.0.1",
4444
"parse-author": "^2.0.0",
4545
"plist": "^3.1.0",
46-
"prettier": "^3.6.2",
4746
"resedit": "^2.0.3",
4847
"resolve": "^1.22.10",
4948
"semver": "^7.7.2",
@@ -70,6 +69,7 @@
7069
"husky": "^9.1.7",
7170
"lint-staged": "^16.1.5",
7271
"lodash": "^4.17.21",
72+
"prettier": "^3.6.2",
7373
"tsx": "^4.20.4",
7474
"typedoc": "~0.25.4",
7575
"typescript": "^5.9.2",
@@ -108,5 +108,6 @@
108108
"prettier --write",
109109
"eslint --fix"
110110
]
111-
}
111+
},
112+
"packageManager": "[email protected]"
112113
}

test/fixtures/asar-prebuilt/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "A prebuilt asar app",
55
"main": "main.js",
66
"devDependencies": {
7-
"electron": "27.0.0"
7+
"electron": "27.0.0",
8+
"@electron/this-will-never-exist": "1.0.0"
89
}
910
}

test/fixtures/basic/node_modules/@electron/this-will-never-exist/package.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/basic/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"ncp": "^2.0.0",
1313
"run-waterfall": "^1.1.1",
1414
"electron": "27.0.0",
15-
"ffi-napi": "4.0.3"
15+
"ffi-napi": "4.0.3",
16+
"@electron/this-will-never-exist": "1.0.0"
1617
}
1718
}

0 commit comments

Comments
 (0)