From 458292a6445d22f26bb0e100b5f5ecb48396c536 Mon Sep 17 00:00:00 2001
From: xyloflake
Date: Sun, 4 Aug 2024 03:12:27 +0530
Subject: [PATCH 1/9] feat: implement autoupdates for pacman
---
docs/api/electron-builder.md | 143 ++++++++++++++++++
docs/api/programmatic-usage.md | 2 +-
docs/auto-update.md | 2 +-
.../app-builder-lib/src/targets/FpmTarget.ts | 2 +-
.../electron-updater/src/AppImageUpdater.ts | 2 +-
packages/electron-updater/src/DebUpdater.ts | 2 +-
.../electron-updater/src/PacmanUpdater.ts | 41 +++++
packages/electron-updater/src/RpmUpdater.ts | 2 +-
packages/electron-updater/src/main.ts | 4 +
pnpm-lock.yaml | 2 +-
test/src/ExtraBuildResourcesTest.ts | 2 +-
test/src/updater/linuxUpdaterTest.ts | 8 +-
12 files changed, 202 insertions(+), 10 deletions(-)
create mode 100644 packages/electron-updater/src/PacmanUpdater.ts
diff --git a/docs/api/electron-builder.md b/docs/api/electron-builder.md
index 7b4c0125196..1f4a086d3f1 100644
--- a/docs/api/electron-builder.md
+++ b/docs/api/electron-builder.md
@@ -3216,6 +3216,19 @@ return await getCertInfo(cscFile, cscInfo.password || "")
.isUpdaterActive()
⇒ Boolean
+.PacmanUpdater ⇐ BaseUpdater
+
+
.Provider
.getLatestVersion()
⇒ Promise<module:electron-updater/out/providers/Provider.T>
@@ -4079,6 +4092,136 @@ This is different from the normal quit event sequence.
nsisUpdater.isUpdaterActive()
⇒ Boolean
+
+
+Kind: class of electron-updater
+Extends: BaseUpdater
+
+
+pacmanUpdater.install(isSilent, isForceRunAfter)
⇒ Boolean
+
+
+
+Param |
+
+
+
+
+isSilent |
+
+
+isForceRunAfter |
+
+
+
+
+pacmanUpdater.quitAndInstall(isSilent, isForceRunAfter)
+
+
+
+Param |
+
+
+
+
+isSilent |
+
+
+isForceRunAfter |
+
+
+
+
+
+Shortcut for explicitly adding auth tokens to request headers
+
+
+
+Param |
+Type |
+
+
+
+
+token |
+String |
+
+
+
+
+pacmanUpdater.checkForUpdates()
⇒ Promise< | UpdateCheckResult>
+Asks the server whether there is an update.
+
+pacmanUpdater.checkForUpdatesAndNotify(downloadNotification)
⇒ Promise< | UpdateCheckResult>
+
+
+
+Param |
+Type |
+
+
+
+
+downloadNotification |
+module:electron-updater/out/AppUpdater.DownloadNotification |
+
+
+
+
+pacmanUpdater.downloadUpdate(cancellationToken)
⇒ Promise<Array<String>>
+Start downloading update manually. You can use this method if autoDownload
option is set to false
.
+Returns: Promise<Array<String>>
- Paths to downloaded files.
+
+
+
+Param |
+Type |
+
+
+
+
+cancellationToken |
+CancellationToken |
+
+
+
+
+pacmanUpdater.getFeedURL()
⇒ undefined
| null
| String
+
+pacmanUpdater.setFeedURL(options)
+Configure update provider. If value is string
, GenericServerOptions will be set with value as url
.
+
+
+pacmanUpdater.isUpdaterActive()
⇒ Boolean
Provider
Kind: class of electron-updater
diff --git a/docs/api/programmatic-usage.md b/docs/api/programmatic-usage.md
index fc4883cba83..bf7c517d243 100644
--- a/docs/api/programmatic-usage.md
+++ b/docs/api/programmatic-usage.md
@@ -104,7 +104,7 @@ const options = {
Encoding: "UTF-8",
MimeType: "x-scheme-handler/deeplink"
},
- target: ["AppImage", "rpm", "deb"]
+ target: ["AppImage", "rpm", "deb", "pacman"]
},
deb: {
priority: "optional",
diff --git a/docs/auto-update.md b/docs/auto-update.md
index 9ba9623a91e..978789d3089 100644
--- a/docs/auto-update.md
+++ b/docs/auto-update.md
@@ -14,7 +14,7 @@ Read the remainder of this guide to configure everything.
## Auto-updatable Targets
* macOS: DMG.
-* Linux: AppImage, DEB and RPM.
+* Linux: AppImage, DEB, Pacman And RPM.
* Windows: NSIS.
All these targets are default, custom configuration is not required. (Though it is possible to [pass in additional configuration, e.g. request headers](#custom-options-instantiating-updater-directly).)
diff --git a/packages/app-builder-lib/src/targets/FpmTarget.ts b/packages/app-builder-lib/src/targets/FpmTarget.ts
index 9684d6005d5..0d59677323e 100644
--- a/packages/app-builder-lib/src/targets/FpmTarget.ts
+++ b/packages/app-builder-lib/src/targets/FpmTarget.ts
@@ -278,7 +278,7 @@ export default class FpmTarget extends Target {
}
private supportsAutoUpdate(target: string) {
- return ["deb", "rpm"].includes(target)
+ return ["deb", "rpm", "pacman"].includes(target)
}
}
diff --git a/packages/electron-updater/src/AppImageUpdater.ts b/packages/electron-updater/src/AppImageUpdater.ts
index a8cc747e79a..a498ac13bee 100644
--- a/packages/electron-updater/src/AppImageUpdater.ts
+++ b/packages/electron-updater/src/AppImageUpdater.ts
@@ -30,7 +30,7 @@ export class AppImageUpdater extends BaseUpdater {
/*** @private */
protected doDownloadUpdate(downloadUpdateOptions: DownloadUpdateOptions): Promise> {
const provider = downloadUpdateOptions.updateInfoAndProvider.provider
- const fileInfo = findFile(provider.resolveFiles(downloadUpdateOptions.updateInfoAndProvider.info), "AppImage", ["rpm", "deb"])!
+ const fileInfo = findFile(provider.resolveFiles(downloadUpdateOptions.updateInfoAndProvider.info), "AppImage", ["rpm", "deb", "pacman"])!
return this.executeDownload({
fileExtension: "AppImage",
fileInfo,
diff --git a/packages/electron-updater/src/DebUpdater.ts b/packages/electron-updater/src/DebUpdater.ts
index 19705a72ea2..52e618dae87 100644
--- a/packages/electron-updater/src/DebUpdater.ts
+++ b/packages/electron-updater/src/DebUpdater.ts
@@ -13,7 +13,7 @@ export class DebUpdater extends BaseUpdater {
/*** @private */
protected doDownloadUpdate(downloadUpdateOptions: DownloadUpdateOptions): Promise> {
const provider = downloadUpdateOptions.updateInfoAndProvider.provider
- const fileInfo = findFile(provider.resolveFiles(downloadUpdateOptions.updateInfoAndProvider.info), "deb", ["AppImage", "rpm"])!
+ const fileInfo = findFile(provider.resolveFiles(downloadUpdateOptions.updateInfoAndProvider.info), "deb", ["AppImage", "rpm", "pacman"])!
return this.executeDownload({
fileExtension: "deb",
fileInfo,
diff --git a/packages/electron-updater/src/PacmanUpdater.ts b/packages/electron-updater/src/PacmanUpdater.ts
new file mode 100644
index 00000000000..61c9b9e8406
--- /dev/null
+++ b/packages/electron-updater/src/PacmanUpdater.ts
@@ -0,0 +1,41 @@
+import { AllPublishOptions } from "builder-util-runtime"
+import { AppAdapter } from "./AppAdapter"
+import { DownloadUpdateOptions } from "./AppUpdater"
+import { BaseUpdater, InstallOptions } from "./BaseUpdater"
+import { DOWNLOAD_PROGRESS } from "./main"
+import { findFile } from "./providers/Provider"
+
+export class PacmanUpdater extends BaseUpdater {
+ constructor(options?: AllPublishOptions | null, app?: AppAdapter) {
+ super(options, app)
+ }
+
+ /*** @private */
+ protected doDownloadUpdate(downloadUpdateOptions: DownloadUpdateOptions): Promise> {
+ const provider = downloadUpdateOptions.updateInfoAndProvider.provider
+ const fileInfo = findFile(provider.resolveFiles(downloadUpdateOptions.updateInfoAndProvider.info), "pacman", ["AppImage", "deb", "rpm"])!
+ return this.executeDownload({
+ fileExtension: "pacman",
+ fileInfo,
+ downloadUpdateOptions,
+ task: async (updateFile, downloadOptions) => {
+ if (this.listenerCount(DOWNLOAD_PROGRESS) > 0) {
+ downloadOptions.onProgress = it => this.emit(DOWNLOAD_PROGRESS, it)
+ }
+ await this.httpExecutor.download(fileInfo.url, updateFile, downloadOptions)
+ },
+ })
+ }
+
+ protected doInstall(options: InstallOptions): boolean {
+ const sudo = this.wrapSudo()
+ // pkexec doesn't want the command to be wrapped in " quotes
+ const wrapper = /pkexec/i.test(sudo) ? "" : `"`
+ const cmd = ["pacman", "-U", "--noconfirm", options.installerPath]
+ this.spawnSyncLog(sudo, [`${wrapper}/bin/bash`, "-c", `'${cmd.join(" ")}'${wrapper}`])
+ if (options.isForceRunAfter) {
+ this.app.relaunch()
+ }
+ return true
+ }
+}
diff --git a/packages/electron-updater/src/RpmUpdater.ts b/packages/electron-updater/src/RpmUpdater.ts
index 201170ad783..035a92c25cd 100644
--- a/packages/electron-updater/src/RpmUpdater.ts
+++ b/packages/electron-updater/src/RpmUpdater.ts
@@ -13,7 +13,7 @@ export class RpmUpdater extends BaseUpdater {
/*** @private */
protected doDownloadUpdate(downloadUpdateOptions: DownloadUpdateOptions): Promise> {
const provider = downloadUpdateOptions.updateInfoAndProvider.provider
- const fileInfo = findFile(provider.resolveFiles(downloadUpdateOptions.updateInfoAndProvider.info), "rpm", ["AppImage", "deb"])!
+ const fileInfo = findFile(provider.resolveFiles(downloadUpdateOptions.updateInfoAndProvider.info), "rpm", ["AppImage", "deb", "pacman"])!
return this.executeDownload({
fileExtension: "rpm",
fileInfo,
diff --git a/packages/electron-updater/src/main.ts b/packages/electron-updater/src/main.ts
index 33f03bf5576..ae7055d0e97 100644
--- a/packages/electron-updater/src/main.ts
+++ b/packages/electron-updater/src/main.ts
@@ -12,6 +12,7 @@ export { CancellationToken, PackageFileInfo, ProgressInfo, UpdateFileInfo, Updat
export { Provider } from "./providers/Provider"
export { AppImageUpdater } from "./AppImageUpdater"
export { DebUpdater } from "./DebUpdater"
+export { PacmanUpdater } from "./PacmanUpdater"
export { RpmUpdater } from "./RpmUpdater"
export { MacUpdater } from "./MacUpdater"
export { NsisUpdater } from "./NsisUpdater"
@@ -45,6 +46,9 @@ function doLoadAutoUpdater(): AppUpdater {
case "rpm":
_autoUpdater = new (require("./RpmUpdater").RpmUpdater)()
break
+ case "pacman":
+ _autoUpdater = new (require("./PacmanUpdater").PacmanUpdater)()
+ break
default:
break
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8d5399b5a79..2997c7239df 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -5831,7 +5831,7 @@ packages:
puppeteer@2.1.1:
resolution: {integrity: sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg==}
engines: {node: '>=8.16.0'}
- deprecated: < 22.6.4 is no longer supported
+ deprecated: < 22.8.2 is no longer supported
q@1.5.1:
resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==}
diff --git a/test/src/ExtraBuildResourcesTest.ts b/test/src/ExtraBuildResourcesTest.ts
index 619790d701f..acf5be8abbb 100644
--- a/test/src/ExtraBuildResourcesTest.ts
+++ b/test/src/ExtraBuildResourcesTest.ts
@@ -119,7 +119,7 @@ test.ifAll.ifNotWindows(
publish: null,
// https://github.com/electron-userland/electron-builder/issues/1355
linux: {
- target: ["AppImage", "deb", "rpm"],
+ target: ["AppImage", "deb", "rpm", "pacman"],
},
compression: "store",
},
diff --git a/test/src/updater/linuxUpdaterTest.ts b/test/src/updater/linuxUpdaterTest.ts
index 86611bc28de..5736415dbb0 100644
--- a/test/src/updater/linuxUpdaterTest.ts
+++ b/test/src/updater/linuxUpdaterTest.ts
@@ -1,9 +1,9 @@
import { GithubOptions } from "builder-util-runtime"
-import { DebUpdater, RpmUpdater } from "electron-updater"
+import { DebUpdater, RpmUpdater, PacmanUpdater } from "electron-updater"
import { assertThat } from "../helpers/fileAssert"
import { createTestAppAdapter, tuneTestUpdater, validateDownload, writeUpdateConfig } from "../helpers/updaterTestUtil"
-const runTest = async (updaterClass: any, expectedExtension: "deb" | "rpm" | "AppImage") => {
+const runTest = async (updaterClass: any, expectedExtension: "deb" | "rpm" | "AppImage" | "pacman") => {
const testAppAdapter = await createTestAppAdapter("1.0.1")
const updater = new updaterClass(null, testAppAdapter)
tuneTestUpdater(updater, { platform: "linux" })
@@ -29,6 +29,10 @@ test("test rpm download", async () => {
await runTest(RpmUpdater, "rpm")
})
+test("test pacman download", async () => {
+ await runTest(PacmanUpdater, "pacman")
+})
+
test("test deb download", async () => {
await runTest(DebUpdater, "deb")
})
From e0f41a859f1df20c1ca8028a108b0329650234ed Mon Sep 17 00:00:00 2001
From: xyloflake
Date: Sun, 4 Aug 2024 03:24:14 +0530
Subject: [PATCH 2/9] add changeset
---
.changeset/curly-bats-call.md | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 .changeset/curly-bats-call.md
diff --git a/.changeset/curly-bats-call.md b/.changeset/curly-bats-call.md
new file mode 100644
index 00000000000..bf8e4b027a0
--- /dev/null
+++ b/.changeset/curly-bats-call.md
@@ -0,0 +1,6 @@
+---
+"app-builder-lib": minor
+"electron-updater": minor
+---
+
+[feat.] Implement autoupdates for pacman
From 8fc4c1c387c5de8a9a06b03cb422688e986b4ade Mon Sep 17 00:00:00 2001
From: xyloflake
Date: Wed, 7 Aug 2024 18:53:47 +0530
Subject: [PATCH 3/9] Update changeset
---
.changeset/angry-cycles-kick.md | 5 -----
.changeset/brown-singers-breathe.md | 5 -----
.changeset/{curly-bats-call.md => modern-snails-fix.md} | 2 +-
3 files changed, 1 insertion(+), 11 deletions(-)
delete mode 100644 .changeset/angry-cycles-kick.md
delete mode 100644 .changeset/brown-singers-breathe.md
rename .changeset/{curly-bats-call.md => modern-snails-fix.md} (59%)
diff --git a/.changeset/angry-cycles-kick.md b/.changeset/angry-cycles-kick.md
deleted file mode 100644
index 065a34e2e48..00000000000
--- a/.changeset/angry-cycles-kick.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"electron-updater": minor
----
-
-Handle Linux deb auto update installation on applications having spaces in `artifactName`.
diff --git a/.changeset/brown-singers-breathe.md b/.changeset/brown-singers-breathe.md
deleted file mode 100644
index 3373a4016d9..00000000000
--- a/.changeset/brown-singers-breathe.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"app-builder-lib": patch
----
-
-Automatically place .node files into app.asar.unpack
diff --git a/.changeset/curly-bats-call.md b/.changeset/modern-snails-fix.md
similarity index 59%
rename from .changeset/curly-bats-call.md
rename to .changeset/modern-snails-fix.md
index bf8e4b027a0..e95c69cb84d 100644
--- a/.changeset/curly-bats-call.md
+++ b/.changeset/modern-snails-fix.md
@@ -3,4 +3,4 @@
"electron-updater": minor
---
-[feat.] Implement autoupdates for pacman
+Implement auto-updates for pacman
From 56279b4fb09da2166bbc521f94b0a3a41786d891 Mon Sep 17 00:00:00 2001
From: Xyloflake
Date: Thu, 8 Aug 2024 02:26:51 +0000
Subject: [PATCH 4/9] Revert "Update changeset"
This reverts commit 8fc4c1c387c5de8a9a06b03cb422688e986b4ade.
---
.changeset/angry-cycles-kick.md | 5 +++++
.changeset/brown-singers-breathe.md | 5 +++++
.changeset/{modern-snails-fix.md => curly-bats-call.md} | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
create mode 100644 .changeset/angry-cycles-kick.md
create mode 100644 .changeset/brown-singers-breathe.md
rename .changeset/{modern-snails-fix.md => curly-bats-call.md} (59%)
diff --git a/.changeset/angry-cycles-kick.md b/.changeset/angry-cycles-kick.md
new file mode 100644
index 00000000000..065a34e2e48
--- /dev/null
+++ b/.changeset/angry-cycles-kick.md
@@ -0,0 +1,5 @@
+---
+"electron-updater": minor
+---
+
+Handle Linux deb auto update installation on applications having spaces in `artifactName`.
diff --git a/.changeset/brown-singers-breathe.md b/.changeset/brown-singers-breathe.md
new file mode 100644
index 00000000000..3373a4016d9
--- /dev/null
+++ b/.changeset/brown-singers-breathe.md
@@ -0,0 +1,5 @@
+---
+"app-builder-lib": patch
+---
+
+Automatically place .node files into app.asar.unpack
diff --git a/.changeset/modern-snails-fix.md b/.changeset/curly-bats-call.md
similarity index 59%
rename from .changeset/modern-snails-fix.md
rename to .changeset/curly-bats-call.md
index e95c69cb84d..bf8e4b027a0 100644
--- a/.changeset/modern-snails-fix.md
+++ b/.changeset/curly-bats-call.md
@@ -3,4 +3,4 @@
"electron-updater": minor
---
-Implement auto-updates for pacman
+[feat.] Implement autoupdates for pacman
From 4223bd6c7e50991245123bd2ed7a90c01a4e499c Mon Sep 17 00:00:00 2001
From: Mike Maietta
Date: Sun, 8 Sep 2024 14:27:29 -0700
Subject: [PATCH 5/9] updating snapshot
---
.../updater/linuxUpdaterTest.js.snap | 121 +++++++++++++-----
1 file changed, 87 insertions(+), 34 deletions(-)
diff --git a/test/snapshots/updater/linuxUpdaterTest.js.snap b/test/snapshots/updater/linuxUpdaterTest.js.snap
index c8476972bc6..c049878205e 100644
--- a/test/snapshots/updater/linuxUpdaterTest.js.snap
+++ b/test/snapshots/updater/linuxUpdaterTest.js.snap
@@ -4,29 +4,34 @@ exports[`test deb download 1`] = `
Object {
"files": Array [
Object {
- "blockMapSize": 83221,
- "sha512": "3aexf/dJdq/59UstA8MhJuDTe6WYMqmuHdTwpYJiElC7b+wuscjg44T9DS0wP0L/JVe/6bbys1O7kPYQZOPCrg==",
- "size": 79889665,
- "url": "electron-quick-start-typescript-1.0.3-x86_64.AppImage",
+ "blockMapSize": 82581,
+ "sha512": "u6MIxgkAyGQJNoQh/xZaVN2quQ7+So3t5RXnA2RspDuF0PiMk4q3xE5DhjnTdYCUpFANykEyt/QfmSriGoRamw==",
+ "size": 79016577,
+ "url": "electron-quick-start-typescript-1.0.4-x86_64.AppImage",
},
Object {
- "sha512": "iWuuVzFj0P9HKxvsOPiCBSIfq0+yABHYBnNH/+JXHc+Z04dC+ZavPSxIC2OL+IUOL1+584LPi1e31fDwt8RNJg==",
- "size": 56602934,
- "url": "electron-quick-start-typescript-1.0.3-amd64.deb",
+ "sha512": "TUEgrKUlS8RGFW86GlN8YZpuAK5TL0pbVDERmAvv5dPOHXI9VbvrlDEEwCzn0NYrvajVQW03jz64Ik5mhRSCvg==",
+ "size": 56079686,
+ "url": "electron-quick-start-typescript-1.0.4-amd64.deb",
},
Object {
- "sha512": "Ue321YyA6n1NyrVoeIBbO0Jack49JI6m2vhd95GPswzcbz1gKJ97qZW1CH59u9t6xILRX+Zy0FsMswWrAbkNOA==",
- "size": 56545685,
- "url": "electron-quick-start-typescript-1.0.3-x86_64.rpm",
+ "sha512": "RRTErNJKHJX+tfxSzE0EItjPgd+Oh7t4okaaRS4EveokyQp1fZgheLmPuxOft4ptKqjZCvFW+m200rvJRuYcWg==",
+ "size": 56055361,
+ "url": "electron-quick-start-typescript-1.0.4-x86_64.rpm",
+ },
+ Object {
+ "sha512": "2mUqhYKCSlAw1aWUNz2707tsqcp2/xSAsVrUVZtKZyfZEzGus63L/A5sW963i1jfuzrWk0HfdyUqYNFNS2HSWA==",
+ "size": 56075488,
+ "url": "electron-quick-start-typescript-1.0.4-x64.pacman",
},
],
- "path": "electron-quick-start-typescript-1.0.3-x86_64.AppImage",
- "releaseDate": "2022-08-16T04:24:52.260Z",
- "releaseName": "1.0.3",
- "releaseNotes": "",
- "sha512": "3aexf/dJdq/59UstA8MhJuDTe6WYMqmuHdTwpYJiElC7b+wuscjg44T9DS0wP0L/JVe/6bbys1O7kPYQZOPCrg==",
- "tag": "v1.0.3",
- "version": "1.0.3",
+ "path": "electron-quick-start-typescript-1.0.4-x86_64.AppImage",
+ "releaseDate": "2024-09-08T16:57:10.775Z",
+ "releaseName": "1.0.4",
+ "releaseNotes": "pacman autoupdate release added
",
+ "sha512": "u6MIxgkAyGQJNoQh/xZaVN2quQ7+So3t5RXnA2RspDuF0PiMk4q3xE5DhjnTdYCUpFANykEyt/QfmSriGoRamw==",
+ "tag": "v1.0.4",
+ "version": "1.0.4",
}
`;
@@ -38,33 +43,81 @@ Array [
]
`;
+exports[`test pacman download 1`] = `
+Object {
+ "files": Array [
+ Object {
+ "blockMapSize": 82581,
+ "sha512": "u6MIxgkAyGQJNoQh/xZaVN2quQ7+So3t5RXnA2RspDuF0PiMk4q3xE5DhjnTdYCUpFANykEyt/QfmSriGoRamw==",
+ "size": 79016577,
+ "url": "electron-quick-start-typescript-1.0.4-x86_64.AppImage",
+ },
+ Object {
+ "sha512": "TUEgrKUlS8RGFW86GlN8YZpuAK5TL0pbVDERmAvv5dPOHXI9VbvrlDEEwCzn0NYrvajVQW03jz64Ik5mhRSCvg==",
+ "size": 56079686,
+ "url": "electron-quick-start-typescript-1.0.4-amd64.deb",
+ },
+ Object {
+ "sha512": "RRTErNJKHJX+tfxSzE0EItjPgd+Oh7t4okaaRS4EveokyQp1fZgheLmPuxOft4ptKqjZCvFW+m200rvJRuYcWg==",
+ "size": 56055361,
+ "url": "electron-quick-start-typescript-1.0.4-x86_64.rpm",
+ },
+ Object {
+ "sha512": "2mUqhYKCSlAw1aWUNz2707tsqcp2/xSAsVrUVZtKZyfZEzGus63L/A5sW963i1jfuzrWk0HfdyUqYNFNS2HSWA==",
+ "size": 56075488,
+ "url": "electron-quick-start-typescript-1.0.4-x64.pacman",
+ },
+ ],
+ "path": "electron-quick-start-typescript-1.0.4-x86_64.AppImage",
+ "releaseDate": "2024-09-08T16:57:10.775Z",
+ "releaseName": "1.0.4",
+ "releaseNotes": "pacman autoupdate release added
",
+ "sha512": "u6MIxgkAyGQJNoQh/xZaVN2quQ7+So3t5RXnA2RspDuF0PiMk4q3xE5DhjnTdYCUpFANykEyt/QfmSriGoRamw==",
+ "tag": "v1.0.4",
+ "version": "1.0.4",
+}
+`;
+
+exports[`test pacman download 2`] = `
+Array [
+ "checking-for-update",
+ "update-available",
+ "update-downloaded",
+]
+`;
+
exports[`test rpm download 1`] = `
Object {
"files": Array [
Object {
- "blockMapSize": 83221,
- "sha512": "3aexf/dJdq/59UstA8MhJuDTe6WYMqmuHdTwpYJiElC7b+wuscjg44T9DS0wP0L/JVe/6bbys1O7kPYQZOPCrg==",
- "size": 79889665,
- "url": "electron-quick-start-typescript-1.0.3-x86_64.AppImage",
+ "blockMapSize": 82581,
+ "sha512": "u6MIxgkAyGQJNoQh/xZaVN2quQ7+So3t5RXnA2RspDuF0PiMk4q3xE5DhjnTdYCUpFANykEyt/QfmSriGoRamw==",
+ "size": 79016577,
+ "url": "electron-quick-start-typescript-1.0.4-x86_64.AppImage",
+ },
+ Object {
+ "sha512": "TUEgrKUlS8RGFW86GlN8YZpuAK5TL0pbVDERmAvv5dPOHXI9VbvrlDEEwCzn0NYrvajVQW03jz64Ik5mhRSCvg==",
+ "size": 56079686,
+ "url": "electron-quick-start-typescript-1.0.4-amd64.deb",
},
Object {
- "sha512": "iWuuVzFj0P9HKxvsOPiCBSIfq0+yABHYBnNH/+JXHc+Z04dC+ZavPSxIC2OL+IUOL1+584LPi1e31fDwt8RNJg==",
- "size": 56602934,
- "url": "electron-quick-start-typescript-1.0.3-amd64.deb",
+ "sha512": "RRTErNJKHJX+tfxSzE0EItjPgd+Oh7t4okaaRS4EveokyQp1fZgheLmPuxOft4ptKqjZCvFW+m200rvJRuYcWg==",
+ "size": 56055361,
+ "url": "electron-quick-start-typescript-1.0.4-x86_64.rpm",
},
Object {
- "sha512": "Ue321YyA6n1NyrVoeIBbO0Jack49JI6m2vhd95GPswzcbz1gKJ97qZW1CH59u9t6xILRX+Zy0FsMswWrAbkNOA==",
- "size": 56545685,
- "url": "electron-quick-start-typescript-1.0.3-x86_64.rpm",
+ "sha512": "2mUqhYKCSlAw1aWUNz2707tsqcp2/xSAsVrUVZtKZyfZEzGus63L/A5sW963i1jfuzrWk0HfdyUqYNFNS2HSWA==",
+ "size": 56075488,
+ "url": "electron-quick-start-typescript-1.0.4-x64.pacman",
},
],
- "path": "electron-quick-start-typescript-1.0.3-x86_64.AppImage",
- "releaseDate": "2022-08-16T04:24:52.260Z",
- "releaseName": "1.0.3",
- "releaseNotes": "",
- "sha512": "3aexf/dJdq/59UstA8MhJuDTe6WYMqmuHdTwpYJiElC7b+wuscjg44T9DS0wP0L/JVe/6bbys1O7kPYQZOPCrg==",
- "tag": "v1.0.3",
- "version": "1.0.3",
+ "path": "electron-quick-start-typescript-1.0.4-x86_64.AppImage",
+ "releaseDate": "2024-09-08T16:57:10.775Z",
+ "releaseName": "1.0.4",
+ "releaseNotes": "pacman autoupdate release added
",
+ "sha512": "u6MIxgkAyGQJNoQh/xZaVN2quQ7+So3t5RXnA2RspDuF0PiMk4q3xE5DhjnTdYCUpFANykEyt/QfmSriGoRamw==",
+ "tag": "v1.0.4",
+ "version": "1.0.4",
}
`;
From 28dc77fcb12c0ac4ac5f19c930983c59105b0cc7 Mon Sep 17 00:00:00 2001
From: Mike Maietta
Date: Sun, 8 Sep 2024 14:32:11 -0700
Subject: [PATCH 6/9] regenerate changeset
---
.changeset/{curly-bats-call.md => yellow-snakes-sneeze.md} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename .changeset/{curly-bats-call.md => yellow-snakes-sneeze.md} (59%)
diff --git a/.changeset/curly-bats-call.md b/.changeset/yellow-snakes-sneeze.md
similarity index 59%
rename from .changeset/curly-bats-call.md
rename to .changeset/yellow-snakes-sneeze.md
index bf8e4b027a0..806bc96bfab 100644
--- a/.changeset/curly-bats-call.md
+++ b/.changeset/yellow-snakes-sneeze.md
@@ -3,4 +3,4 @@
"electron-updater": minor
---
-[feat.] Implement autoupdates for pacman
+feat: Implement autoupdates for pacman
From 4415c64773c2c193072611a2571598ad3fd887cd Mon Sep 17 00:00:00 2001
From: Mike Maietta
Date: Sun, 8 Sep 2024 14:33:25 -0700
Subject: [PATCH 7/9] adjust docs to show beta flag for pacman
---
docs/auto-update.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/auto-update.md b/docs/auto-update.md
index 978789d3089..9aa57bbd11f 100644
--- a/docs/auto-update.md
+++ b/docs/auto-update.md
@@ -14,7 +14,7 @@ Read the remainder of this guide to configure everything.
## Auto-updatable Targets
* macOS: DMG.
-* Linux: AppImage, DEB, Pacman And RPM.
+* Linux: AppImage, DEB, Pacman (beta) And RPM.
* Windows: NSIS.
All these targets are default, custom configuration is not required. (Though it is possible to [pass in additional configuration, e.g. request headers](#custom-options-instantiating-updater-directly).)
From fa465cbd0fe365652011f8dec4aad268da71e89d Mon Sep 17 00:00:00 2001
From: Mike Maietta
Date: Sun, 8 Sep 2024 14:40:03 -0700
Subject: [PATCH 8/9] revert changes to lockfile to try and trigger minor bump
in changeset instead of major
---
pnpm-lock.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 33baefbe657..ca9911b88a5 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -5840,7 +5840,7 @@ packages:
puppeteer@2.1.1:
resolution: {integrity: sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg==}
engines: {node: '>=8.16.0'}
- deprecated: < 22.8.2 is no longer supported
+ deprecated: < 22.6.4 is no longer supported
q@1.5.1:
resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==}
From 27cd56e245b59025812c6360bcb25c8d6fec9550 Mon Sep 17 00:00:00 2001
From: Mike Maietta
Date: Sun, 8 Sep 2024 14:50:46 -0700
Subject: [PATCH 9/9] converting to patch to not trigger major version bump.
not sure why it's required this way, but the changes in app-builder-lib does
not impact currently existing code
---
.changeset/yellow-snakes-sneeze.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.changeset/yellow-snakes-sneeze.md b/.changeset/yellow-snakes-sneeze.md
index 806bc96bfab..ac082b01e2d 100644
--- a/.changeset/yellow-snakes-sneeze.md
+++ b/.changeset/yellow-snakes-sneeze.md
@@ -1,5 +1,5 @@
---
-"app-builder-lib": minor
+"app-builder-lib": patch
"electron-updater": minor
---