Skip to content

fix(cli): replace update-notifier with simple-update-notifier#1210

Merged
mishushakov merged 5 commits intomainfrom
mishushakov/cli-update-banner
Mar 18, 2026
Merged

fix(cli): replace update-notifier with simple-update-notifier#1210
mishushakov merged 5 commits intomainfrom
mishushakov/cli-update-banner

Conversation

@mishushakov
Copy link
Copy Markdown
Member

@mishushakov mishushakov commented Mar 17, 2026

Summary

Replaced update-notifier v6 with simple-update-notifier v2 to fix the bundled CLI.

update-notifier v6 is ESM-only and spawns a child process (check.js) using import.meta.url. When tsup bundles the CLI into a single CJS file, these file paths become invalid and the update check silently fails. simple-update-notifier is CJS-compatible, checks inline without spawning, and has an identical API surface.

Test plan

  • ✓ All 79 existing CLI tests pass
  • ✓ TypeScript, linting, and formatting checks pass
  • ✓ Update check banner still displays with same interval

🤖 Generated with Claude Code


Note

Low Risk
Low risk dependency swap and small CLI entrypoint flow change; main potential impact is CLI startup behavior if the new notifier or async sequencing behaves differently across environments.

Overview
Fixes the CLI update banner by replacing update-notifier with simple-update-notifier and removing the old notifier/type dependencies.

Updates the CLI entrypoint to run the update check as an awaited async task (with failures swallowed to avoid unhandled rejections) and switches command parsing to parseAsync() before awaiting the notifier.

Written by Cursor Bugbot for commit f717a9e. This will update automatically on new commits. Configure here.

… bundling

update-notifier v6 is ESM-only and spawns a child process (check.js) using import.meta.url paths. When tsup bundles the CLI into a single CJS file, these file paths become invalid and the update check silently fails.

simple-update-notifier is CJS-compatible, checks inline without spawning, and has identical API surface.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 17, 2026

🦋 Changeset detected

Latest commit: f717a9e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "e2b-docs" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 17, 2026

Package Artifacts

Built from 72c3b8f. Download artifacts from this workflow run.

JS SDK (e2b@2.14.2-mishushakov-cli-update-banner.0):

npm install ./e2b-2.14.2-mishushakov-cli-update-banner.0.tgz

CLI (@e2b/cli@2.8.2-mishushakov-cli-update-banner.0):

npm install ./e2b-cli-2.8.2-mishushakov-cli-update-banner.0.tgz

Python SDK (e2b==2.15.3+mishushakov-cli-update-banner):

pip install ./e2b-2.15.3+mishushakov.cli.update.banner-py3-none-any.whl

simpleUpdateNotifier is async — without awaiting it, the process can
exit before the network check and notification complete. Use parseAsync
and await the update check promise after command execution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mishushakov
Copy link
Copy Markdown
Member Author

This is how it looks:

┌────────────────────────────────────┐
│ New version of @e2b/cli available! │
│ Current Version: 2.7.0             │
│ Latest Version: 2.8.1              │
└────────────────────────────────────┘

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mishushakov mishushakov enabled auto-merge (squash) March 17, 2026 18:47
Comment thread packages/cli/src/index.ts
Add .catch() to the updateCheck promise to prevent unhandled rejections
from crashing the process, and add .catch() to main() to ensure clean
exit on failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread packages/cli/src/index.ts Outdated
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread packages/cli/src/index.ts
@mishushakov mishushakov merged commit ba7caa5 into main Mar 18, 2026
19 of 23 checks passed
@mishushakov mishushakov deleted the mishushakov/cli-update-banner branch March 18, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants