INNER CODE UNIT · TypeScript
notifyUpdate
zuplo/zudoku · packages/create-zudoku/index.ts:325
async function notifyUpdate(): Promise<void> {
try {
if ((await update)?.latest) {
const global = {
npm: "npm i -g",
yarn: "yarn global add",
pnpm: "pnpm add -g",
bun: "bun add -g",
};
const updateMessage = `${global[packageManager]} create-zudoku`;
console.log(
yellow(bold("A new version of `create-zudoku` is available!")) +
"\n" +
"You can update by running: " +
cyan(updateMessage) +
"\n",
);
}