Skip to content

chore: add update notification to both binaries#1252

Closed
mathiasbynens wants to merge 1 commit intomainfrom
add-update-notification
Closed

chore: add update notification to both binaries#1252
mathiasbynens wants to merge 1 commit intomainfrom
add-update-notification

Conversation

@mathiasbynens
Copy link
Copy Markdown
Member

@mathiasbynens mathiasbynens commented Mar 27, 2026

Both chrome-devtools and chrome-devtools-mcp now log a notification when a newer version is detected to be available.

Issue: https://crbug.com/496757598

Copy link
Copy Markdown
Collaborator

@Lightning00Blade Lightning00Blade left a comment

Choose a reason for hiding this comment

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

Two things:

  • Should we wrap it in a helper to reuse same code?
  • Should we use shouldNotifyInNpmScript as we use npx?

@mathiasbynens mathiasbynens force-pushed the add-update-notification branch from 424e86b to e0f9d04 Compare March 30, 2026 11:51
@mathiasbynens
Copy link
Copy Markdown
Member Author

Two things:

  • Should we wrap it in a helper to reuse same code?
  • Should we use shouldNotifyInNpmScript as we use npx?

Both done. PTAL. Also looping in @OrKoN.

I don’t like that this adds a dependency. cc @natorion

@mathiasbynens mathiasbynens requested a review from OrKoN March 30, 2026 11:54
Comment thread src/bin/chrome-devtools.ts Outdated
Both `chrome-devtools` and `chrome-devtools-mcp` now log a notification
when a newer version is detected to be available.
Comment thread package.json
"node": "^20.19.0 || ^22.12.0 || >=23"
},
"dependencies": {
"update-notifier": "^7.3.1"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this needs to be a dev-dependency, re-exported in src/third_party/index.ts so that it is bundled

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Capturing offline discussion: alternatively, we can just request https://registry.npmjs.org/chrome-devtools-mcp/latest (failing silently in case of any errors) and compare the version number. If the request succeeds and the version number is different, we log the message. I vastly prefer this approach as it avoids transitive dependencies and complications.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@mathiasbynens
Copy link
Copy Markdown
Member Author

Closing in favor of #1783.

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.

3 participants