Open
Conversation
Bumps and [minimatch](https://github.com/isaacs/minimatch). These dependencies needed to be updated together. Updates `minimatch` from 3.1.2 to 3.1.5 - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.1.2...v3.1.5) Updates `minimatch` from 5.1.6 to 5.1.9 - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.1.2...v3.1.5) Updates `minimatch` from 9.0.5 to 9.0.9 - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.1.2...v3.1.5) Updates `minimatch` from 10.1.2 to 10.2.4 - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.1.2...v3.1.5) --- updated-dependencies: - dependency-name: minimatch dependency-version: 3.1.5 dependency-type: indirect - dependency-name: minimatch dependency-version: 5.1.9 dependency-type: indirect - dependency-name: minimatch dependency-version: 9.0.9 dependency-type: indirect - dependency-name: minimatch dependency-version: 10.2.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…_yarn/multi-bf627a84bc Bump minimatch
Contributor
Author
|
@mrchrisadams not expecting a full review from you, but just want to get someone else's reckons on this implementation. |
Contributor
Author
|
I’ve got working examples from in the browser hitting the carbon.txt validator endpoint with CO2.js. CodePen: CO2.js 🤝🏼 Carbon.txt Observable: https://observablehq.com/d/55ee768bb40c1f4b So looks like CORS won’t be an issue. |
mrchrisadams
approved these changes
Mar 19, 2026
Member
mrchrisadams
left a comment
There was a problem hiding this comment.
Thanks for this @fershad - one nit pick about docstrings, and a couple of other bits that could be deferred, but would be nice to have added in this PR if possible
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Triage
Type of change
Please select any of the below items that are appropriate.
This pull request:
Related issue/s
Please list below any issues this pull request is related to.
Docs changes required
Do any changes made in this pull request require parts of the CO2.js documentation to be updated?
If you answered "Yes", please create an corresponding issue in our Developer Documentation repository.
Describe the changes made in this pull request
As clearly as possible, describe the changes made in the pull request. You should at least detail "what changes have been made" and "what the results of these changes will be".
This change introduces the ability for developers to perform carbon.txt lookups against a domain. This functionality will work similar to the existing green hosting check functionality that exists in CO2.js. Developers will be able to submit a website domain, and will be returned any linked sustainability content that is contained in a carbon.txt file hosted on that domain.
The
check()function accepts:domain: REQUIRED Astringrepresenting the domain that is being checked. The protocol (i.e. http://, https://) should be excluded.options: Optional Anobjectthat can contain:verbose: Abooleanindicate where you want to receive the full JSON payload from the API (including logs), or just the core data.userAgentIdentifier: Astringrepresenting the app, site, or organisation that is making the request.url: Astringrepresenting the URL of the carbon.txt validator endpoint (if you do not want to use the Green Web Foundation carbon.txt API endpoint)Response
Results are returned with the
successkey indicating if the carbon.txt lookup was successful/not successful.The following responses will be returned:
Success:
verbose: trueSuccess:
verbose: falseFailed:
verbose: trueFailed:
verbose: falseFailed: Invalid domain