Skip to content

Commit 99a6150

Browse files
authoredMar 18, 2024··
fix: update autoupdate docs to describe module-based support. set nativeRebuilder default value to use electron/rebuild (#8140)
1 parent ff8f94f commit 99a6150

File tree

6 files changed

+149
-73
lines changed

6 files changed

+149
-73
lines changed
 

‎.changeset/wild-socks-chew.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
fix: update autoupdate docs to describe module-based support. set nativeRebuilder default value to use electron/rebuild

‎docs/auto-update.md

+139-68
Large diffs are not rendered by default.

‎docs/configuration/configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Env file `electron-builder.env` in the current dir ([example](https://github.com
9393
<p><code id="Configuration-npmRebuild">npmRebuild</code> = <code>true</code> Boolean - Whether to <a href="https://docs.npmjs.com/cli/rebuild">rebuild</a> native dependencies before starting to package the app.</p>
9494
</li>
9595
<li>
96-
<p><code id="Configuration-nativeRebuilder">nativeRebuilder</code> = <code>legacy</code> “legacy” | “sequential” | “parallel” | “undefined” - Use <code>legacy</code> app-builder binary for installing native dependencies, or <code>@electron/rebuild</code> in <code>sequential</code> or <code>parallel</code> compilation modes.</p>
96+
<p><code id="Configuration-nativeRebuilder">nativeRebuilder</code> = <code>sequential</code> “legacy” | “sequential” | “parallel” | “undefined” - Use <code>legacy</code> app-builder binary for installing native dependencies, or <code>@electron/rebuild</code> in <code>sequential</code> or <code>parallel</code> compilation modes.</p>
9797
</li>
9898
<li>
9999
<p><code id="Configuration-buildNumber">buildNumber</code> String | “undefined” - The build number. Maps to the <code>--iteration</code> flag for builds using FPM on Linux. If not defined, then it will fallback to <code>BUILD_NUMBER</code> or <code>TRAVIS_BUILD_NUMBER</code> or <code>APPVEYOR_BUILD_NUMBER</code> or <code>CIRCLE_BUILD_NUM</code> or <code>BUILD_BUILDNUMBER</code> or <code>CI_PIPELINE_IID</code> env.</p>

‎packages/app-builder-lib/scheme.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7010,7 +7010,7 @@
70107010
"type": "null"
70117011
}
70127012
],
7013-
"default": "legacy",
7013+
"default": "sequential",
70147014
"description": "Use `legacy` app-builder binary for installing native dependencies, or `@electron/rebuild` in `sequential` or `parallel` compilation modes."
70157015
},
70167016
"nodeGypRebuild": {

‎packages/app-builder-lib/src/configuration.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export interface Configuration extends PlatformSpecificBuildOptions {
133133
readonly npmRebuild?: boolean
134134
/**
135135
* Use `legacy` app-builder binary for installing native dependencies, or `@electron/rebuild` in `sequential` or `parallel` compilation modes.
136-
* @default legacy
136+
* @default sequential
137137
*/
138138
readonly nativeRebuilder?: "legacy" | "sequential" | "parallel" | null
139139

‎packages/app-builder-lib/src/util/yarn.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export async function rebuild(config: Configuration, appDir: string, options: Re
182182
execPath: process.env.npm_execpath || process.env.NPM_CLI_JS,
183183
buildFromSource: options.buildFromSource === true,
184184
}
185-
if ([undefined, null, "legacy"].includes(config.nativeRebuilder)) {
185+
if (config.nativeRebuilder === "legacy") {
186186
const env = getGypEnv(options.frameworkInfo, configuration.platform, configuration.arch, options.buildFromSource === true)
187187
return executeAppBuilderAndWriteJson(["rebuild-node-modules"], configuration, { env, cwd: appDir })
188188
}
@@ -205,7 +205,7 @@ export async function rebuild(config: Configuration, appDir: string, options: Re
205205
arch,
206206
debug: log.isDebugEnabled,
207207
projectRootPath: await getProjectRootPath(appDir),
208-
mode: config.nativeRebuilder as RebuildMode,
208+
mode: (config.nativeRebuilder as RebuildMode) || "sequential",
209209
}
210210
if (buildFromSource) {
211211
rebuildOptions.prebuildTagPrefix = "totally-not-a-real-prefix-to-force-rebuild"

0 commit comments

Comments
 (0)
Please sign in to comment.