chore: v27 migration to node22 ESM package#9544
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 75036c3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
dennisameling
referenced
this pull request
in signalapp/Signal-Desktop
Apr 28, 2026
52191a7 to
3b38b0e
Compare
skmedix
reviewed
May 8, 2026
Collaborator
Author
|
For visibility on code line diff count
|
…7 release, migrating the entire `electron-builder` ecosystem to native ES modules and requiring Node.js >=22.12.0. It also removes support for `electron-compile`, updates documentation and configuration files, and adjusts build/test tooling for the new requirements. Most users will only need to upgrade their Node.js version, but some migration steps may be required for projects using deprecated features. **Breaking changes and migration to ESM:** - All packages now use native ES modules (`"type": "module"`), and require Node.js >=22.12.0. CJS `require()` continues to work on supported Node versions, but `electronCompile` support is fully removed. See the new `MIGRATION.md` and updated [README](./README.md) for guidance. - The `electronCompile` configuration option and all related code/schema have been removed. - The four Electron Forge maker plugins are now ESM-only, but their API remains unchanged. **Build and test tooling updates:** - The minimum required Node.js version is now 22.12.0, and the minimum `pnpm` version is 11.1.0. Updated scripts use `tsx` for test scripts instead of `ts-node`. - The `compile` and related scripts have been updated to build all relevant packages in the correct order for ESM. - Added `@tsconfig/node22` to dev dependencies and updated TypeScript and Prettier ignore patterns for new `dist` output. **Package and configuration updates:** - Added a new internal helper package `@electron-builder/app-builder-lib-helpers` for workspace sharing. - Updated `app-builder-lib/package.json` to ESM, with new `exports` and `types` fields, and new build/watch scripts. Updated dependencies and peer dependencies for compatibility. - Updated ESLint configuration for new output paths and relaxed some stylistic rules for test files. **Documentation and workflow changes:** - Added a comprehensive migration guide (`MIGRATION.md`) and updated the main `README.md` to highlight new requirements and usage patterns.
ffd34d9 to
b17711f
Compare
Resolved conflicts by keeping ESM-specific additions (type: module, exports, dist/ paths, Node >=22.12.0 engine) from this branch while accepting master's version bump (26.15.1 → 26.15.3), yarn.ts retry import, and new docs/features/build-lifecycle.md. Regenerated pnpm-lock.yaml via pnpm install.
…sc --build Previously `tsc` and `tsc --build --watch` from the repo root did not work because the per-package `tsconfig.build.json` files had `composite: false`, disqualifying them from TypeScript project references. The compile pipeline was a hand-ordered sequence of per-package `pnpm run build` invocations, and an `incremental: true` attempt introduced a regression where `.tsbuildinfo` landed in the package root (not `dist/`), causing TypeScript to skip emission after `dist/` was cleaned. Changes: - `packages/tsconfig-build.json`: `composite: true` (replaces `composite: false, incremental: false/true`); `composite` implies incremental and with `outDir` set places `.tsbuildinfo` correctly - `.gitignore`: broaden `tsconfig.tsbuildinfo` → `*.tsbuildinfo` to cover the `tsconfig.build.tsbuildinfo` filenames generated per composite project - New root `tsconfig.build.json`: `files: []` + references to all eight package `tsconfig.build.json` files; entry point for `tsc --build` - Each package's `tsconfig.build.json`: added `references` mirroring the existing per-package `tsconfig.json` cross-package dependency graph - Root `compile` script: replaced multi-step `pnpm run -r … build` chain with `pnpm ci:test:generate && tsc --build tsconfig.build.json --force` - Root `compile:watch` script: replaced `pnpm compile && pnpm run -r --parallel watch` with `tsc --build tsconfig.build.json --watch` - Per-package `build`/`watch` scripts: replaced `rmSync + tsc -p …` with `tsc --build tsconfig.build.json --force` / `--watch` - Delete `packageDependencies.ts` (no remaining importers) `tsc --build tsconfig.build.json` and `tsc --build tsconfig.build.json --watch` now work from the repo root. TypeScript enforces build order through the reference graph and correctly surfaces missing-import errors when source files are deleted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d/` tests via TestSuite to split/handle various toolset version combinations)
mmaietta
added a commit
that referenced
this pull request
Jun 19, 2026
Resolve conflicts from the v27 ESM migration (#9544): - linuxPackager.ts: combine ESM imports (.js, builder-util/internal, targets/linux/*) with the desktop-emission pack() override - LinuxTargetHelper.ts (moved to targets/linux/): keep desktop boolean normalization + InvalidConfigurationError for desktop.entry.Exec/Comment alongside master's desktopName validation - platformPackager.ts: cast `this as unknown as LinuxPackager` now that LinuxPackager has extra private members (getHelper/_helper/emittedDesktopFiles) - scheme.json: regenerated (desktop now LinuxDesktopFile | boolean | null) - tests: drop linuxPackagerTest.js.snap (deleted upstream) and reduce linuxPackagerTest.ts to the new archive/desktop coverage; AppImage/icon/ license cases already live in linuxPackagerTestSuite.ts Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces major breaking changes as part of the v27 release, migrating the entire electron-builder ecosystem to native ES modules (ESM) and requiring Node.js >=22.12.0. It removes legacy dependencies, updates package configurations, and improves developer tooling and documentation to reflect these changes. The migration is designed to be as smooth as possible, with continued support for CommonJS (
require()) on supported Node versions, but projects using deprecated features will need to update.Breaking changes and ESM migration:
All packages now use native ES modules (
"type": "module"), and Node.js >=22.12.0 is required. TheelectronCompileconfig option and theelectron-compiledependency are fully removed. The fourelectron-forge-maker-*plugins are now ESM. A comprehensive migration guide is added inMIGRATION.md, and the README is updated with requirements and usage examples for both ESM and CJS.The minimum Node.js version is enforced in
package.json(>=22.12.0) and documentation; CI and workflow files are updated to target Node 22.Package and build system updates:
The build output is moved from
outtodist, and package exports are restructured to provide both public and internal entry points. A new@electron-builder/app-builder-lib-helperspackage is added for workspace-internal sharing.Scripts are updated to use
tsxinstead ofts-node, add new build/watch/typecheck scripts, and handle errors more gracefully in schema generation. ESLint and Prettier ignore patterns are updated to match new output locations.API and schema changes:
The
electronCompileconfiguration option is removed from the JSON schema, and the schema is updated for ESM compatibility.Source files are updated to use explicit ESM imports (with
.jsextensions), and helper scripts are migrated to use dynamicimport()instead ofrequire().Release and versioning changes:
alpha.Documentation improvements: