diff --git a/.changeset/funny-chairs-argue.md b/.changeset/funny-chairs-argue.md new file mode 100644 index 000000000..50d5d23e4 --- /dev/null +++ b/.changeset/funny-chairs-argue.md @@ -0,0 +1,5 @@ +--- +"myst-cli": patch +--- + +Change from twitter to bluesky diff --git a/packages/myst-cli/src/session/session.ts b/packages/myst-cli/src/session/session.ts index dc46a429a..3569bcc48 100644 --- a/packages/myst-cli/src/session/session.ts +++ b/packages/myst-cli/src/session/session.ts @@ -43,25 +43,33 @@ const NPM_COMMAND = 'npm i -g mystmd@latest'; const PIP_COMMAND = 'pip install -U mystmd'; const LOCALHOSTS = ['localhost', '127.0.0.1', '::1']; +function socialLink({ twitter, bsky }: { twitter?: string; bsky?: string }): string { + if (bsky) { + return `Follow ${chalk.yellowBright(`@${bsky}`)} for updates!\nhttps://bsky.app/profile/${bsky}`; + } + if (twitter) { + return `Follow ${chalk.yellowBright(`@${twitter}`)} for updates!\nhttps://x.com/${twitter}`; + } + return ''; +} + export function logUpdateAvailable({ current, latest, upgradeCommand, twitter, + bsky, }: { current: string; latest: string; upgradeCommand: string; - twitter: string; + twitter?: string; + bsky?: string; }) { return boxen( `Update available! ${chalk.dim(`v${current}`)} ≫ ${chalk.green.bold( `v${latest}`, - )}\n\nRun \`${chalk.cyanBright.bold( - upgradeCommand, - )}\` to update.\n\nFollow ${chalk.yellowBright( - `@${twitter}`, - )} for updates!\nhttps://twitter.com/${twitter}`, + )}\n\nRun \`${chalk.cyanBright.bold(upgradeCommand)}\` to update.\n\n${socialLink({ bsky, twitter })}`, { padding: 1, margin: 1, @@ -117,7 +125,7 @@ export class Session implements ISession { current: version, latest: this._latestVersion, upgradeCommand: process.env.MYST_LANG === 'PYTHON' ? PIP_COMMAND : NPM_COMMAND, - twitter: 'MystMarkdown', + bsky: 'mystmd.org', }), ); this._shownUpgrade = true;