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

Allow optional implementation_url in support data #16415

Merged
merged 14 commits into from
May 25, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions schemas/compat-data-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,15 @@ Example for two flags required:
}
```

#### `impl_url`

An optional changeset/commit URL for the revision which implemented the feature in the source code, or the URL to the bug tracking the implementation, for the associated browser. The presence of an `impl_url` value indicates that the associated browser has implemented the feature or intends to implement the feature.

For changeset/commit URLs, this is typically a https://trac.webkit.org/changeset/,
https://hg.mozilla.org/mozilla-central/rev/, or https://crrev.com/ URL for a changeset with
a subject line that will typically be something of the form _"Implement [feature]"_,
_"Support [feature]"_, or _"Enable [feature]"_. For bug URLs, this is typically a https://webkit.org/b/, https://bugzil.la/, or https://crbug.com/ URL indicating an intent to implement and ship the feature.

#### `partial_implementation`

A `boolean` value indicating whether or not the implementation of the sub-feature
Expand Down
24 changes: 24 additions & 0 deletions schemas/compat-data.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,24 @@
"required": ["type", "name"]
}
},
"impl_url": {
"anyOf": [
{
"$ref": "#/definitions/impl_url_value"
},
{
"type": "array",
"minItems": 2,
"items": {
"$ref": "#/definitions/impl_url_value"
}
}
],
"description": "An optional changeset/commit URL for the revision which implemented the feature in the source code, or the URL to the bug tracking the implementation, for the associated browser.",
"errorMessage": {
"pattern": "impl_url must be a link to a browser commit or bug URL. URLs must be in shortened form (ex. bugs.chromium.org -> crbug.com). Note: `npm run fix` may resolve these issues."
}
},
"partial_implementation": {
"const": true,
"description": "A boolean value indicating whether or not the implementation of the sub-feature deviates from the specification in a way that may cause compatibility problems. It defaults to false (no interoperability problems expected). If set to true, it is recommended that you add a note explaining how it diverges from the standard (such as that it implements an old version of the standard, for example)."
Expand Down Expand Up @@ -197,6 +215,12 @@
"pattern": "(^https://[^#]+#.+)|(^https://www.khronos.org/registry/webgl/extensions/[^/]+/)"
},

"impl_url_value": {
"type": "string",
"format": "uri",
"pattern": "^https://(trac.webkit.org/changeset/|hg.mozilla.org/mozilla-central/rev/|crrev.com/|bugzil.la/|crbug.com/|webkit.org/b/)"
},

"compat_statement": {
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/mirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const copyStatement = (data) => {
* @returns {SupportStatement}
*/
const combineStatements = (...data) => {
const ignoredKeys = ['version_added', 'notes'];
const ignoredKeys = ['version_added', 'notes', 'impl_url'];

const flattenedData = data.flat(2);
const sections = {};
Expand Down
13 changes: 13 additions & 0 deletions test/linter/test-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,19 @@ export function processData(rawData) {
},
);

processLink(
// use https://crbug.com/category/100000 instead
errors,
actual,
String.raw`https?://chromium\.googlesource\.com/chromium/src/\+/([\w\d]+)`,
(match) => {
return {
issue: 'Use shortenable URL',
expected: `https://crrev.com/${match[1]}`,
};
},
);

processLink(
// use https://webkit.org/b/100000 instead
errors,
Expand Down
7 changes: 7 additions & 0 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,13 @@ export interface SimpleSupportStatement {
*/
value_to_set?: string;
}[];

/**
* An optional changeset/commit URL for the revision which implemented the feature in the source code, or the URL to the bug tracking the implementation, for the associated browser; e.g. a https://trac.webkit.org/changeset/
* https://hg.mozilla.org/mozilla-central/rev/, or https://crrev.com/ URL.
*/
impl_url?: string;

/**
* A `boolean` value indicating whether or not the implementation of the sub-feature follows
* the current specification closely enough to not create major interoperability problems.
Expand Down