CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-update-notifier

Update notifications for your CLI app

Overall
score

97%

Overview
Eval results
Files

task.mdevals/scenario-5/

CLI Update Checker

A simple command-line tool that checks for package updates and respects user preferences for disabling notifications.

Capabilities

Environment Variable Control

  • When the NO_UPDATE_NOTIFIER environment variable is set, notifications are disabled @test
  • When the environment variable is not set, notifications work normally @test

Command-Line Flag Control

  • When the --no-update-notifier flag is passed, notifications are disabled @test
  • The tool parses command-line arguments to detect the flag @test

Configuration File Control

  • When a config property indicates opt-out, notifications are disabled @test
  • Configuration is read from the notifier's config store @test

Implementation

@generates

API

/**
 * Checks for updates and displays notification if appropriate.
 * Respects multiple disable mechanisms.
 *
 * @param {Object} pkg - Package metadata
 * @param {string} pkg.name - Package name
 * @param {string} pkg.version - Current version
 * @param {Array<string>} argv - Command-line arguments (defaults to process.argv)
 */
function checkForUpdates(pkg, argv = process.argv) {
  // IMPLEMENTATION HERE
}

module.exports = { checkForUpdates };

Dependencies { .dependencies }

update-notifier { .dependency }

Provides update checking and notification functionality.

Install with Tessl CLI

npx tessl i tessl/npm-update-notifier

tile.json