Skip to content

Conversation

mixmix
Copy link

@mixmix mixmix commented Jul 10, 2025

This adds support for Chrome Browser Extensions

The examples I've given have been acquired sampling the chrome store through scraping + querying an updated "updatecheck" API that chrome itself uses to poll for updates

@johnmhoran johnmhoran added this to the PURL-TBD milestone Jul 15, 2025
@johnmhoran johnmhoran added the type: chrome Proposed new type label Jul 15, 2025
PURL-TYPES.rst Outdated
- The ``version`` is the package version.
- Examples::

pkg:chrome/[email protected]
Copy link
Member

Choose a reason for hiding this comment

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

Thanks! this name look fairly weird, is this really the thing? Given an installed extension, where do you find this?

Copy link
Author

Choose a reason for hiding this comment

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

The unique name is a 32 char a-z string. This is NOT the same as the name in the manifest.json - that name is whatever human-readable name. This allows them to have a primary key that is very collision-free, and a flexible locale/translation mutable "name" which is presented on web pages / UI.

If you want to know the name of an installed extension, one way is to look at your extensions, and click "View in Chrome Web Store". For 1Password, this will take you to:

Note that human readable "name" field can be absent, OR any string at all. It's totally not relied upon for identifying the extension

PURL-TYPES.rst Outdated

- The default repository is ``https://chromewebstore.google.com/``.
- The ``name`` is the extension id - the human readable name often depends on locale.
- The ``version`` is the package version.
Copy link
Member

Choose a reason for hiding this comment

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

Is this something that is also tracked with another number internally, like the id above?

Copy link
Author

Choose a reason for hiding this comment

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

The places I know if that reference the version number:

  • chrome web store page for an extensions lists current version
  • the chrome web store updatecheck API - returns the current version
  • the chrome web store blob URL - files suffixed with a modified form of the version (camel case... plus more?)
  • the manifest.json has a version field

Copy link
Author

Choose a reason for hiding this comment

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

NOTE: the extension id is NOT the same as the name in the manifest.json - the name is whatever human-readable name. This allows them to have a primary key that is very collision-free (32 char a-z), and a flexible locale/translation mutable "name" which is presented on web pages / UI.

@pombredanne
Copy link
Member

After the merge of PR #514, PURL types are now defined in JSON:

With the new approach... we can then go either way:

  1. you update your PR to use the new approach, OR
  2. I/we will update your PR and merge so you do not bear the pain 👼

If you do not reply, we will update!
Thanks for your understanding !

This adds support for Chrome Browser Extensions
@mixmix
Copy link
Author

mixmix commented Jul 28, 2025

Thanks @pombredanne ! I've had a go reformatting this PR
I added some tests, but was unclear how to run those. I ran make conf && make check and got some passes but then an Exit 1 with no error message so unclear how to improve

I also note README.dev.rst is perhaps out of date (there is no make docs or make generate)?
I ran make gendocs

@mixmix
Copy link
Author

mixmix commented Jul 28, 2025

Please feel free to take what's here and adjust it as you see fit.
I'll look back here every few days to answer any questions too

Thanks for your work 🍍 🐟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants