Skip to content

Commit c776075

Browse files
committed
chore!: bump engines requirement to Node 22
BREAKING CHANGE: bumps required Node.js version to >=22.0.0
1 parent 6db692b commit c776075

File tree

5 files changed

+785
-437
lines changed

5 files changed

+785
-437
lines changed

.github/workflows/test.yml

+2-13
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,18 @@ jobs:
1717
strategy:
1818
matrix:
1919
node-version:
20-
- '20.9'
21-
- '18.17'
22-
- '16.20'
23-
- '14.16'
20+
- '22.13'
2421
runs-on: macos-latest
2522
steps:
26-
- name: Install Rosetta
27-
if: ${{ matrix.node-version == '14.16' }}
28-
run: /usr/sbin/softwareupdate --install-rosetta --agree-to-license
2923
- name: Checkout
3024
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3125
- name: Setup Node.js
3226
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
3327
with:
3428
node-version: "${{ matrix.node-version }}"
3529
cache: 'yarn'
36-
architecture: ${{ matrix.node-version == '14.16' && 'x64' || env.RUNNER_ARCH }}
37-
- name: Install (Node.js v16+)
38-
if : ${{ matrix.node-version != '14.16' }}
30+
- name: Install dependencies
3931
run: yarn install --frozen-lockfile
40-
- name: Install (Node.js < v16)
41-
if : ${{ matrix.node-version == '14.16' }}
42-
run: yarn install --frozen-lockfile --ignore-engines
4332
- name: Lint
4433
run: yarn lint
4534
- name: Test

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.13.0

package.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,25 @@
2626
"lib"
2727
],
2828
"engines": {
29-
"node": ">= 10.0.0"
29+
"node": ">= 22.0.0"
3030
},
3131
"publishConfig": {
3232
"provenance": true
3333
},
3434
"devDependencies": {
3535
"@types/debug": "^4.1.5",
36-
"@types/fs-extra": "^9.0.1",
3736
"@types/jest": "^29.0.0",
38-
"@types/node": "^13.7.7",
37+
"@types/node": "^22.10.5",
3938
"@types/promise-retry": "^1.1.3",
4039
"jest": "^29.0.0",
4140
"prettier": "^3.4.2",
4241
"ts-jest": "^29.0.0",
4342
"typedoc": "~0.25.13",
4443
"typedoc-plugin-missing-exports": "^2.2.0",
45-
"typescript": "4.9.3"
44+
"typescript": "~5.4.5"
4645
},
4746
"dependencies": {
4847
"debug": "^4.1.1",
49-
"fs-extra": "^9.0.1",
5048
"promise-retry": "^2.0.1"
5149
}
5250
}

src/helpers.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import debug from 'debug';
2-
import * as fs from 'fs-extra';
3-
import * as os from 'os';
4-
import * as path from 'path';
2+
3+
import * as fs from 'node:fs/promises';
4+
import * as os from 'node:os';
5+
import * as path from 'node:path';
56

67
const d = debug('electron-notarize:helpers');
78

@@ -13,11 +14,11 @@ export async function withTempDir<T>(fn: (dir: string) => Promise<T>) {
1314
result = await fn(dir);
1415
} catch (err) {
1516
d('work failed');
16-
await fs.remove(dir);
17+
await fs.rm(dir, { recursive: true });
1718
throw err;
1819
}
1920
d('work succeeded');
20-
await fs.remove(dir);
21+
await fs.rm(dir, { recursive: true });
2122
return result;
2223
}
2324

0 commit comments

Comments
 (0)