diff options
| author | 2023-11-03 21:25:40 +0800 | |
|---|---|---|
| committer | 2023-11-03 21:25:40 +0800 | |
| commit | 9029588590bea8b10451575c5142dcde77ecd1b5 (patch) | |
| tree | 04cf8aee56c23fd225ff19d340f7cee621d874ef /packages/turbo-codemod/src/utils/notifyUpdate.ts | |
| parent | 94071d7ce16c56641d67d488e2bac6be84ffe731 (diff) | |
| download | HydroRoll-9029588590bea8b10451575c5142dcde77ecd1b5.tar.gz HydroRoll-9029588590bea8b10451575c5142dcde77ecd1b5.zip | |
chore: delete useless files
Diffstat (limited to 'packages/turbo-codemod/src/utils/notifyUpdate.ts')
| -rw-r--r-- | packages/turbo-codemod/src/utils/notifyUpdate.ts | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/packages/turbo-codemod/src/utils/notifyUpdate.ts b/packages/turbo-codemod/src/utils/notifyUpdate.ts deleted file mode 100644 index 634ffd8..0000000 --- a/packages/turbo-codemod/src/utils/notifyUpdate.ts +++ /dev/null @@ -1,35 +0,0 @@ -import chalk from "chalk"; -import checkForUpdate from "update-check"; - -import cliPkgJson from "../../package.json"; -import getWorkspaceImplementation from "./getPackageManager"; - -const update = checkForUpdate(cliPkgJson).catch(() => null); - -export default async function notifyUpdate(): Promise<void> { - try { - const res = await update; - if (res?.latest) { - const ws = getWorkspaceImplementation(); - - console.log(); - console.log( - chalk.yellow.bold("A new version of `@turbo/codemod` is available!") - ); - console.log( - "You can update by running: " + - chalk.cyan( - ws === "yarn" - ? "yarn global add @turbo/codemod" - : ws === "pnpm" - ? "pnpm i -g @turbo/codemod" - : "npm i -g @turbo/codemod" - ) - ); - console.log(); - } - process.exit(); - } catch (_e: any) { - // ignore error - } -} |
