feat(site): serve compliance.json with precomputed parity from GitHub Pages#46
Open
grdsdev wants to merge 2 commits into
Open
feat(site): serve compliance.json with precomputed parity from GitHub Pages#46grdsdev wants to merge 2 commits into
grdsdev wants to merge 2 commits into
Conversation
… Pages Enrich site/compliance.json to include parity scores so external sources can query them without recomputing, and update the site to render from those precomputed values rather than computing them at build time. - Add `ParityReport` (with new `perFeature` field) and `ComplianceFile` wrapper type to types.ts as canonical exported types - report.ts: compute and return `perFeature` (cross-language parity per feature ID) alongside the existing overall/perArea/perLanguage values; re-export ParityReport from types for backward compat - aggregate.ts: call computeParity after fetching all compliance data and write a ComplianceFile envelope (compliance + parity) to compliance.json - generate-site.ts: read precomputed parity from the ComplianceFile envelope; fall back to computeParity when no file is provided (local dev); remove featureParity() helper; add link to compliance.json in the site header; explicitly copy compliance.json to the output dir so it is always present regardless of the input path - Both deploy workflows: document that the Pages artifact intentionally contains both index.html and compliance.json
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.
Summary
compliance.jsonwith precomputed parity scores so external tools can queryhttps://supabase.github.io/sdk/compliance.jsonand get the full picture — raw compliance data plusoverall,perArea,perLanguage, andperFeatureparity values — without having to recompute anything.generate-site.tsnow reads from theComplianceFileenvelope written byaggregate.ts.compliance.jsonadded to the site so the URL is discoverable.aggregate-capabilities.ymldeleted; its schedule trigger merged intodeploy-pages.yml, which now handles all three cases: push to main, daily cron, and manual dispatch.New
compliance.jsonshape{ "compliance": { "javascript": { "auth.sign_in.email": { "status": "implemented" }, "…": "…" }, "…": "…" }, "parity": { "overall": 0.72, "perArea": { "auth": 0.85, "storage": 0.65 }, "perLanguage": { "javascript": 0.90, "flutter": 0.70, "…": 0 }, "perFeature": { "auth.sign_in.email": 1.0, "auth.mfa.enroll": 0.5, "…": 0 } } }Changed files
src/types.tsParityReport(withperFeature) andComplianceFileas canonical exported typessrc/report.tsperFeatureincomputeParity; importsParityReportfrom types and re-exports for compatsrc/aggregate.tscomputeParityafter fetching all SDKs; writesComplianceFileenvelope tocompliance.jsonsrc/generate-site.tsComplianceFile; uses precomputed parity; removesfeatureParity()helper; adds header link; explicit copy ofcompliance.jsonto output dir.github/workflows/deploy-pages.ymlcompliance.json.github/workflows/aggregate-capabilities.ymldeploy-pages.ymlTesting
All 125 existing tests pass. TypeScript strict mode reports no errors.