diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9f7cc739c2..88477f736e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7617,9 +7617,6 @@ importers: tempy: specifier: 'catalog:' version: 3.0.0 - terminal-link: - specifier: 'catalog:' - version: 5.0.0 tinyglobby: specifier: 'catalog:' version: 0.2.15 diff --git a/releasing/commands/package.json b/releasing/commands/package.json index 33d1677d1c..f7df4796b7 100644 --- a/releasing/commands/package.json +++ b/releasing/commands/package.json @@ -76,7 +76,6 @@ "semver": "catalog:", "tar-stream": "catalog:", "tempy": "catalog:", - "terminal-link": "catalog:", "tinyglobby": "catalog:", "validate-npm-package-name": "catalog:", "write-json-file": "catalog:", diff --git a/releasing/commands/src/publish/otp.ts b/releasing/commands/src/publish/otp.ts index bb399cc719..9fba3c2f78 100644 --- a/releasing/commands/src/publish/otp.ts +++ b/releasing/commands/src/publish/otp.ts @@ -2,7 +2,6 @@ import { PnpmError } from '@pnpm/error' import type { ExportedManifest } from '@pnpm/releasing.exportable-manifest' import type { PublishOptions } from 'libnpmpublish' import qrcodeTerminal from 'qrcode-terminal' -import terminalLink from 'terminal-link' import { SHARED_CONTEXT } from './utils/shared-context.js' @@ -189,7 +188,7 @@ async function webAuthOtp ( ): Promise { const qrCode = generateQrCode(authUrl) const sanitizedUrl = sanitizeUrl(authUrl) - const displayUrl = sanitizedUrl != null ? terminalLink(sanitizedUrl, sanitizedUrl, { fallback: false }) : authUrl + const displayUrl = sanitizedUrl != null ? hyperlinkEscape(sanitizedUrl) : authUrl globalInfo(`Authenticate your account at:\n${displayUrl}\n\n${qrCode}`) const startTime = Date.now() const timeout = 5 * 60 * 1000 // 5 minutes @@ -301,3 +300,7 @@ function sanitizeUrl (url: string): string | undefined { return undefined } } + +function hyperlinkEscape (url: string): string { + return `\u001B]8;;${url}\u0007${url}\u001B]8;;\u0007` +}