MCPcopy Index your code
hub / github.com/subquery/subql / notifyUpdates

Function notifyUpdates

packages/common/src/project/utils.ts:306–316  ·  view source on GitHub ↗
(pjson: Package, logger: Pino.Logger)

Source from the content-addressed store, hash-verified

304/* eslint-enable no-redeclare */
305
306export function notifyUpdates(pjson: Package, logger: Pino.Logger): void {
307 const notifier = updateNotifier({pkg: pjson, updateCheckInterval: 0});
308
309 const latestVersion = notifier.update ? notifier.update.latest : pjson.version;
310
311 if (notifier.update && lt(pjson.version, latestVersion)) {
312 logger.info(`Update available: ${pjson.version} → ${latestVersion}`);
313 } else {
314 logger.info(`Current ${pjson.name} version is ${pjson.version}`);
315 }
316}
317
318export function toJsonObject(object: unknown): unknown {
319 // When using plainToInstance or plainToClass, Map types will need to be converted to a JSON object

Callers 2

main.tsFile · 0.90
init.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected