Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add banner about data accuracy #64

Merged
merged 2 commits into from Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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