Skip to content

Commit

Permalink
Merge branch 'master' into azure-signing
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaietta committed Sep 13, 2024
2 parents f0504e1 + 55671bd commit fd0d2a9
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 46 deletions.
6 changes: 6 additions & 0 deletions .changeset/chatty-rice-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"app-builder-lib": patch
"electron-builder": patch
---

fix: correct native dependency tree mismatch in app-builder rebuild
5 changes: 5 additions & 0 deletions .changeset/hungry-lemons-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"builder-util": patch
---

chore(deps): update dependency app-builder-bin to v5.0.0-alpha.8
5 changes: 5 additions & 0 deletions .changeset/late-mirrors-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---

---

chore(deps): update dependency jsdoc-to-markdown to v8.0.3
5 changes: 5 additions & 0 deletions .changeset/long-shrimps-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

chore: update resedit to 1.7.1
5 changes: 5 additions & 0 deletions .changeset/yellow-penguins-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

chore(deps): update dependency @electron/notarize to v2.4.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"globby": "11.1.0",
"husky": "7.0.4",
"jest-cli": "27.5.1",
"jsdoc-to-markdown": "8.0.2",
"jsdoc-to-markdown": "8.0.3",
"lint-staged": "15.2.7",
"markdown2html-pro": "1.0.6",
"path-sort": "0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-builder-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"homepage": "https://github.com/electron-userland/electron-builder",
"dependencies": {
"@develar/schema-utils": "~2.6.5",
"@electron/notarize": "2.3.2",
"@electron/notarize": "2.4.0",
"@electron/osx-sign": "1.3.1",
"@electron/rebuild": "3.6.0",
"@electron/universal": "2.0.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/app-builder-lib/src/packager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ export class Packager {

private nodeDependencyInfo = new Map<string, Lazy<Array<any>>>()

getNodeDependencyInfo(platform: Platform | null): Lazy<Array<NodeModuleInfo | NodeModuleDirInfo>> {
let key = ""
getNodeDependencyInfo(platform: Platform | null, flatten: boolean = true): Lazy<Array<NodeModuleInfo | NodeModuleDirInfo>> {
let key = "" + flatten.toString()
let excludedDependencies: Array<string> | null = null
if (platform != null && this.framework.getExcludedDependencies != null) {
excludedDependencies = this.framework.getExcludedDependencies(platform)
Expand All @@ -145,7 +145,7 @@ export class Packager {

let result = this.nodeDependencyInfo.get(key)
if (result == null) {
result = createLazyProductionDeps(this.appDir, excludedDependencies)
result = createLazyProductionDeps(this.appDir, excludedDependencies, flatten)
this.nodeDependencyInfo.set(key, result)
}
return result
Expand Down Expand Up @@ -543,7 +543,7 @@ export class Packager {
frameworkInfo,
platform: platform.nodeName,
arch: Arch[arch],
productionDeps: this.getNodeDependencyInfo(null) as Lazy<Array<NodeModuleDirInfo>>,
productionDeps: this.getNodeDependencyInfo(null, false) as Lazy<Array<NodeModuleDirInfo>>,
})
}
}
Expand Down
7 changes: 4 additions & 3 deletions packages/app-builder-lib/src/util/packageDependencies.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { Lazy } from "lazy-val"
import { executeAppBuilderAsJson } from "./appBuilder"

export function createLazyProductionDeps(projectDir: string, excludedDependencies: Array<string> | null) {
export function createLazyProductionDeps<T extends boolean>(projectDir: string, excludedDependencies: Array<string> | null, flatten: T) {
return new Lazy(async () => {
const args = ["node-dep-tree", "--flatten", "--dir", projectDir]
const args = ["node-dep-tree", "--dir", projectDir]
if (flatten) args.push("--flatten")
if (excludedDependencies != null) {
for (const name of excludedDependencies) {
args.push("--exclude-dep", name)
}
}
return executeAppBuilderAsJson<Array<any>>(args)
return executeAppBuilderAsJson<Array<T extends true ? NodeModuleInfo : NodeModuleDirInfo>>(args)
})
}

Expand Down
2 changes: 1 addition & 1 deletion packages/builder-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"7zip-bin": "~5.2.0",
"@types/debug": "^4.1.6",
"app-builder-bin": "5.0.0-alpha.7",
"app-builder-bin": "5.0.0-alpha.8",
"bluebird-lst": "^1.0.9",
"builder-util-runtime": "workspace:^9",
"chalk": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/electron-builder/src/cli/install-app-deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export async function installAppDeps(args: any) {
frameworkInfo: { version, useCustomDist: true },
platform: args.platform,
arch: args.arch,
productionDeps: createLazyProductionDeps(appDir, null),
productionDeps: createLazyProductionDeps(appDir, null, false),
},
appDir !== projectDir
)
Expand Down
71 changes: 36 additions & 35 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fd0d2a9

Please sign in to comment.