Skip to content

Commit

Permalink
🦋 Change from twitter link to bsky link (#1761)
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 authored Jan 11, 2025
1 parent b4f5dff commit 884bd8d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/funny-chairs-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"myst-cli": patch
---

Change from twitter to bluesky
22 changes: 15 additions & 7 deletions packages/myst-cli/src/session/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 884bd8d

Please sign in to comment.