diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 5bdcbc342c584..2ce87f7f706d1 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -147,7 +147,6 @@ "string-similarity": "^1.2.2", "strip-ansi": "^5.2.0", "style-loader": "^0.23.1", - "terminal-link": "^2.1.1", "terser-webpack-plugin": "^2.3.8", "tmp": "^0.2.1", "true-case-path": "^2.2.1", diff --git a/packages/gatsby/src/utils/__tests__/handle-flags.ts b/packages/gatsby/src/utils/__tests__/handle-flags.ts index 5298dc0fa8097..c9dc966b82ba4 100644 --- a/packages/gatsby/src/utils/__tests__/handle-flags.ts +++ b/packages/gatsby/src/utils/__tests__/handle-flags.ts @@ -10,10 +10,6 @@ jest.mock(`gatsby-core-utils`, () => { } }) -jest.mock(`terminal-link`, () => (text: string, url: string): string => - `${text} (${url})` -) - describe(`satisfies semver`, () => { it(`returns false if a module doesn't exist`, () => { const semverConstraints = { diff --git a/packages/gatsby/src/utils/__tests__/show-experiment-notice.js b/packages/gatsby/src/utils/__tests__/show-experiment-notice.js index d9fd22c69a76c..89706babd4112 100644 --- a/packages/gatsby/src/utils/__tests__/show-experiment-notice.js +++ b/packages/gatsby/src/utils/__tests__/show-experiment-notice.js @@ -1,8 +1,6 @@ import { createNoticeMessage } from "../show-experiment-notice" import stripAnsi from "strip-ansi" -jest.mock(`terminal-link`, () => (text, url) => `${text} (${url})`) - describe(`show-experiment-notice`, () => { it(`generates a message`, () => { expect( diff --git a/packages/gatsby/src/utils/handle-flags.ts b/packages/gatsby/src/utils/handle-flags.ts index 5c7799d2456d4..fbc54f00f5107 100644 --- a/packages/gatsby/src/utils/handle-flags.ts +++ b/packages/gatsby/src/utils/handle-flags.ts @@ -1,6 +1,5 @@ import _ from "lodash" import { isCI } from "gatsby-core-utils" -import terminalLink from "terminal-link" import { IFlag } from "./flags" import chalk from "chalk" import { commaListsAnd } from "common-tags" @@ -133,7 +132,7 @@ const handleFlags = ( message += ` · ${chalk.white.bgRed.bold(`EXPERIMENTAL`)}` } if (flag.umbrellaIssue) { - message += ` · (${terminalLink(`Umbrella Issue`, flag.umbrellaIssue)})` + message += ` · (Umbrella Issue (${flag.umbrellaIssue}))` } message += ` · ${flag.description}` diff --git a/packages/gatsby/src/utils/show-experiment-notice.ts b/packages/gatsby/src/utils/show-experiment-notice.ts index 32715afa0a92e..8599737fd991c 100644 --- a/packages/gatsby/src/utils/show-experiment-notice.ts +++ b/packages/gatsby/src/utils/show-experiment-notice.ts @@ -2,7 +2,6 @@ import { getConfigStore } from "gatsby-core-utils" import reporter from "gatsby-cli/lib/reporter" import chalk from "chalk" import telemetry from "gatsby-telemetry" -import terminalLink from "terminal-link" type CancelExperimentNoticeCallback = () => void @@ -57,9 +56,9 @@ flags (samples below)` notice => (message += ` -${chalk.bgBlue.bold( - terminalLink(notice.experimentIdentifier, notice.umbrellaLink) -)}, ${notice.noticeText}\n`) +${chalk.bgBlue.bold(notice.experimentIdentifier)} (${notice.umbrellaLink}), ${ + notice.noticeText + }\n`) ) return message