From 48c59535f84cd16fb2e44d71f6b75c25c739b993 Mon Sep 17 00:00:00 2001 From: Dan Rose Date: Fri, 31 May 2024 18:48:37 -0500 Subject: [PATCH] fix(docs): update autoupdate docs noting that `channels` work with Github (#8227) --- .changeset/selfish-turtles-fold.md | 13 +++++++++++++ docs/api/electron-builder.md | 2 +- packages/electron-updater/src/AppUpdater.ts | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 .changeset/selfish-turtles-fold.md diff --git a/.changeset/selfish-turtles-fold.md b/.changeset/selfish-turtles-fold.md new file mode 100644 index 00000000000..2b233769416 --- /dev/null +++ b/.changeset/selfish-turtles-fold.md @@ -0,0 +1,13 @@ +--- +"app-builder-lib": patch +"dmg-builder": patch +"electron-builder": patch +"electron-builder-squirrel-windows": patch +"electron-forge-maker-appimage": patch +"electron-forge-maker-nsis": patch +"electron-forge-maker-nsis-web": patch +"electron-forge-maker-snap": patch +"electron-updater": patch +--- + +fix(docs): update autoupdate docs noting that channels work with Github diff --git a/docs/api/electron-builder.md b/docs/api/electron-builder.md index 5d27fcb1c75..0e1071b0ee3 100644 --- a/docs/api/electron-builder.md +++ b/docs/api/electron-builder.md @@ -3397,7 +3397,7 @@ return await getCertInfo(cscFile, cscInfo.password || “”)

currentVersion SemVer - The current application version.

  • -

    channel String | “undefined” - Get the update channel. Not applicable for GitHub. Doesn’t return channel from the update configuration, only if was previously set.

    +

    channel String | “undefined” - Get the update channel. Doesn’t return channel from the update configuration, only if was previously set.

  • requestHeaders [key: string]: string | “undefined” - The request headers.

    diff --git a/packages/electron-updater/src/AppUpdater.ts b/packages/electron-updater/src/AppUpdater.ts index 0405b0cefc3..6d663b108a7 100644 --- a/packages/electron-updater/src/AppUpdater.ts +++ b/packages/electron-updater/src/AppUpdater.ts @@ -123,14 +123,14 @@ export abstract class AppUpdater extends (EventEmitter as new () => TypedEmitter protected downloadedUpdateHelper: DownloadedUpdateHelper | null = null /** - * Get the update channel. Not applicable for GitHub. Doesn't return `channel` from the update configuration, only if was previously set. + * Get the update channel. Doesn't return `channel` from the update configuration, only if was previously set. */ get channel(): string | null { return this._channel } /** - * Set the update channel. Not applicable for GitHub. Overrides `channel` in the update configuration. + * Set the update channel. Overrides `channel` in the update configuration. * * `allowDowngrade` will be automatically set to `true`. If this behavior is not suitable for you, simple set `allowDowngrade` explicitly after. */