From 2e5ded09ff747548540c08851de479e58583344b Mon Sep 17 00:00:00 2001 From: Erick Zhao Date: Thu, 24 Mar 2022 13:39:58 -0700 Subject: [PATCH] `disabled` -> `enabled` --- packages/api/core/src/api/make.ts | 3 ++- .../api/core/test/fixture/app-with-maker-disable/package.json | 2 +- packages/utils/types/src/index.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/api/core/src/api/make.ts b/packages/api/core/src/api/make.ts index b19ffd5f10..16a82c5e55 100644 --- a/packages/api/core/src/api/make.ts +++ b/packages/api/core/src/api/make.ts @@ -118,7 +118,8 @@ export default async ({ if (!maker.platforms.includes(actualTargetPlatform)) continue; } else { const resolvableTarget: IForgeResolvableMaker = target as IForgeResolvableMaker; - if (resolvableTarget.disabled) continue; + // non-false falsy values should be 'true' + if (resolvableTarget.enabled === false) continue; if (!resolvableTarget.name) { throw new Error(`The following maker config is missing a maker name: ${JSON.stringify(resolvableTarget)}`); diff --git a/packages/api/core/test/fixture/app-with-maker-disable/package.json b/packages/api/core/test/fixture/app-with-maker-disable/package.json index 8ab1c2bb19..9dbcb4ddf0 100644 --- a/packages/api/core/test/fixture/app-with-maker-disable/package.json +++ b/packages/api/core/test/fixture/app-with-maker-disable/package.json @@ -5,7 +5,7 @@ "makers": [ { "name": "@electron-forge/maker-zip", - "disabled": true, + "enabled": false, "platforms": [ "linux" ] diff --git a/packages/utils/types/src/index.ts b/packages/utils/types/src/index.ts index 4e98caa879..8d0ba6f814 100644 --- a/packages/utils/types/src/index.ts +++ b/packages/utils/types/src/index.ts @@ -70,7 +70,7 @@ export interface IForgePlugin { } export interface IForgeResolvableMaker { - disabled: boolean; + enabled: boolean; name: string; platforms: ForgePlatform[] | null; config: any; // eslint-disable-line @typescript-eslint/no-explicit-any