Skip to content

Commit

Permalink
feat!: change electron-packager to @electron/packager (#3408)
Browse files Browse the repository at this point in the history
* feat!: change electron-packager to @electron/packager

* chore: don't pin packager, @electron/get -> 3.0.0
  • Loading branch information
VerteDinde authored Nov 15, 2023
1 parent 1aad9e1 commit 4f419f5
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 75 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ With these goals in mind, under the hood this project uses, among others:
- [`@electron/rebuild`](https://github.com/electron/rebuild):
Automatically recompiles native Node.js modules against the correct
Electron version.
- [Electron Packager](https://github.com/electron/electron-packager):
- [`@electron/packager`](https://github.com/electron/packager):
Customizes and bundles your Electron app to get it ready for distribution.

## Contributing
Expand Down
2 changes: 1 addition & 1 deletion SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ feature. Known modules include:

- `@electron/get:*`
- `@electron/osx-sign`
- `@electron/packager`
- `electron-forge:*` (always use this one before filing an issue)
- `electron-installer-debian`
- `electron-installer-dmg`
- `electron-installer-flatpak`
- `electron-installer-redhat`
- `electron-installer-snap:*`
- `electron-packager`
- `electron-rebuild`
- `electron-windows-installer:main`
- `electron-windows-store`
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@
"@aws-sdk/lib-storage": "^3.28.0",
"@aws-sdk/types": "^3.25.0",
"@doyensec/electronegativity": "^1.9.1",
"@electron/get": "^2.0.0",
"@electron/get": "^3.0.0",
"@electron/osx-sign": "^1.0.5",
"@electron/rebuild": "^3.2.10",
"@electron/packager": "^18.0.0",
"@malept/cross-spawn-promise": "^2.0.0",
"@octokit/core": "^3.2.4",
"@octokit/plugin-retry": "^3.0.9",
Expand All @@ -49,7 +50,6 @@
"cross-spawn": "^7.0.3",
"cross-zip": "^4.0.0",
"debug": "^4.3.1",
"electron-packager": "^17.1.2",
"express": "^4.17.1",
"express-ws": "^5.0.2",
"fast-glob": "^3.2.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"dependencies": {
"@electron-forge/core": "6.4.2",
"@electron-forge/shared-types": "6.4.2",
"@electron/get": "^2.0.0",
"@electron/get": "^3.0.0",
"chalk": "^4.0.0",
"commander": "^4.1.1",
"debug": "^4.3.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/api/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
"@electron-forge/template-webpack": "6.4.2",
"@electron-forge/template-webpack-typescript": "6.4.2",
"@electron-forge/tracer": "6.4.2",
"@electron/get": "^2.0.0",
"@electron/get": "^3.0.0",
"@electron/packager": "^18.0.0",
"@electron/rebuild": "^3.2.10",
"@malept/cross-spawn-promise": "^2.0.0",
"chalk": "^4.0.0",
"debug": "^4.3.1",
"electron-packager": "^17.1.2",
"fast-glob": "^3.2.7",
"filenamify": "^4.1.0",
"find-up": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/core/src/api/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ export default autoTrace(
const buildToolPackages: Record<string, string | undefined> = {
'@electron/get': 'already uses this module as a transitive dependency',
'@electron/osx-sign': 'already uses this module as a transitive dependency',
'@electron/packager': 'already uses this module as a transitive dependency',
'electron-builder': 'provides mostly equivalent functionality',
'electron-download': 'already uses this module as a transitive dependency',
'electron-forge': 'replaced with @electron-forge/cli',
'electron-installer-debian': 'already uses this module as a transitive dependency',
'electron-installer-dmg': 'already uses this module as a transitive dependency',
'electron-installer-flatpak': 'already uses this module as a transitive dependency',
'electron-installer-redhat': 'already uses this module as a transitive dependency',
'electron-packager': 'already uses this module as a transitive dependency',
'electron-winstaller': 'already uses this module as a transitive dependency',
};

Expand Down
2 changes: 1 addition & 1 deletion packages/api/core/src/api/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { getElectronVersion, listrCompatibleRebuildHook } from '@electron-forge/
import { ForgeArch, ForgeListrTask, ForgeListrTaskDefinition, ForgeListrTaskFn, ForgePlatform, ResolvedForgeConfig } from '@electron-forge/shared-types';
import { autoTrace, delayTraceTillSignal } from '@electron-forge/tracer';
import { getHostArch } from '@electron/get';
import packager, { FinalizePackageTargetsHookFunction, HookFunction, TargetDefinition } from '@electron/packager';
import chalk from 'chalk';
import debug from 'debug';
import packager, { FinalizePackageTargetsHookFunction, HookFunction, TargetDefinition } from 'electron-packager';
import glob from 'fast-glob';
import fs from 'fs-extra';
import { Listr } from 'listr2';
Expand Down
2 changes: 1 addition & 1 deletion packages/api/core/src/util/parse-archs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ForgeArch, ForgePlatform } from '@electron-forge/shared-types';

// TODO: convert to an import statement when this is a public API
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { allOfficialArchsForPlatformAndVersion } = require('electron-packager/src/targets');
const { allOfficialArchsForPlatformAndVersion } = require('@electron/packager/src/targets');

export default function parseArchs(platform: ForgePlatform | string, declaredArch: ForgeArch | 'all' | string, electronVersion: string): ForgeArch[] {
if (declaredArch === 'all') {
Expand Down
2 changes: 1 addition & 1 deletion packages/maker/flatpak/src/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export interface MakerFlatpakOptionsConfig {
* into the flatpak, and dest should be the path inside the app install
* prefix (e.g. /share/applications/)
*
* Application assets and code will be fully handled by electron-packager,
* Application assets and code will be fully handled by @electron/packager,
* but this is a useful way to install things such as appstream metadata
* for an app, or dbus configuration files.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"test": "xvfb-maybe mocha --config ../../../.mocharc.js test/**/*_spec.ts test/*_spec.ts"
},
"devDependencies": {
"@electron/packager": "^18.0.0",
"@malept/cross-spawn-promise": "^2.0.0",
"@types/node": "^18.0.3",
"chai": "^4.3.3",
"electron-packager": "^17.1.2",
"mocha": "^9.0.1",
"sinon": "^13.0.1",
"which": "^2.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/webpack/test/WebpackPlugin_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as os from 'os';
import * as path from 'path';

import { ResolvedForgeConfig } from '@electron-forge/shared-types';
import { IgnoreFunction } from '@electron/packager';
import { expect } from 'chai';
import { IgnoreFunction } from 'electron-packager';
import * as fs from 'fs-extra';

import { WebpackPluginConfig } from '../src/Config';
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"typings": "dist/index.d.ts",
"dependencies": {
"@electron-forge/tracer": "6.4.2",
"@electron/packager": "^18.0.0",
"@electron/rebuild": "^3.2.10",
"electron-packager": "^17.1.2",
"listr2": "^5.0.3"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/types/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ChildProcess } from 'child_process';

import { autoTrace } from '@electron-forge/tracer';
import { ArchOption, Options as ElectronPackagerOptions, TargetPlatform } from '@electron/packager';
import { RebuildOptions } from '@electron/rebuild';
import { ArchOption, Options as ElectronPackagerOptions, TargetPlatform } from 'electron-packager';
import { ListrDefaultRenderer, ListrTask, ListrTaskWrapper } from 'listr2';

export type ForgeListrTask<T> = ListrTaskWrapper<T, ListrDefaultRenderer>;
Expand Down
104 changes: 44 additions & 60 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1213,10 +1213,10 @@
fs-extra "^9.0.1"
minimist "^1.2.5"

"@electron/get@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@electron/get/-/get-2.0.0.tgz#d991e68dc089fc66b521ec3ca4021515482bef91"
integrity sha512-d0XfNGayKLrYRqddW4f2Zdjaj71LfvZlCnUN8ojyNMr7WD8v6B+fqdCV8Etnwn/vUfFWFwMk/HtLEFZy01h4tQ==
"@electron/get@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@electron/get/-/get-3.0.0.tgz#2b0c794b98902d0bc5218546872c1379bef68aa2"
integrity sha512-hLv4BYFiyrNRI+U0Mm2X7RxCCdJLkDUn8GCEp9QJzbLpZRko+UaLlCjOMkj6TEtirNLPyBA7y1SeGfnpOB21aQ==
dependencies:
debug "^4.1.1"
env-paths "^2.2.0"
Expand All @@ -1227,7 +1227,6 @@
sumchecker "^3.0.1"
optionalDependencies:
global-agent "^3.0.0"
global-tunnel-ng "^2.7.1"

"@electron/lint-roller@^1.6.0":
version "1.6.0"
Expand All @@ -1248,13 +1247,14 @@
vscode-languageserver-textdocument "^1.0.8"
vscode-uri "^3.0.7"

"@electron/notarize@^1.2.3":
version "1.2.3"
resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-1.2.3.tgz#38056a629e5a0b5fd56c975c4828c0f74285b644"
integrity sha512-9oRzT56rKh5bspk3KpAVF8lPKHYQrBnRwcgiOeR0hdilVEQmszDaAu0IPCPrwwzJN0ugNs0rRboTreHMt/6mBQ==
"@electron/notarize@^2.1.0":
version "2.2.0"
resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.2.0.tgz#40455f9d8ca8098a74567aa4613b709089d82657"
integrity sha512-Sf7RG47rafeGuUm+kLEbTXMN8XZeYXN70dMBstrcgiykxCq3SLl1uqxFWndxSI1LfMqv4Eq9PTDHLPwiya31Kg==
dependencies:
debug "^4.1.1"
fs-extra "^9.0.1"
promise-retry "^2.0.1"

"@electron/osx-sign@^1.0.5":
version "1.0.5"
Expand All @@ -1268,6 +1268,31 @@
minimist "^1.2.6"
plist "^3.0.5"

"@electron/packager@^18.0.0":
version "18.0.0"
resolved "https://registry.yarnpkg.com/@electron/packager/-/packager-18.0.0.tgz#073e2b82be44b1bd5e186992ad92f9e41461aad4"
integrity sha512-OihHRTSkMiAuiZISN8h6azFRXgWqLWY/S1OpGru3sBB9Q4lQ0gD3WbqP7MSpFKEFcOozDvIB4LZUyAsfJIRQBg==
dependencies:
"@electron/asar" "^3.2.1"
"@electron/get" "^3.0.0"
"@electron/notarize" "^2.1.0"
"@electron/osx-sign" "^1.0.5"
"@electron/universal" "^1.3.2"
cross-spawn-windows-exe "^1.2.0"
debug "^4.0.1"
extract-zip "^2.0.0"
filenamify "^4.1.0"
fs-extra "^11.1.0"
galactus "^1.0.0"
get-package-info "^1.0.0"
junk "^3.1.0"
parse-author "^2.0.0"
plist "^3.0.0"
rcedit "^4.0.0"
resolve "^1.1.6"
semver "^7.1.3"
yargs-parser "^21.1.1"

"@electron/rebuild@^3.2.10":
version "3.2.10"
resolved "https://registry.yarnpkg.com/@electron/rebuild/-/rebuild-3.2.10.tgz#adc9443179709d4e4b93a68fac6a08b9a3b9e5e6"
Expand Down Expand Up @@ -4677,7 +4702,7 @@ concat-stream@^2.0.0:
readable-stream "^3.0.2"
typedarray "^0.0.6"

config-chain@^1.1.11, config-chain@^1.1.12:
config-chain@^1.1.12:
version "1.1.13"
resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4"
integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==
Expand Down Expand Up @@ -5372,31 +5397,6 @@ electron-installer-snap@^5.2.0:
which "^2.0.1"
yargs "^16.0.2"

electron-packager@^17.1.2:
version "17.1.2"
resolved "https://registry.yarnpkg.com/electron-packager/-/electron-packager-17.1.2.tgz#18030b28024d242b706d0a8a67ed4cd1a57311aa"
integrity sha512-XofXdikjYI7MVBcnXeoOvRR+yFFFHOLs3J7PF5KYQweigtgLshcH4W660PsvHr4lYZ03JBpLyEcUB8DzHZ+BNw==
dependencies:
"@electron/asar" "^3.2.1"
"@electron/get" "^2.0.0"
"@electron/notarize" "^1.2.3"
"@electron/osx-sign" "^1.0.5"
"@electron/universal" "^1.3.2"
cross-spawn-windows-exe "^1.2.0"
debug "^4.0.1"
extract-zip "^2.0.0"
filenamify "^4.1.0"
fs-extra "^11.1.0"
galactus "^1.0.0"
get-package-info "^1.0.0"
junk "^3.1.0"
parse-author "^2.0.0"
plist "^3.0.0"
rcedit "^3.0.1"
resolve "^1.1.6"
semver "^7.1.3"
yargs-parser "^21.1.1"

electron-to-chromium@^1.4.17:
version "1.4.71"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.71.tgz#17056914465da0890ce00351a3b946fd4cd51ff6"
Expand Down Expand Up @@ -5459,7 +5459,7 @@ encode-utf8@^1.0.3:
resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda"
integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==

encodeurl@^1.0.2, encodeurl@~1.0.2:
encodeurl@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
Expand Down Expand Up @@ -7124,16 +7124,6 @@ global-prefix@^1.0.1:
is-windows "^1.0.1"
which "^1.2.14"

global-tunnel-ng@^2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz#d03b5102dfde3a69914f5ee7d86761ca35d57d8f"
integrity sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg==
dependencies:
encodeurl "^1.0.2"
lodash "^4.17.10"
npm-conf "^1.1.3"
tunnel "^0.0.6"

globals@^11.1.0:
version "11.12.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
Expand Down Expand Up @@ -8476,7 +8466,7 @@ lodash.truncate@^4.4.2:
resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193"
integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==

lodash@^4.17.10, lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4:
lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
Expand Down Expand Up @@ -9530,14 +9520,6 @@ npm-bundled@^2.0.0:
dependencies:
npm-normalize-package-bin "^2.0.0"

npm-conf@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9"
integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==
dependencies:
config-chain "^1.1.11"
pify "^3.0.0"

npm-install-checks@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-5.0.0.tgz#5ff27d209a4e3542b8ac6b0c1db6063506248234"
Expand Down Expand Up @@ -10520,6 +10502,13 @@ rcedit@^3.0.1:
dependencies:
cross-spawn-windows-exe "^1.1.0"

rcedit@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/rcedit/-/rcedit-4.0.1.tgz#892ac47a19204a380f49e00ea38ce070443343c2"
integrity sha512-bZdaQi34krFWhrDn+O53ccBDw0MkAT2Vhu75SqhtvhQu4OPyFM4RoVheyYiVQYdjhUi6EJMVWQ0tR6bCIYVkUg==
dependencies:
cross-spawn-windows-exe "^1.1.0"

rcinfo@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/rcinfo/-/rcinfo-0.1.3.tgz#ac36832d1f1e5970c6379e571480ea5826511fc6"
Expand Down Expand Up @@ -11929,11 +11918,6 @@ tsutils@^3.21.0:
dependencies:
tslib "^1.8.1"

tunnel@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c"
integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==

type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
Expand Down

0 comments on commit 4f419f5

Please sign in to comment.