From 6f23a6ec6b0a85358cbd6d9d2dbd821d5a897c54 Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Wed, 13 Nov 2024 14:38:01 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F=20Do=20not=20report=20ava?= =?UTF-8?q?ilable=20updates=20for=20whitelabelled=20applications=20(#1636)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rowan Cockett --- .changeset/silly-comics-melt.md | 5 +++++ packages/myst-cli/src/session/session.ts | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .changeset/silly-comics-melt.md diff --git a/.changeset/silly-comics-melt.md b/.changeset/silly-comics-melt.md new file mode 100644 index 000000000..14db67471 --- /dev/null +++ b/.changeset/silly-comics-melt.md @@ -0,0 +1,5 @@ +--- +"myst-cli": patch +--- + +Do not report version updates for whitelabelled binaries diff --git a/packages/myst-cli/src/session/session.ts b/packages/myst-cli/src/session/session.ts index 78dfc06aa..bca7760ab 100644 --- a/packages/myst-cli/src/session/session.ts +++ b/packages/myst-cli/src/session/session.ts @@ -22,6 +22,7 @@ import type { RootState } from '../store/reducers.js'; import { rootReducer } from '../store/reducers.js'; import version from '../version.js'; import type { ISession } from './types.js'; +import { isWhiteLabelled } from '../utils/whiteLabelling.js'; import { KernelManager, ServerConnection, SessionManager } from '@jupyterlab/services'; import type { JupyterServerSettings } from 'myst-execute'; import { findExistingJupyterServer, launchJupyterServer } from 'myst-execute'; @@ -104,7 +105,13 @@ export class Session implements ISession { } showUpgradeNotice() { - if (this._shownUpgrade || !this._latestVersion || version === this._latestVersion) return; + if ( + this._shownUpgrade || + !this._latestVersion || + version === this._latestVersion || + isWhiteLabelled() + ) + return; this.log.info( logUpdateAvailable({ current: version,