Skip to content

Commit

Permalink
chore: add banner about data accuracy (#64)
Browse files Browse the repository at this point in the history
* chore: add banner about data accuracy

* Update README.md

Co-authored-by: Tom Lienard <[email protected]>

---------

Co-authored-by: Tom Lienard <[email protected]>
  • Loading branch information
pi0 and QuiiBz committed Mar 13, 2024
1 parent 72c842d commit 82a32c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -6,7 +6,10 @@

<!-- /automd -->

Display APIs compatibility across different JavaScript runtimes. The data is automatically generated, based on MDN [`browser-compat-data`](https://github.com/mdn/browser-compat-data) format using the runtime tests from [`mdn-bcd-collector`](https://github.com/openwebdocs/mdn-bcd-collector). Runtimes are displayed with their [WinterCG Runtime Key](https://runtime-keys.proposal.wintercg.org).
Display APIs compatibility across different JavaScript runtimes. The data is automatically generated, based on MDN [`browser-compat-data`](https://github.com/mdn/browser-compat-data) format using the runtime tests from [`mdn-bcd-collector`](https://github.com/openwebdocs/mdn-bcd-collector).

> [!WARNING]
> The current data is not 100% accurate and is auto generated. Please [open an issue](https://github.com/unjs/runtime-compat/issues) if you have spotted any inconsistencies.
## About the data

Expand Down
13 changes: 8 additions & 5 deletions apps/website/src/app.vue
Expand Up @@ -10,15 +10,17 @@
href="https://github.com/unjs/runtime-compat/tree/main/packages/runtime-compat-data">
runtime-compat-data
</ExternalLink>, based on MDN's format.
Runtimes are displayed with their <ExternalLink href="https://runtime-keys.proposal.wintercg.org">
WinterCG Runtime Key
</ExternalLink>.
</p>
<p class="bg-yellow-100 border-l-4 border-yellow-500 text-yellow-700 p-4" role="alert">
<strong>Note:</strong> The current data is not 100% accurate and is auto generated.
Please <ExternalLink href="https://github.com/unjs/runtime-compat/issues">open an issue</ExternalLink> if you
have spotted any inconsistencies.
</p>
<label class="flex items-center gap-2">
<input type="checkbox" class="rounded" v-model="winterCGOnly" />
<span class="text-md text-slate-600">Filter by WinterCG APIs ({{ computedData.winterCGCount }}/{{
computedData.totalCount
}})</span>
computedData.totalCount
}})</span>
</label>
</div>
<div class="sticky top-0 z-10 pointer-events-none max-w-full">
Expand Down Expand Up @@ -50,6 +52,7 @@
<script setup lang="ts">
import runtimeCompatData, { type CompatStatement, type Identifier, type RuntimeName } from 'runtime-compat-data';
import { changeScroll } from './lib'
import ExternalLink from './components/ExternalLink.vue';
const runtimes = Object.keys(runtimeCompatData.api.AbortController.__compat?.support ?? {}) as RuntimeName[]
const selectedRuntimes = useState<string[]>('selectedRuntimes', () => runtimes)
Expand Down

0 comments on commit 82a32c0

Please sign in to comment.