19.0.0 (2025-10-15)
Electron Packager 19 introduces many breaking changes in an effort to modernize the codebase.
BREAKING CHANGES
Node.js 22
This package now requires Node.js >=22.12.0.
ESM
This package is now ESM-only.
Note
CommonJS projects can still consume this module via the require(esm)
feature added to Node 22.
asar
is enabled by default
By default, the asar
option is now set to unpack native node modules.
const opts = {
asar: {
unpack: '**/{.**,**}/**/*.node'
}
}
Note
This is equivalent to the behaviour out of the box with any Electron Forge v7 template.
Note
In Electron Packager 19, this is also equivalent to asar: true
.
derefSymlinks
is enabled by default
This was incorrectly documented in most previous versions of Electron Packager. See #1818.
Hooks are promisified and take in a single object argument
Electron Packager's various lifecycle hooks have changed their shape in two ways:
- Hook arguments are now properties on a single JavaScript object rather than individual positional args.
- The
done
callback arg was removed in favour of making hooks asynchronous.
For a trivial example:
// Electron Packager 18
const opts = {
afterExtract: [
(buildPath, electronVersion, platform, arch, callback) => {
setTimeout(() => {
console.log({ buildPath, electronVersion, platform, arch });
callback();
}, 1000);
},
],
};
// Electron Packager 19
const opts = {
afterExtract: [
async ({ buildPath, electronVersion, platform, arch }) => {
await new Promise((resolve) => {
setTimeout(() => {
console.log({ buildPath, electronVersion, platform, arch });
resolve();
}, 1000);
});
},
],
};
What's Changed
- test: migrate from ava to vitest by @erickzhao in #1813
- test: use 120s timeout globally by @erickzhao in #1820
- chore: bump amannn/action-semantic-pull-request from 5.5.3 to 6.1.1 by @dependabot[bot] in #1824
- chore: bump actions/cache from 4.2.3 to 4.2.4 by @dependabot[bot] in #1823
- chore: bump actions/checkout from 4.2.2 to 5.0.0 by @dependabot[bot] in #1822
- ci: upload
/typedoc
folder to packages.electronjs.org by @erickzhao in #1826 - build: ignore fixture package.json in socket by @MarshallOfSound in #1827
- chore: bump vite from 7.1.1 to 7.1.5 by @dependabot[bot] in #1828
- feat!: bump
engines
requirement to Node 22 by @erickzhao in #1821 - feat!: default
derefSymlinks
totrue
by @erickzhao in #1829 - ci: make CI run on any PR by @erickzhao in #1833
- refactor: improve
Options
types by @erickzhao in #1830 - chore(cli)!: remove
--tmpdir=false
flag by @erickzhao in #1834 - chore: bump actions/setup-node from 4.4.0 to 5.0.0 by @dependabot[bot] in #1836
- chore: bump actions/cache from 4.2.4 to 4.3.0 by @dependabot[bot] in #1838
- chore: bump azure/cli from 2.1.0 to 2.2.0 by @dependabot[bot] in #1837
- chore: ignore fixtures from socket while making them uninstallable by @MarshallOfSound in #1839
- chore: upgrade to Yarn v4 by @erickzhao in #1835
- ci: fix setup-node in canary workflow by @dsanders11 in #1840
- feat!: promisify hooks by @erickzhao in #1832
- feat!: enable
asar
by default by @erickzhao in #1841 - fix: allow
tmpdir
to be true by @erickzhao in #1842 - fix: use file paths for dynamic imports by @erickzhao in #1844
- ci: allow
canary.yml
to be called manually by @erickzhao in #1845 - chore: bump brace-expansion from 1.1.11 to 1.1.12 by @dependabot[bot] in #1846
- feat!: force v19 release by @erickzhao in #1847
Full Changelog: v18.4.4...v19.0.0