From 7c1986f0d03d80a6248039947abd30f54055c1b6 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Sun, 5 Jan 2025 22:05:47 -0800 Subject: [PATCH 1/2] [pulsar-updater] Don't prompt to update on non-default release channels --- packages/pulsar-updater/src/find-install-method.js | 11 +++++++---- packages/pulsar-updater/src/main.js | 5 +---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/pulsar-updater/src/find-install-method.js b/packages/pulsar-updater/src/find-install-method.js index 5c420700c3..94fa116fc1 100644 --- a/packages/pulsar-updater/src/find-install-method.js +++ b/packages/pulsar-updater/src/find-install-method.js @@ -77,11 +77,14 @@ async function main() { returnValue = "Spec Mode"; } - if (atom.getVersion().endsWith("-dev")) { + if (atom.getReleaseChannel() !== 'stable') { // This would only be the case if - // 1. `yarn start` was used by a developer - // 2. Someone built a local binary without removing `-dev` from the version - returnValue = "Developer Instance"; + // + // * `yarn start` was used by a developer, + // * someone built a local binary without removing `-dev` from the version, + // or + // * someone was using a preview build of PulsarNext. + returnValue = 'Custom Release Channel'; } if (returnValue.length > 0) { diff --git a/packages/pulsar-updater/src/main.js b/packages/pulsar-updater/src/main.js index ef2875c1de..05743f4b45 100644 --- a/packages/pulsar-updater/src/main.js +++ b/packages/pulsar-updater/src/main.js @@ -162,13 +162,10 @@ class PulsarUpdater { break; case "Safe Mode": return null; - break; case "Spec Mode": return null; - break; - case "Developer Instance": + case "Custom Release Channel": return null; - break; case "Flatpak Installation": returnText += "Install the latest version by running `flatpak update`."; break; From 4700ce3ad6b6be8a33d59f98e47466003aa86e22 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Sun, 5 Jan 2025 23:55:55 -0800 Subject: [PATCH 2/2] [pulsar-updater] Fix spec --- packages/pulsar-updater/README.md | 2 +- packages/pulsar-updater/spec/find-install-method-spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/pulsar-updater/README.md b/packages/pulsar-updater/README.md index f49c5029a9..2bea233ab3 100644 --- a/packages/pulsar-updater/README.md +++ b/packages/pulsar-updater/README.md @@ -30,7 +30,7 @@ Since a major part of the functionality of this package is attempting to determi * Universal: Developer Mode * Universal: Safe Mode * Universal: Spec Mode -* Universal: Developer Instance +* Universal: Custom Release Channel * Windows: Chocolatey Installation * Windows: winget Installation * Windows: User Installation diff --git a/packages/pulsar-updater/spec/find-install-method-spec.js b/packages/pulsar-updater/spec/find-install-method-spec.js index 151ce8bd5d..67eea2aa8f 100644 --- a/packages/pulsar-updater/spec/find-install-method-spec.js +++ b/packages/pulsar-updater/spec/find-install-method-spec.js @@ -5,13 +5,13 @@ describe("find-install-method main", async () => { const platform = process.platform; const arch = process.arch; - it("Returns developer instance if applicable", async () => { + it("Returns custom release channel if applicable", async () => { // We can't mock the atom api return from a package, // So we will just know that if tests are running, it's in the Atom SpecMode let method = await findInstallMethod(); - expect(method.installMethod).toBe("Developer Instance"); + expect(method.installMethod).toBe("Custom Release Channel"); expect(method.platform).toBe(platform); expect(method.arch).toBe(arch); });