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-10/

Update Notification Display

Build a simple utility that displays customized update notifications for a CLI application.

Requirements

Create a notification display utility that shows update alerts with customized messages and styling.

Custom Message Templates

Your utility should support message templates that include dynamic placeholders. The message can be customized to include information like:

  • Package name
  • Current version number
  • Latest available version number
  • Update command

Example: A template like "Update {packageName} from {currentVersion} to {latestVersion}" should display with actual values substituted.

Box Styling Options

The notification should appear in a styled box with customizable appearance:

  • Border style (e.g., single line, double line, rounded)
  • Border color
  • Box padding
  • Box margin

Test Cases

  • Display a notification with a custom message template that includes version placeholders @test
  • Display a multi-line custom message with proper formatting @test
  • Apply custom border style and color to the notification box @test

Implementation

@generates

API

/**
 * Creates and displays a customized update notification
 *
 * @param {Object} options - Configuration options
 * @param {Object} options.pkg - Package information with name and version
 * @param {Object} [options.notifyOptions] - Notification display options
 * @param {string} [options.notifyOptions.message] - Custom message template
 * @param {Object} [options.notifyOptions.boxenOptions] - Box styling options
 */
function createNotifier(options);

Dependencies { .dependencies }

update-notifier { .dependency }

Provides update checking and notification capabilities for CLI applications.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-update-notifier

tile.json