Conversation
| d('* Replacing existing file'); | ||
| await fs.remove(cachePath); | ||
|
|
||
| if (!fs.existsSync(path.dirname(cachePath))) { |
There was a problem hiding this comment.
Note: this new clause is needed because fs.rename will fail if the target directory doesn't exist, while fs.move creates the directory.
This also doesn't work across disks, but we could catch the resulting error and fall back to an fs.copy call if necessary.
| artifactName: 'electron', | ||
| mirrorOptions: { | ||
| mirror: 'https://mirror.example.com/', | ||
| // eslint-disable-next-line @typescript-eslint/camelcase |
dsanders11
left a comment
There was a problem hiding this comment.
LGTM, other than the declaration: true change in tsconfig.json that @erikian called out.
|
0f540cd adds declarations back and uses |
Sad, but good catch! |
VerteDinde
left a comment
There was a problem hiding this comment.
Excited to get this landed!
|
🎉 This PR is included in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
BREAKING CHANGE: bumps minimum Node.js version to >=22.12.0
ESM
Node.js 22.12 gives us the ability to use CommonJS
requirecalls on ESM dependency graphs. This compatibility gives us the ability to migrate our libraries to ESM and maintain support for projects that are using CommonJS.Removal of deprecated APIs
@electron/getalready had a few deprecated APIs and this PR removes them since we're already making a breaking change anyways:nightly_mirroroption was removed (was deprecated in favour ofnightlyMirror)forceoption was removed (was deprecated in favour ofcacheMode=WriteOnly).Test migration from Jest to Vitest
Jest currently has issues with
require(esm)while it works out of the box with Vitest. We were already looking to migrate to Vitest across other Ecosystem repos, so this PR just switches over.vitest(no globals)jest.mockcalls turned intovicallstsconfig.json changes
We're now basing our TypeScript config off of
@tsconfig/node22, which is a bit different from what we had in the past.Due to going ESM-only, we only have a singular
tsconfig.jsonnow.