Update notifications for your CLI app
Overall
score
97%
{
"context": "This criteria evaluates how well the engineer uses update-notifier's built-in disable mechanisms. The focus is on correctly leveraging the package's native support for environment variables, CLI flags, and configuration-based opt-out rather than implementing custom disable logic.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import update-notifier",
"description": "Code imports or requires the update-notifier package correctly",
"max_score": 5
},
{
"name": "Create notifier instance",
"description": "Code uses the updateNotifier factory function (or default export) with a pkg object containing name and version properties",
"max_score": 10
},
{
"name": "Environment variable detection",
"description": "Code leverages update-notifier's built-in NO_UPDATE_NOTIFIER environment variable checking, either by relying on the package's automatic detection or by checking process.env.NO_UPDATE_NOTIFIER before calling notify()",
"max_score": 25
},
{
"name": "CLI flag detection",
"description": "Code detects the --no-update-notifier flag in argv (process.argv or passed arguments) and prevents notification, either by checking before calling notify() or by integrating with update-notifier's flag detection",
"max_score": 25
},
{
"name": "Config-based opt-out",
"description": "Code uses update-notifier's config property (ConfigStore instance) to check for or set an optOut flag, such as checking notifier.config.get('optOut') before displaying notifications",
"max_score": 25
},
{
"name": "Call notify method",
"description": "Code calls the notify() method on the notifier instance to display update notifications when not disabled",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-update-notifierdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10