Skip to content

Commit

Permalink
chore: update Packager (#3419)
Browse files Browse the repository at this point in the history
* chore: update import

* chore: update `@electron/packager` and fix types
  • Loading branch information
erikian authored Dec 18, 2023
1 parent 5fa7ff5 commit 335c388
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 48 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@doyensec/electronegativity": "^1.9.1",
"@electron/get": "^3.0.0",
"@electron/osx-sign": "^1.0.5",
"@electron/packager": "^18.0.0",
"@electron/packager": "^18.1.2",
"@electron/rebuild": "^3.2.10",
"@google-cloud/storage": "^7.5.0",
"@malept/cross-spawn-promise": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@electron-forge/template-webpack-typescript": "7.2.0",
"@electron-forge/tracer": "7.2.0",
"@electron/get": "^3.0.0",
"@electron/packager": "^18.0.0",
"@electron/packager": "^18.1.2",
"@electron/rebuild": "^3.2.10",
"@malept/cross-spawn-promise": "^2.0.0",
"chalk": "^4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/api/core/src/api/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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 { FinalizePackageTargetsHookFunction, HookFunction, Options, packager, TargetDefinition } from '@electron/packager';
import chalk from 'chalk';
import debug from 'debug';
import glob from 'fast-glob';
Expand Down Expand Up @@ -297,7 +297,7 @@ export const listrPackage = (

type PackagerArch = Exclude<ForgeArch, 'arm'>;

const packageOpts: packager.Options = {
const packageOpts: Options = {
asar: false,
overwrite: true,
ignore: [/^\/out\//g],
Expand Down
7 changes: 2 additions & 5 deletions packages/api/core/src/util/parse-archs.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
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');
import { allOfficialArchsForPlatformAndVersion, SupportedPlatform } from '@electron/packager';

export default function parseArchs(platform: ForgePlatform | string, declaredArch: ForgeArch | 'all' | string, electronVersion: string): ForgeArch[] {
if (declaredArch === 'all') {
return allOfficialArchsForPlatformAndVersion(platform, electronVersion) || ['x64'];
return allOfficialArchsForPlatformAndVersion(platform as SupportedPlatform, electronVersion) || ['x64'];
}

return declaredArch.split(',') as ForgeArch[];
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,7 +11,7 @@
"test": "xvfb-maybe mocha --config ../../../.mocharc.js test/**/*_spec.ts test/*_spec.ts"
},
"devDependencies": {
"@electron/packager": "^18.0.0",
"@electron/packager": "^18.1.2",
"@malept/cross-spawn-promise": "^2.0.0",
"@types/node": "^18.0.3",
"chai": "^4.3.3",
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,7 +9,7 @@
"typings": "dist/index.d.ts",
"dependencies": {
"@electron-forge/tracer": "7.2.0",
"@electron/packager": "^18.0.0",
"@electron/packager": "^18.1.2",
"@electron/rebuild": "^3.2.10",
"listr2": "^5.0.3"
},
Expand Down
89 changes: 52 additions & 37 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,15 @@
optionalDependencies:
"@types/glob" "^7.1.1"

"@electron/asar@^3.2.7":
version "3.2.8"
resolved "https://registry.yarnpkg.com/@electron/asar/-/asar-3.2.8.tgz#2ea722f3452583dbd4ffdcc4b4f5dc903f1d8178"
integrity sha512-cmskk5M06ewHMZAplSiF4AlME3IrnnZhKnWbtwKVLRkdJkKyUVjMLhDIiPIx/+6zQWVlKX/LtmK9xDme7540Sg==
dependencies:
commander "^5.0.0"
glob "^7.1.6"
minimatch "^3.0.4"

"@electron/fuses@>=1.0.0":
version "1.6.1"
resolved "https://registry.yarnpkg.com/@electron/fuses/-/fuses-1.6.1.tgz#c639e018202a59e3cd8911fa943e22c63dd3e6fc"
Expand Down Expand Up @@ -1034,16 +1043,17 @@
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==
"@electron/packager@^18.1.2":
version "18.1.2"
resolved "https://registry.yarnpkg.com/@electron/packager/-/packager-18.1.2.tgz#8d7d4f8918deea2bda833a6b5ac1ecea283080be"
integrity sha512-2W5TBNnY+AAx1SMxcawNk1h3blCb8zCmOsatruBCaCYmU+HHzugZ6WgyKXdaaywnLE6OMRQN11Qp5xVpZCgppg==
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"
"@electron/universal" "^2.0.1"
"@electron/windows-sign" "^1.0.0"
cross-spawn-windows-exe "^1.2.0"
debug "^4.0.1"
extract-zip "^2.0.0"
Expand Down Expand Up @@ -1079,18 +1089,27 @@
tar "^6.0.5"
yargs "^17.0.1"

"@electron/universal@^1.3.2":
version "1.3.4"
resolved "https://registry.yarnpkg.com/@electron/universal/-/universal-1.3.4.tgz#bccd94b635d7c85eeed5eabba457eb4ed2be2777"
integrity sha512-BdhBgm2ZBnYyYRLRgOjM5VHkyFItsbggJ0MHycOjKWdFGYwK97ZFXH54dTvUWEfha81vfvwr5On6XBjt99uDcg==
"@electron/universal@^2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@electron/universal/-/universal-2.0.1.tgz#7b070ab355e02957388f3dbd68e2c3cd08c448ae"
integrity sha512-fKpv9kg4SPmt+hY7SVBnIYULE9QJl8L3sCfcBsnqbJwwBwAeTLokJ9TRt9y7bK0JAzIW2y78TVVjvnQEms/yyA==
dependencies:
"@electron/asar" "^3.2.1"
"@malept/cross-spawn-promise" "^1.1.0"
"@electron/asar" "^3.2.7"
"@malept/cross-spawn-promise" "^2.0.0"
debug "^4.3.1"
dir-compare "^3.0.0"
fs-extra "^9.0.1"
minimatch "^3.0.4"
plist "^3.0.4"
dir-compare "^4.2.0"
fs-extra "^11.1.1"
minimatch "^9.0.3"
plist "^3.1.0"

"@electron/windows-sign@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@electron/windows-sign/-/windows-sign-1.0.0.tgz#f08a0a5d4b96840ab637ce11228a59ee8b665287"
integrity sha512-sdkQYAR/TQCEyYgz2jMbusL/ljdj6qA7vyIm/S9HICMAitXhXROFHUOLLgiORj1uiaf2EOB2U33DatGubUuZaQ==
dependencies:
debug "^4.3.4"
fs-extra "^11.1.1"
minimist "^1.2.8"

"@esbuild/[email protected]":
version "0.16.17"
Expand Down Expand Up @@ -4121,11 +4140,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819"
integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==

buffer-equal@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.1.tgz#2f7651be5b1b3f057fcd6e7ee16cf34767077d90"
integrity sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==

buffer-from@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
Expand Down Expand Up @@ -5166,13 +5180,13 @@ diff@^4.0.1:
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==

dir-compare@^3.0.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/dir-compare/-/dir-compare-3.3.0.tgz#2c749f973b5c4b5d087f11edaae730db31788416"
integrity sha512-J7/et3WlGUCxjdnD3HAAzQ6nsnc0WL6DD7WcwJb7c39iH1+AWfg+9OqzJNaI6PkBwBvm1mhZNL9iY/nRiZXlPg==
dir-compare@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/dir-compare/-/dir-compare-4.2.0.tgz#d1d4999c14fbf55281071fdae4293b3b9ce86f19"
integrity sha512-2xMCmOoMrdQIPHdsTawECdNPwlVFB9zGcz3kuhmBO6U3oU+UQjsue0i8ayLKpgBcm+hcXPMVSGUN9d+pvJ6+VQ==
dependencies:
buffer-equal "^1.0.0"
minimatch "^3.0.4"
minimatch "^3.0.5"
p-limit "^3.1.0 "

dir-glob@^3.0.1:
version "3.0.1"
Expand Down Expand Up @@ -6760,6 +6774,15 @@ fs-extra@^11.1.0:
jsonfile "^6.0.1"
universalify "^2.0.0"

fs-extra@^11.1.1:
version "11.2.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b"
integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==
dependencies:
graceful-fs "^4.2.0"
jsonfile "^6.0.1"
universalify "^2.0.0"

fs-extra@^7.0.0, fs-extra@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
Expand Down Expand Up @@ -9393,7 +9416,7 @@ minimatch@^8.0.2:
dependencies:
brace-expansion "^2.0.1"

minimatch@^9.0.0, minimatch@^9.0.1:
minimatch@^9.0.0, minimatch@^9.0.1, minimatch@^9.0.3:
version "9.0.3"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825"
integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==
Expand Down Expand Up @@ -10329,7 +10352,7 @@ p-limit@^2.0.0, p-limit@^2.2.0:
dependencies:
p-try "^2.0.0"

p-limit@^3.0.1, p-limit@^3.0.2:
p-limit@^3.0.1, p-limit@^3.0.2, "p-limit@^3.1.0 ":
version "3.1.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
Expand Down Expand Up @@ -10751,15 +10774,7 @@ plist@^3.0.0:
base64-js "^1.5.1"
xmlbuilder "^9.0.7"

plist@^3.0.4:
version "3.0.6"
resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.6.tgz#7cfb68a856a7834bca6dbfe3218eb9c7740145d3"
integrity sha512-WiIVYyrp8TD4w8yCvyeIr+lkmrGRd5u0VbRnU+tP/aRLxP/YadJUYOMZJ/6hIa3oUyVCsycXvtNRgd5XBJIbiA==
dependencies:
base64-js "^1.5.1"
xmlbuilder "^15.1.1"

plist@^3.0.5:
plist@^3.0.5, plist@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/plist/-/plist-3.1.0.tgz#797a516a93e62f5bde55e0b9cc9c967f860893c9"
integrity sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==
Expand Down

0 comments on commit 335c388

Please sign in to comment.