Revert "feat: add notification about available new version (#853)" (#868)

This reverts commit 9b1551e208.
This commit is contained in:
Andrew Tatomyr
2022-09-13 18:50:11 +03:00
committed by GitHub
parent 7b8f370484
commit 331e47f900
4 changed files with 57 additions and 1124 deletions

View File

@@ -16,7 +16,6 @@ import {
stringifyYaml,
} from '@redocly/openapi-core';
import { Totals, outputExtensions, Entrypoint } from './types';
import * as updateNotifier from 'update-notifier';
export async function getFallbackApisOrExit(
argsApis: string[] | undefined,
@@ -324,16 +323,3 @@ export function isSubdir(parent: string, dir: string): boolean {
const relative = path.relative(parent, dir);
return !!relative && !/^..($|\/)/.test(relative) && !path.isAbsolute(relative);
}
export function notifyUpdateCliVersion() {
const pkg = require('../package.json');
const notifier = updateNotifier({
pkg,
updateCheckInterval: 0,
shouldNotifyInNpmScript: true,
});
notifier.notify({
message:
'A new version of Redocly CLI ({latestVersion}) is available.\nUpdate now: `npx @redocly/cli@latest upgrade`.\nChangelog: https://redocly.com/docs/cli/changelog',
});
}