feat(schemas): separate public from internal schema#29041
feat(schemas): separate public from internal schema#29041
Conversation
|
Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs). |
d706910 to
16892e6
Compare
Otherwise `ajv` rejects the value for not being a string.
- Avoid unnecessary `tsType`. - Avoid descriptions next to `$ref` (causes duplicate types). - Refine descriptions.
Compares build output between PR and base.
To summarize my comments on the review threads: This is the pre-existing behavior of the (internal) type generation, and it wasn't necessary to fix this to separate the public schema. But let me see if I can fix it anyhow. |
Move extra types to `types/index.d.ts`.
|
This pull request has merge conflicts that must be resolved before it can be merged. |
|
This is still a bit confused/confusing:
|
This is a dilemma, but the resolution to
This is pre-existing, and I don't think it has actually caused any confusion. The
These are now fixed.
It seems that the TypeScript errors in |
LeoMcA
left a comment
There was a problem hiding this comment.
Ok, nice! I built locally and installed in fred and typescript was happy.
So we don't rely on the web-features type fixes PR being merged, and so we can ensure type breakages aren't introduced in the future, it would be nice to drop a tsconfig.json like this into types/ and build/:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"skipLibCheck": false,
}
}
I tested locally, with deliberate changes to break those files, and it surfaced them when running with cd types && npx tsc && cd ../build && npx tsc.
I added it to I hope the web-features PR gets accepted, and then we can disable |
I think it most needs to be there: those are the types we ship to consumers, and those are the types it's most essential to ensure are correct, and the ones least likely to be noticed are broken while working on bcd. Is using |
|
This pull request has merge conflicts that must be resolved before it can be merged. |
You made good points, and convinced me. |
Summary
Adds a public schema for
data.json, separate from the internal browser/compat file schemas.Also refines the schema descriptions based on Daniel's feedback.
Test results and supporting details
There are two changes that are strictly speaking breaking:
CompatStatement.source_fileproperty is now required.BrowserStatement.upstreamproperty is narrowed down toUpstreamBrowserName, a subset ofBrowserName.Before
After
diff
Related issues
Fixes #29059.