Skip to content

Disable updater for newer app versions#151

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Jul 25, 2026
Merged

Disable updater for newer app versions#151
cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR disables the extension’s built-in update checks when running in newer MarkEdit host versions that ship an extension manager, to avoid redundant self-update behavior.

Changes:

  • Added hasExtensionManager() host capability check based on MarkEdit.runtimeInfo().appVersion.
  • Forced updateBehavior to 'never' when the host extension manager is present.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/support/settings.ts Forces update behavior to “never” on hosts detected to have an extension manager.
src/support/host.ts Introduces version-based host detection for presence of the built-in extension manager.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/support/host.ts
Comment thread src/support/settings.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 5 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

src/support/host.ts:21

  • The version check assumes MarkEdit.runtimeInfo() returns an object with a string appVersion. If runtimeInfo() returns undefined/null or appVersion isn’t a string, calling localeCompare will throw and can break initialization. Add a type guard (and trim) before comparing.
  // appVersion is always 3 numeric segments, so numeric collation is a safe comparison
  const appVersion = MarkEdit.runtimeInfo().appVersion;
  return appVersion.localeCompare('1.34.0', undefined, { numeric: true }) >= 0;

@cyanzhong
cyanzhong merged commit d0c1f73 into main Jul 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants