Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@electron/packager

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@electron/packager - npm Package Compare versions

Comparing version
19.0.1
to
19.0.2
+4
-2
dist/hooks.d.ts

@@ -8,4 +8,6 @@ import { FinalizePackageTargetsHookFunction, HookFunction } from './types.js';

* If you need the functions called serially, you can use the `serialHooks` utility function.
*
* The return value can be passed directly to hook options (e.g., `afterCopy`, `afterExtract`).
*/
export declare function serialHooks(hooks: HookFunction[]): (opts: Parameters<HookFunction>[0]) => Promise<void>;
export declare function serialHooks(hooks: FinalizePackageTargetsHookFunction[]): (opts: Parameters<FinalizePackageTargetsHookFunction>[0]) => Promise<void>;
export declare function serialHooks(hooks: HookFunction[]): [HookFunction];
export declare function serialHooks(hooks: FinalizePackageTargetsHookFunction[]): [FinalizePackageTargetsHookFunction];

@@ -10,8 +10,10 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any

export function serialHooks(hooks = []) {
return async function (opts) {
for (const hook of hooks) {
await hook(opts);
}
};
return [
async function (opts) {
for (const hook of hooks) {
await hook(opts);
}
},
];
}
//# sourceMappingURL=hooks.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAUA,8DAA8D;AAC9D,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,KAAsB,EACtB,IAAsB;IAEtB,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,OAAO;IACT,CAAC;IAED,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrD,CAAC;AAaD,8DAA8D;AAC9D,MAAM,UAAU,WAAW,CACzB,QAAa,EAAE;IAEf,OAAO,KAAK,WAAW,IAAsB;QAC3C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAUA,8DAA8D;AAC9D,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,KAAsB,EACtB,IAAsB;IAEtB,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,OAAO;IACT,CAAC;IAED,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrD,CAAC;AAaD,8DAA8D;AAC9D,MAAM,UAAU,WAAW,CACzB,QAAa,EAAE;IAEf,OAAO;QACL,KAAK,WAAW,IAAsB;YACpC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC;QACH,CAAM;KACP,CAAC;AACJ,CAAC"}

@@ -6,8 +6,4 @@ import { CreateOptions as AsarOptions } from '@electron/asar';

import { SignOptions as WindowsSignOptions } from '@electron/windows-sign';
import type { makeUniversalApp } from '@electron/universal';
import type { MakeUniversalOpts } from '@electron/universal';
/**
* @internal
*/
export type MakeUniversalOpts = Parameters<typeof makeUniversalApp>[0];
/**
* Architectures that have been supported by the official Electron prebuilt binaries, past

@@ -38,9 +34,2 @@ * and present.

/**
* A function that is called on the completion of a packaging stage.
*
* By default, the functions are called in parallel (via
* [`Promise.all`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all)).
* If you need the functions called serially, there is a utility function provided. Please note that
* **callback-style functions are not supported by `serialHooks`.**
*
* @param buildPath - For {@link Options.afterExtract | afterExtract}, the path to the temporary folder where the prebuilt

@@ -54,3 +43,17 @@ * Electron binary has been extracted to. For {@link Options.afterCopy | afterCopy} and {@link Options.afterPrune | afterPrune}, the path to the

* @param callback - Must be called once you have completed your actions.
*/
export type HookFunctionArgs = {
buildPath: string;
electronVersion: string;
platform: OfficialPlatform;
arch: OfficialArch;
};
/**
* A function that is called on the completion of a packaging stage.
*
* By default, the functions are called in parallel (via
* [`Promise.all`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all)).
* If you need the functions called serially, there is a utility function provided. Please note that
* **callback-style functions are not supported by `serialHooks`.**
*
* @example

@@ -83,8 +86,3 @@ *

*/
export type HookFunction = (options: {
buildPath: string;
electronVersion: string;
platform: OfficialPlatform;
arch: OfficialArch;
}) => void | Promise<void>;
export type HookFunction = (options: HookFunctionArgs) => void | Promise<void>;
export type TargetDefinition = {

@@ -91,0 +89,0 @@ arch: OfficialArch;

{
"name": "@electron/packager",
"version": "19.0.1",
"version": "19.0.2",
"description": "Customize and package your Electron app with OS-specific bundles (.app, .exe, etc.) via JS or CLI",

@@ -74,3 +74,3 @@ "type": "module",

"tsx": "^4.20.4",
"typedoc": "~0.25.4",
"typedoc": "~0.28.14",
"typescript": "^5.9.2",

@@ -77,0 +77,0 @@ "vitest": "^3.2.4"

@@ -9,2 +9,3 @@ # @electron/packager

[![npm](https://img.shields.io/npm/v/@electron/packager.svg?style=flat)](https://npm.im/@electron/packager)
[![API docs](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fregistry.npmjs.org%2F%40electron%2Fpackager%2Flatest&query=%24.version&logo=typescript&logoColor=white&label=API%20Docs)](https://packages.electronjs.org/packager)
[![Discord](https://img.shields.io/discord/745037351163527189?color=blueviolet&logo=discord)](https://discord.com/invite/APGC3k5yaH)

@@ -15,3 +16,2 @@

[Usage](#usage) |
[API](https://electron.github.io/packager/main/) |
[Contributing](https://github.com/electron/packager/blob/main/CONTRIBUTING.md) |

@@ -70,3 +70,3 @@ [Support](https://github.com/electron/packager/blob/main/SUPPORT.md) |

JavaScript API usage can be found in the [API documentation](https://electron.github.io/packager/main/).
JavaScript API usage can be found in the [API documentation](https://packages.electronjs.org/packager).

@@ -73,0 +73,0 @@ ### From the command line