Skip to content

Commit 8d64aa1

Browse files
erickzhaoerikian
andauthored
feat!: bump engines requirement to Node 22 (#1821)
BREAKING CHANGE: bumps required Node.js version to >=22.12.0. ESM-only. Co-authored-by: Erik Moura <[email protected]>
1 parent c32a51b commit 8d64aa1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2044
-1298
lines changed

.eslintrc.js renamed to .eslintrc.cjs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
'use strict';
21
const eslintConfig = {
32
extends: ['eslint:recommended', 'prettier'],
43
parserOptions: {
54
ecmaVersion: 'latest',
5+
sourceType: 'module',
66
},
77
env: {
88
es6: true,
@@ -11,6 +11,7 @@ const eslintConfig = {
1111
rules: {
1212
'no-console': 0,
1313
strict: 'error',
14+
'import/enforce-node-protocol-usage': ['error', 'always'],
1415
},
1516
overrides: [
1617
{
@@ -20,13 +21,11 @@ const eslintConfig = {
2021
'plugin:promise/recommended',
2122
'plugin:@typescript-eslint/eslint-recommended',
2223
'plugin:@typescript-eslint/recommended',
24+
'plugin:import/warnings',
2325
'plugin:import/typescript',
2426
'prettier',
2527
],
2628
parser: '@typescript-eslint/parser',
27-
parserOptions: {
28-
sourceType: 'module',
29-
},
3029
},
3130
],
3231
};

.github/workflows/canary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup Node.js
2121
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # tag: v4.4.0
2222
with:
23-
node-version: lts/*
23+
node-version-file: .nvmrc
2424
- name: Replace electron with electron-nightly
2525
run: |
2626
cd minimal-repro

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup Node.js
2525
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2626
with:
27-
node-version: 20.x
27+
node-version-file: .nvmrc
2828
cache: 'yarn'
2929
- name: Install
3030
run: yarn install --frozen-lockfile

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
node-version:
20-
- '22.13'
21-
- '20.19'
20+
- '22.12.x'
2221
os:
2322
- macos-latest
2423
- ubuntu-latest

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ typedoc
1414
.nyc_output
1515
npm-debug.log
1616
dist/
17-
src/targets.js
1817
.eslintcache

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
#!/usr/bin/env sh
2-
. "$(dirname "$0")/_/husky.sh"
32
npx lint-staged

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.13
1+
22.12

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/test/fixtures/infer-malformed-json

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ It generates executables/bundles for the following **target** platforms:
5353

5454
## Installation
5555

56-
This module requires Node.js 16.13.0 or higher to run.
56+
This module requires Node.js 22.12.0 or higher to run.
5757

5858
```sh
5959
npm install --save-dev @electron/packager

bin/electron-packager.js

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

0 commit comments

Comments
 (0)