Skip to content

Commit

Permalink
fix: add back missing createLazyProductionDeps that was missed duri…
Browse files Browse the repository at this point in the history
…ng revert (#7679)
  • Loading branch information
mmaietta committed Jul 20, 2023
1 parent 441da40 commit f5d23ef
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/lazy-buttons-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"app-builder-lib": patch
"electron-builder": patch
---

fix: add back missing `createLazyProductionDeps` that was missed during revert
4 changes: 2 additions & 2 deletions packages/app-builder-lib/src/util/yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function isRunningYarn(execPath: string | null | undefined) {

export interface RebuildOptions {
frameworkInfo: DesktopFrameworkInfo
productionDeps?: Lazy<Array<NodeModuleDirInfo>>
productionDeps: Lazy<Array<NodeModuleDirInfo>>

platform?: NodeJS.Platform
arch?: string
Expand All @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions packages/electron-builder/src/cli/install-app-deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
)
Expand Down

0 comments on commit f5d23ef

Please sign in to comment.