Skip to content

feat(core)!: remove rechoir + lodash templates from config loader#4066

Merged
erickzhao merged 3 commits into
nextfrom
remove-rechoir
Dec 5, 2025
Merged

feat(core)!: remove rechoir + lodash templates from config loader#4066
erickzhao merged 3 commits into
nextfrom
remove-rechoir

Conversation

@erickzhao

@erickzhao erickzhao commented Dec 3, 2025

Copy link
Copy Markdown
Member

BREAKING CHANGE: Forge only accepts JS/TS configuration files

@erickzhao erickzhao added the next label Dec 3, 2025
@erickzhao erickzhao requested a review from a team as a code owner December 3, 2025 00:36
@erickzhao erickzhao requested a review from a team December 3, 2025 00:37

@erikian erikian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting Error: Template (base) is not compatible with this version of Electron Forge (7.10.2), it requires 7.7.0 when running tests locally with git clean -dfx && yarn && yarn build && yarn test, maybe the build artifacts we're using on CI are stale?

@@ -366,28 +354,13 @@ describe('forgeConfigIsValidFilePath', () => {
const fixturePath = path.resolve(__dirname, '../../fixture/dummy_js_conf/');
await expect(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this await is no longer necessary


it('fails when a file is nonexistent', async () => {
const fixturePath = path.resolve(__dirname, '../../fixture/dummy_js_conf/');
await expect(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: same here

@MarshallOfSound MarshallOfSound left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the concept, have fun fighting CI

@erickzhao

erickzhao commented Dec 3, 2025

Copy link
Copy Markdown
Member Author

@erikian which tests in particular are failing locally for you? I'm not running into this locally myself with the same steps. 🤔

@erickzhao erickzhao mentioned this pull request Dec 3, 2025
16 tasks
@erikian

erikian commented Dec 3, 2025

Copy link
Copy Markdown
Member

@erikian which tests in particular are failing locally for you? I'm not running into this locally myself with the same steps. 🤔

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 6 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 FAIL   slow  packages/api/core/spec/slow/api.slow.spec.ts > init (with 'npm') > init
 FAIL   slow  packages/api/core/spec/slow/api.slow.spec.ts > init (with 'npm') > Electron Forge API > after init
 FAIL   slow  packages/api/core/spec/slow/api.slow.spec.ts > init (with 'yarn') > init
 FAIL   slow  packages/api/core/spec/slow/api.slow.spec.ts > init (with 'yarn') > Electron Forge API > after init
 FAIL   slow  packages/api/core/spec/slow/api.slow.spec.ts > init (with 'pnpm') > init
 FAIL   slow  packages/api/core/spec/slow/api.slow.spec.ts > init (with 'pnpm') > Electron Forge API > after init
Error: Template (base) is not compatible with this version of Electron Forge (7.10.2), it requires 7.7.0
 ❯ validateTemplate packages/api/core/src/api/init.ts:73:11
     71|   ).version;
     72|   if (!semver.satisfies(forgeVersion, templateModule.requiredForgeVersion)) {
     73|     throw new Error(
       |           ^
     74|       `Template (${template}) is not compatible with this version of Electron Forge (${forgeVersion}), it requires…
     75|     );
 ❯ _Task.task [as taskFn] packages/api/core/src/api/init.ts:155:11
 ❯ _Task.run node_modules/listr2/dist/index.js:1979:11

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/13]⎯


⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 7 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 FAIL   slow  packages/api/core/spec/slow/api.slow.spec.ts > init params > init (with electronVersion) > can define a specific Electron version with a version number
 FAIL   slow  packages/api/core/spec/slow/api.slow.spec.ts > init params > init (with electronVersion) > can define a specific Electron nightly version with a version number
 FAIL   slow  packages/api/core/spec/slow/api.slow.spec.ts > init params > init (with electronVersion) > can define a specific Electron prerelease version with the beta tag
 FAIL   slow  packages/api/core/spec/slow/api.slow.spec.ts > init params > init (with electronVersion) > can define a specific Electron nightly version with the nightly tag
 FAIL   slow  packages/api/core/spec/slow/api.slow.spec.ts > init (with 'npm') > init (with skipGit) > should not initialize a git repo if passed the skipGit option
 FAIL   slow  packages/api/core/spec/slow/api.slow.spec.ts > init (with 'yarn') > init (with skipGit) > should not initialize a git repo if passed the skipGit option
 FAIL   slow  packages/api/core/spec/slow/api.slow.spec.ts > init (with 'pnpm') > init (with skipGit) > should not initialize a git repo if passed the skipGit option
Error: Template (base) is not compatible with this version of Electron Forge (7.10.2), it requires 7.7.0
 ❯ validateTemplate packages/api/core/src/api/init.ts:73:11
     71|   ).version;
     72|   if (!semver.satisfies(forgeVersion, templateModule.requiredForgeVersion)) {
     73|     throw new Error(
       |           ^
     74|       `Template (${template}) is not compatible with this version of Electron Forge (${forgeVersion}), it requires…
     75|     );
 ❯ _Task.task [as taskFn] packages/api/core/src/api/init.ts:155:11
 ❯ _Task.run node_modules/listr2/dist/index.js:1979:11

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/13]⎯


 Test Files  1 failed | 55 passed | 1 skipped (57)
      Tests  7 failed | 413 passed | 58 skipped | 10 todo (488)
   Start at  16:25:59
   Duration  117.59s (transform 470ms, setup 0ms, collect 3.82s, tests 108.18s, environment 4ms, prepare 1.48s)

Failed with exit code: 1
Output:


@erikian

erikian commented Dec 3, 2025

Copy link
Copy Markdown
Member

BTW, do we still need rechoir and interpret for .ts config files to work?

@erickzhao

Copy link
Copy Markdown
Member Author

BTW, do we still need rechoir and interpret for .ts config files to work?

Those should be short-circuited via jiti since #3907

@erickzhao

Copy link
Copy Markdown
Member Author

@erikian I wonder if you have Forge 7.7.0 installed globally by accident and that's polluting the tests. None of our fixtures seem to reference 7.7.0 anywhere in the codebase.

@erikian

erikian commented Dec 5, 2025

Copy link
Copy Markdown
Member

@erickzhao you're right, I do have create-electron-app@7.7.0 installed globally, and tests are passing after removing it.

@erickzhao erickzhao merged commit 35cabfe into next Dec 5, 2025
11 checks passed
@erickzhao erickzhao deleted the remove-rechoir branch December 5, 2025 18:29
@erickzhao erickzhao mentioned this pull request Dec 5, 2025
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants