From f5d23ef4edce6096759a3e25dfe453366ab72da2 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Thu, 20 Jul 2023 07:12:31 -0700 Subject: [PATCH] fix: add back missing `createLazyProductionDeps` that was missed during revert (#7679) --- .changeset/lazy-buttons-invent.md | 6 ++++++ packages/app-builder-lib/src/util/yarn.ts | 4 ++-- packages/electron-builder/src/cli/install-app-deps.ts | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .changeset/lazy-buttons-invent.md diff --git a/.changeset/lazy-buttons-invent.md b/.changeset/lazy-buttons-invent.md new file mode 100644 index 00000000000..e3abd5aa24e --- /dev/null +++ b/.changeset/lazy-buttons-invent.md @@ -0,0 +1,6 @@ +--- +"app-builder-lib": patch +"electron-builder": patch +--- + +fix: add back missing `createLazyProductionDeps` that was missed during revert diff --git a/packages/app-builder-lib/src/util/yarn.ts b/packages/app-builder-lib/src/util/yarn.ts index e576fc800c5..16718783691 100644 --- a/packages/app-builder-lib/src/util/yarn.ts +++ b/packages/app-builder-lib/src/util/yarn.ts @@ -153,7 +153,7 @@ function isRunningYarn(execPath: string | null | undefined) { export interface RebuildOptions { frameworkInfo: DesktopFrameworkInfo - productionDeps?: Lazy> + productionDeps: Lazy> platform?: NodeJS.Platform arch?: string @@ -166,7 +166,7 @@ export interface RebuildOptions { /** @internal */ export async function rebuild(appDir: string, options: RebuildOptions) { const configuration: any = { - dependencies: await options.productionDeps!.value, + dependencies: await options.productionDeps.value, nodeExecPath: process.execPath, platform: options.platform || process.platform, arch: options.arch || process.arch, diff --git a/packages/electron-builder/src/cli/install-app-deps.ts b/packages/electron-builder/src/cli/install-app-deps.ts index a40f0cf6ab0..9c0694460d1 100644 --- a/packages/electron-builder/src/cli/install-app-deps.ts +++ b/packages/electron-builder/src/cli/install-app-deps.ts @@ -4,6 +4,7 @@ import { getElectronVersion } from "app-builder-lib/out/electron/electronVersion import { computeDefaultAppDirectory, getConfig } from "app-builder-lib/out/util/config" import { installOrRebuild } from "app-builder-lib/out/util/yarn" import { PACKAGE_VERSION } from "app-builder-lib/out/version" +import { createLazyProductionDeps } from "app-builder-lib/src/util/packageDependencies" import { getArchCliNames, log, use } from "builder-util" import { printErrorAndExit } from "builder-util/out/promise" import { readJson } from "fs-extra" @@ -62,6 +63,7 @@ export async function installAppDeps(args: any) { frameworkInfo: { version, useCustomDist: true }, platform: args.platform, arch: args.arch, + productionDeps: createLazyProductionDeps(appDir, null), }, appDir !== projectDir )