{"id":13542679,"url":"https://github.com/openwebdocs/mdn-bcd-collector","last_synced_at":"2025-04-02T10:31:14.601Z","repository":{"id":63519370,"uuid":"568369625","full_name":"openwebdocs/mdn-bcd-collector","owner":"openwebdocs","description":"Data collection service for MDN's browser-compat-data","archived":false,"fork":false,"pushed_at":"2024-10-29T11:54:21.000Z","size":17553,"stargazers_count":24,"open_issues_count":30,"forks_count":17,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-29T13:33:13.131Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mdn-bcd-collector.gooborg.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"foolip/mdn-bcd-collector","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openwebdocs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"open-web-docs","github":"openwebdocs"}},"created_at":"2022-11-20T10:17:54.000Z","updated_at":"2024-10-29T11:54:24.000Z","dependencies_parsed_at":"2024-02-06T13:13:24.727Z","dependency_job_id":"28d727fd-c75d-465f-a6c4-d11dc930810f","html_url":"https://github.com/openwebdocs/mdn-bcd-collector","commit_stats":{"total_commits":4917,"total_committers":26,"mean_commits":189.1153846153846,"dds":0.5169818995322351,"last_synced_commit":"2b8a7d540020d10a0404688d9a04d08562a6c0d4"},"previous_names":["openwebdocs/mdn-bcd-collector"],"tags_count":154,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwebdocs%2Fmdn-bcd-collector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwebdocs%2Fmdn-bcd-collector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwebdocs%2Fmdn-bcd-collector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwebdocs%2Fmdn-bcd-collector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openwebdocs","download_url":"https://codeload.github.com/openwebdocs/mdn-bcd-collector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246796919,"owners_count":20835467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T10:01:15.108Z","updated_at":"2025-04-02T10:31:14.584Z","avatar_url":"https://github.com/openwebdocs.png","language":"TypeScript","funding_links":["https://opencollective.com/open-web-docs","https://github.com/sponsors/openwebdocs"],"categories":["others","TypeScript"],"sub_categories":[],"readme":"# MDN browser-compat-data collector\n\nData collection service for MDN's [browser-compat-data](https://github.com/mdn/browser-compat-data). Live at https://mdn-bcd-collector.gooborg.com/. Latest `main` available at https://staging.mdn-bcd-collector.gooborg.com/.\n\nFeature detection tests are generated based on machine-readable data (Web IDL and CSS definitions) from web standards, with support for custom tests where needed. Results are submitted to the [mdn-bcd-results](https://github.com/openwebdocs/mdn-bcd-results) repository.\n\nThis service is part of an effort to [assist BCD updates with automation](https://github.com/mdn/browser-compat-data/issues/3308), and exists to run lots of small tests in browsers to determine the support status of a feature in a browser, and save those results.\n\n## Copyright\n\n© 2023 [Gooborg Studios](https://www.gooborg.com/) + [Open Web Docs](https://www.openwebdocs.org) + [various contributors](https://github.com/openwebdocs/mdn-bcd-collector/graphs/contributors), © 2020-2022 Google LLC, Mozilla Corporation and [Gooborg Studios](https://www.gooborg.com/).\n\nThis project is under the Apache License 2.0 license. See the LICENSE file for more details.\n\n## Setup\n\nThis project requires Node.js 20.\n\n```sh\nnpm install\n```\n\n## Updating BCD using the results\n\nSee [docs/update-bcd.md](./docs/update-bcd.md) for information on how to use the `update-bcd` script.\n\n## Reviewing BCD changes\n\nSee [docs/reviewing-bcd-changes.md](./docs/reviewing-bcd-changes.md) for information on reviewing changes made by the collector.\n\n## Running the server locally\n\n```sh\nnpm run dev\n```\n\n(`dev`, as opposed to `start`, will use `tsx` to run the TypeScript file, as well as automatically rebuild the tests and reload the server on file changes.)\n\nTo also handle HTTPS traffic, use the `--https-cert` and `--https-key` arguments:\n\n```sh\nnpm run dev -- --https-cert=my-cert.pem --https-key=my-cert.key\n```\n\n## Running tests via Selenium WebDriver\n\nA script has been provided which will collect all of the results for nearly all of the browsers, using the Selenium WebDriver to control your CTs, and download them to your computer (which can then be submitted as a PR). To run this script, you'll need a few prerequisites:\n\n- A clone of [mdn-bcd-results](https://github.com/openwebdocs/mdn-bcd-results) adjacent to this folder's repository (or at least a folder at `../mdn-bcd-results`)\n- At least one Selenium remote (ex. BrowserStack, SauceLabs, etc.)\n\n### Define Selenium Hosts\n\nIn `secrets.json`, you'll need to add your Selenium remote(s). In the `selenium` object, define your remote(s) by setting the key as the service name (ex. \"browserstack\", \"saucelabs\", \"lambdatest\", \"custom\", etc.) and the value as either an object containing the username and key for known remotes, or simply a string of the remote URL. Your `secrets.json` should look something like this:\n\n```json\n{\n  \"github\": {\n    \"token\": \"github-token-goes-here\"\n  },\n  \"selenium\": {\n    \"browserstack\": {\n      \"username\": \"example\",\n      \"key\": \"some-API-key-goes-here\"\n    },\n    \"saucelabs\": {\n      \"username\": \"example\",\n      \"key\": \"some-API-key-goes-here\",\n      \"region\": \"us-west-1\"\n    },\n    \"lambdatest\": {\n      \"username\": \"example\",\n      \"key\": \"some-API-key-goes-here\"\n    },\n    \"custom\": \"https://my.example.page.org/selenium/wd\"\n  }\n}\n```\n\nCurrently, the Selenium hosts known to the script are:\n\n- BrowserStack - requires `username` and `key`\n- SauceLabs - requires `username`, `key`, and `region`\n- LambdaTest - requires `username` and `key`\n\nYou may use other Selenium hosts, but please be aware that they have not been tested and you may experience unexpected results.\n\n### Run the script\n\nTo test using the latest deployed version, run:\n\n```sh\nnpm run selenium\n```\n\nYou can also limit the browsers to test by defining browsers as arguments:\n\n```sh\nnpm run selenium chrome\nnpm run selenium edge ie\n```\n\nAdditionally, you can limit the browser versions by the year with the `--since` argument (default: 2020):\n\n```sh\nnpm run selenium -- --since=2016\nnpm run selenium firefox -- --since=2000 # Grab all versions of Firefox\n```\n\n## Running the unit tests and linter\n\n```sh\nnpm test\n```\n\nCode coverage reports can be viewed in a browser by running:\n\n```sh\nnpm run coverage\n```\n\n## Cleaning up generated files\n\n```sh\nnpm run clean\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenwebdocs%2Fmdn-bcd-collector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenwebdocs%2Fmdn-bcd-collector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenwebdocs%2Fmdn-bcd-collector/lists"}