Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8a5db9e
chore: upgrade major versions to Node 22
erickzhao Nov 26, 2025
aefab83
checkpoint
erickzhao Nov 26, 2025
5988b0b
ok
erickzhao Nov 26, 2025
ed6ff67
mechanical updates
erickzhao Nov 26, 2025
d1f9e20
build passes
erickzhao Nov 26, 2025
d92d394
this builds
erickzhao Nov 26, 2025
2c3fe4f
ci fixups
erickzhao Nov 27, 2025
a376e1e
fix findConfig tests
erickzhao Dec 2, 2025
dd1d057
remove config templating
erickzhao Dec 2, 2025
7224096
fix importsearch tests
erickzhao Dec 2, 2025
5a94a86
get rid of `mockRequire`
erickzhao Dec 2, 2025
15ce391
`flatAsync` -> `flat`
erickzhao Dec 2, 2025
fd66f43
fix publisher
erickzhao Dec 2, 2025
533b8b3
Fast tests pass
erickzhao Dec 2, 2025
c98097c
make lint pass
erickzhao Dec 2, 2025
4a77519
fix markdownlint
erickzhao Dec 2, 2025
1c8f681
fix other markdown linting commands
erickzhao Dec 2, 2025
bb8e9d9
re-order checkout code steps
erickzhao Dec 2, 2025
db81a35
Merge branch 'next' into node-22
erickzhao Dec 3, 2025
01062f4
Fix tests
erickzhao Dec 3, 2025
b8c1b4c
fix publishers3 tests
erickzhao Dec 4, 2025
0fb1555
Merge branch 'next' into node-22
erickzhao Dec 4, 2025
5175375
fix package.json files
erickzhao Dec 4, 2025
1ede3fe
Merge branch 'next' into node-22
erickzhao Dec 10, 2025
b4b8242
Merge branch 'next' into node-22
erickzhao Dec 18, 2025
f7a8de9
expect error
erickzhao Dec 18, 2025
b35e42b
Merge branch 'next' into node-22
erickzhao Dec 18, 2025
214db01
vite 7
erickzhao Dec 18, 2025
643412e
update lockfile
erickzhao Dec 18, 2025
f02edba
Merge branch 'next' into node-22
erickzhao Jan 7, 2026
4b9e518
import.meta.dirname in verdaccio
erickzhao Jan 7, 2026
f862d62
Merge branch 'next' into node-22
erickzhao Jan 14, 2026
9ab7dc8
temporarily disable assetrelocatorpatch tests
erickzhao Jan 14, 2026
d90d57d
disable strict corepack
erickzhao Jan 14, 2026
6d7011f
fix a test
erickzhao Jan 14, 2026
209b5ba
__filename -> import.meta.filename
erickzhao Jan 14, 2026
903b7fd
fix fuses version
erickzhao Jan 14, 2026
91429a1
append index.js to electron executable
erickzhao Jan 14, 2026
509c497
preload script use `__dirname` still
erickzhao Jan 14, 2026
2eaa7f1
require.resolve -> import.meta.resolve
erickzhao Jan 14, 2026
69dc4ed
gg
erickzhao Jan 14, 2026
4d56b55
serial hooks
erickzhao Jan 15, 2026
3e9388c
Merge branch 'next' into node-22
erickzhao Jan 15, 2026
1895563
fix manual typings for esm imports
erickzhao Jan 15, 2026
222349c
fix hook in fuses
erickzhao Jan 15, 2026
e9ab415
Merge branch 'next' into node-22
erickzhao Jan 15, 2026
393a514
attempt to fix windows ci failures
erickzhao Jan 15, 2026
96aaab4
assetrelocatorpatch tests
erickzhao Jan 16, 2026
6bb7151
fix linting stackl
erickzhao Jan 16, 2026
eaa8763
add tests
erickzhao Jan 16, 2026
583a070
zzz
erickzhao Jan 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"ignoreCase": true
}
],
"import/no-named-as-default": "error",
// "import/no-named-as-default": "error",
"n/no-process-exit": "off"
},
"overrides": [
Expand All @@ -73,6 +73,11 @@
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript"
],
"settings": {
"import/resolver": {
"typescript": true
}
},
"rules": {
// There is no "recommended" ruleset for tsdoc yet.
"tsdoc/syntax": "warn",
Expand All @@ -95,7 +100,9 @@
"vars": "all"
}
],
"@typescript-eslint/only-throw-error": "error"
"@typescript-eslint/only-throw-error": "error",
"import/default": "off",
"import/no-named-as-default-member": "off"
}
},
{
Expand All @@ -111,7 +118,7 @@
],
"rules": {
"global-require": "off",
"import/no-dynamic-require": "off",
// "import/no-dynamic-require": "off",
"n/no-extraneous-import": "off",
"n/no-unpublished-import": "off",
"n/no-unpublished-require": "off",
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ jobs:
with:
node-version-file: .nvmrc

# TODO(Forge 8): remove this once we can upgrade to `@electron/rebuild` v4
- name: Set up Python 3.11 (with distutils)
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: 3.11

- name: Install dependencies
run: yarn install --immutable

Expand Down Expand Up @@ -85,12 +79,6 @@ jobs:
with:
node-version-file: .nvmrc

# TODO(Forge 8): remove this once we can upgrade to `@electron/rebuild` v4
- name: Set up Python 3.11 (with distutils)
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: 3.11

- name: Use D:\\ drive for Windows
if: runner.os == 'Windows'
shell: bash
Expand Down Expand Up @@ -168,12 +156,6 @@ jobs:
with:
node-version-file: .nvmrc

# TODO(Forge 8): remove this once we can upgrade to `@electron/rebuild` v4
- name: Set up Python 3.11 (with distutils)
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: 3.11

- name: Use D:\\ drive for Windows
if: runner.os == 'Windows'
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .markdownlintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
**/node_modules/**
CHANGELOG.md
CHANGELOG.md
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22
22.18
35 changes: 13 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"version": "0.0.0-development",
"private": true,
"license": "MIT",
"type": "module",
"engines": {
"node": ">= 16.4.0"
"node": ">= 22.12.0"
},
"scripts": {
"clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\" && lerna exec -- \"node -e \\\"fs.rmSync('dist', { recursive: true, force: true })\\\" && node -e \\\"fs.rmSync('tsconfig.tsbuildinfo', { recursive: true, force: true })\\\"\"",
Expand All @@ -31,10 +32,6 @@
"@aws-sdk/client-s3": "^3.654.0",
"@aws-sdk/lib-storage": "^3.654.0",
"@aws-sdk/types": "^3.654.0",
"@electron/get": "^3.0.0",
"@electron/osx-sign": "^1.0.5",
"@electron/packager": "^18.3.5",
"@electron/rebuild": "^3.7.0",
"@google-cloud/storage": "^7.5.0",
"@inquirer/prompts": "^6.0.1",
"@listr2/prompt-adapter-inquirer": "^2.0.22",
Expand All @@ -57,17 +54,13 @@
"find-up": "^5.0.0",
"form-data": "^4.0.0",
"fs-extra": "^10.0.0",
"got": "^11.8.5",
"got": "^14.0.0",
"html-webpack-plugin": "^5.5.3",
"interpret": "^3.1.1",
"jiti": "^2.4.2",
"listr2": "^7.0.2",
"lodash": "^4.17.20",
"log-symbols": "^4.0.0",
"mime-types": "^2.1.25",
"node-fetch": "^2.6.7",
"parse-author": "^2.0.0",
"rechoir": "^0.8.0",
"semver": "^7.2.1",
"source-map-support": "^0.5.13",
"tsx": "^4.21.0",
Expand All @@ -82,22 +75,22 @@
"xterm-addon-search": "^0.8.0"
},
"devDependencies": {
"@electron/fuses": "^1.0.0",
"@electron/fuses": "^2.0.0",
"@electron/lint-roller": "^3.1.3",
"@types/cross-spawn": "^6.0.1",
"@tsconfig/node22": "^22.0.5",
"@types/cross-spawn": "^6.0.6",
"@types/cross-zip": "^4.0.2",
"@types/debug": "^4.1.12",
"@types/express": "^4.17.9",
"@types/express-ws": "^3.0.0",
"@types/fs-extra": "^9.0.6",
"@types/interpret": "^1.1.1",
"@types/keyv": "^3.1.4",
"@types/listr": "^0.14.2",
"@types/lodash": "^4.14.166",
"@types/lodash-es": "^4.17.12",
"@types/mime-types": "^2.1.0",
"@types/minimist": "^1.2.0",
"@types/node": "^18.0.3",
"@types/node-fetch": "^2.5.5",
"@types/rechoir": "^0.6.1",
"@types/node": "^22.10.7",
"@types/semver": "^7.3.4",
"@types/which": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
Expand All @@ -107,6 +100,7 @@
"electron-installer-common": "^0.10.2",
"eslint": "^8.56.0",
"eslint-config-prettier": "^10.0.1",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-n": "^17.15.1",
"eslint-plugin-promise": "^7.2.1",
Expand All @@ -115,17 +109,17 @@
"husky": "^7.0.1",
"lerna": "^9.0.0",
"lint-staged": "^12.1.7",
"lodash-es": "^4.17.21",
"markdownlint-cli2": "^0.19.1",
"minimist": "^1.2.6",
"msw": "^2.7.0",
"prettier": "^3.6.2",
"ref-napi": "^3.0.3",
"typedoc": "0.25.13",
"typescript": "~5.4.5",
"typescript": "5.9.3",
"verdaccio": "^6.2.4",
"vitest": "^4.0.14",
"xvfb-maybe": "^0.2.1",
"yaml-hook": "^1.0.0"
"xvfb-maybe": "^0.2.1"
},
"optionalDependencies": {
"@malept/electron-installer-flatpak": "^0.11.4",
Expand All @@ -138,9 +132,6 @@
"electron-winstaller": "^5.3.0",
"electron-wix-msi": "^5.1.3"
},
"peerDependencies": {
"@electron/fuses": "^1.0.0"
},
"lint-staged": {
"*.{html,json,md,yml}": "prettier --write --experimental-cli",
"*.{js,ts, cjs, mjs, cts, mts}": [
Expand Down
5 changes: 3 additions & 2 deletions packages/api/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@electron-forge/cli",
"version": "8.0.0-alpha.4",
"type": "module",
"description": "A complete tool for building modern Electron applications",
"repository": "https://github.com/electron/forge",
"author": "Samuel Attard",
Expand All @@ -18,7 +19,7 @@
"@electron-forge/core": "workspace:*",
"@electron-forge/core-utils": "workspace:*",
"@electron-forge/shared-types": "workspace:*",
"@electron/get": "^3.0.0",
"@electron/get": "^4.0.2",
"@inquirer/prompts": "^6.0.1",
"@listr2/prompt-adapter-inquirer": "^2.0.22",
"chalk": "^4.0.0",
Expand All @@ -30,7 +31,7 @@
"semver": "^7.2.1"
},
"engines": {
"node": ">= 16.4.0"
"node": ">= 22.12.0"
},
"funding": [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/api/cli/spec/cli.slow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { describe, expect, it } from 'vitest';
function runForgeCLI(...extraArgs: string[]): Promise<string> {
const args = [
'tsx',
path.resolve(__dirname, '../src/electron-forge.ts'),
path.resolve(import.meta.dirname, '../src/electron-forge.ts'),
...extraArgs,
];
return spawn('npx', args);
Expand Down
6 changes: 3 additions & 3 deletions packages/api/cli/src/electron-forge-import.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { api } from '@electron-forge/core';
import { program } from 'commander';

import './util/terminate';
import packageJSON from '../package.json';
import './util/terminate.js';
import packageJSON from '../package.json' with { type: 'json' };

import { resolveWorkingDir } from './util/resolve-working-dir';
import { resolveWorkingDir } from './util/resolve-working-dir.js';

program
.version(packageJSON.version, '-V, --version', 'Output the current version.')
Expand Down
6 changes: 3 additions & 3 deletions packages/api/cli/src/electron-forge-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import { program } from 'commander';
import { Listr } from 'listr2';

import './util/terminate';
import packageJSON from '../package.json';
import './util/terminate.js';
import packageJSON from '../package.json' with { type: 'json' };

import { resolveWorkingDir } from './util/resolve-working-dir';
import { resolveWorkingDir } from './util/resolve-working-dir.js';

// eslint-disable-next-line n/no-extraneous-import -- we get this from `@inquirer/prompts`
import type { Prompt } from '@inquirer/type';
Expand Down Expand Up @@ -84,7 +84,7 @@
}

const packageManager: string = await prompt.run<
Prompt<string, any>

Check warning on line 87 in packages/api/cli/src/electron-forge-init.ts

View workflow job for this annotation

GitHub Actions / lint-and-build

Unexpected any. Specify a different type
>(select, {
message: 'Select a package manager',
choices: [
Expand All @@ -95,7 +95,7 @@
],
});

const bundler: string = await prompt.run<Prompt<string, any>>(

Check warning on line 98 in packages/api/cli/src/electron-forge-init.ts

View workflow job for this annotation

GitHub Actions / lint-and-build

Unexpected any. Specify a different type
select,
{
message: 'Select a bundler',
Expand All @@ -119,7 +119,7 @@
let language: string | undefined;

if (bundler !== 'base') {
language = await prompt.run<Prompt<string | undefined, any>>(

Check warning on line 122 in packages/api/cli/src/electron-forge-init.ts

View workflow job for this annotation

GitHub Actions / lint-and-build

Unexpected any. Specify a different type
select,
{
message: 'Select a programming language',
Expand All @@ -141,7 +141,7 @@
initOpts.template = `${bundler}${language ? `-${language}` : ''}`;

// TODO: add prompt for passing in an exact version as well
initOpts.electronVersion = await prompt.run<Prompt<string, any>>(

Check warning on line 144 in packages/api/cli/src/electron-forge-init.ts

View workflow job for this annotation

GitHub Actions / lint-and-build

Unexpected any. Specify a different type
select,
{
message: 'Select an Electron release',
Expand Down
6 changes: 3 additions & 3 deletions packages/api/cli/src/electron-forge-make.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { api, MakeOptions } from '@electron-forge/core';
import chalk from 'chalk';
import { program } from 'commander';

import './util/terminate';
import packageJSON from '../package.json';
import './util/terminate.js';
import packageJSON from '../package.json' with { type: 'json' };

import { resolveWorkingDir } from './util/resolve-working-dir';
import { resolveWorkingDir } from './util/resolve-working-dir.js';

export async function getMakeOptions(): Promise<MakeOptions> {
let workingDir: string;
Expand Down
6 changes: 3 additions & 3 deletions packages/api/cli/src/electron-forge-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { initializeProxy } from '@electron/get';
import { api, PackageOptions } from '@electron-forge/core';
import { program } from 'commander';

import './util/terminate';
import packageJSON from '../package.json';
import './util/terminate.js';
import packageJSON from '../package.json' with { type: 'json' };

import { resolveWorkingDir } from './util/resolve-working-dir';
import { resolveWorkingDir } from './util/resolve-working-dir.js';

program
.version(packageJSON.version, '-V, --version', 'Output the current version')
Expand Down
8 changes: 4 additions & 4 deletions packages/api/cli/src/electron-forge-publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { api, PublishOptions } from '@electron-forge/core';
import chalk from 'chalk';
import { program } from 'commander';

import './util/terminate';
import packageJSON from '../package.json';
import './util/terminate.js';
import packageJSON from '../package.json' with { type: 'json' };

import { getMakeOptions } from './electron-forge-make';
import { resolveWorkingDir } from './util/resolve-working-dir';
import { getMakeOptions } from './electron-forge-make.js';
import { resolveWorkingDir } from './util/resolve-working-dir.js';

program
.version(packageJSON.version, '-V, --version', 'Output the current version.')
Expand Down
6 changes: 3 additions & 3 deletions packages/api/cli/src/electron-forge-start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { api, StartOptions } from '@electron-forge/core';
import { ElectronProcess } from '@electron-forge/shared-types';
import { Option, program } from 'commander';

import './util/terminate';
import packageJSON from '../package.json';
import './util/terminate.js';
import packageJSON from '../package.json' with { type: 'json' };

import { resolveWorkingDir } from './util/resolve-working-dir';
import { resolveWorkingDir } from './util/resolve-working-dir.js';

(async () => {
let commandArgs = process.argv;
Expand Down
9 changes: 5 additions & 4 deletions packages/api/cli/src/electron-forge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { program } from 'commander';
import logSymbols from 'log-symbols';
import semver from 'semver';

import packageJSON from '../package.json';
import './util/terminate';
import packageJSON from '../package.json' with { type: 'json' };
import './util/terminate.js';

import { checkSystem, SystemCheckContext } from './util/check-system';
import { checkSystem, SystemCheckContext } from './util/check-system.js';

if (!semver.satisfies(process.versions.node, packageJSON.engines.node)) {
console.error(
Expand All @@ -19,7 +19,8 @@ if (!semver.satisfies(process.versions.node, packageJSON.engines.node)) {
process.exit(1);
}

/* eslint-disable-next-line import/order -- Listr2 import contains JS syntax that fails as early as Node 14 */
// Listr2 might be unsupported in certain versions, so import it after the Node version check.
// eslint-disable-next-line import/order
import { Listr } from 'listr2';

program
Expand Down
2 changes: 1 addition & 1 deletion packages/api/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ API as a number of simple JS functions.
import { api } from '@electron-forge/core';

// Package the current directory as an Electron app
api.package(__dirname);
api.package(import.meta.dirname);
```

The named export `api` has it's methods documented over at [ForgeAPI](https://js.electronforge.io/classes/_electron_forge_core.ForgeAPI.html).
Expand Down
3 changes: 0 additions & 3 deletions packages/api/core/helper/dynamic-import.d.ts

This file was deleted.

23 changes: 0 additions & 23 deletions packages/api/core/helper/dynamic-import.js

This file was deleted.

Loading
Loading