Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: change electron-packager to @electron/packager #3408

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@electron/get": "^2.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/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
"@electron-forge/template-webpack-typescript": "6.4.2",
"@electron-forge/tracer": "6.4.2",
"@electron/get": "^2.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
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -267,4 +267,4 @@ export default autoTrace(

await runner.run();
}
);
);
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
81 changes: 52 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1229,6 +1229,21 @@
global-agent "^3.0.0"
global-tunnel-ng "^2.7.1"

"@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"
fs-extra "^8.1.0"
got "^11.8.5"
progress "^2.0.3"
semver "^6.2.0"
sumchecker "^3.0.1"
optionalDependencies:
global-agent "^3.0.0"

"@electron/lint-roller@^1.6.0":
version "1.6.0"
resolved "https://registry.yarnpkg.com/@electron/lint-roller/-/lint-roller-1.6.0.tgz#ff92da35379b25bce5cf99310ac541ce6a1500d5"
Expand All @@ -1248,13 +1263,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 +1284,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 @@ -5372,31 +5413,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 @@ -10520,6 +10536,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