Skip to content

Commit

Permalink
Merge pull request #1 from mdn/master
Browse files Browse the repository at this point in the history
Updating the code in my fork
  • Loading branch information
Irene Smith committed Nov 9, 2018
2 parents 1719fe8 + 4be675b commit d3c7ba1
Show file tree
Hide file tree
Showing 1,879 changed files with 142,153 additions and 34,823 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.idea
/node_modules/
*.log
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode
test
schemas
.travis.yml
Expand Down
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"richie5um2.vscode-sort-json"
]
}
35 changes: 35 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"sortJSON.orderOverride": [
"version_added",
"version_removed"
],
"sortJSON.orderUnderride": [
"status",
"standard_track",
"deprecated"
],
"json.schemas": [
{
"fileMatch": [
"/api/*.json",
"/css/*.json",
"/html/*.json",
"/http/*.json",
"/javascript/*.json",
"/mathml/*.json",
"/svg/*.json",
"/webdriver/*.json",
"/webextensions/*.json",
"/xpath/*.json",
"/xslt/*.json",
],
"url": "/schemas/compat-data.schema.json"
},
{
"fileMatch": [
"/browsers/*.json"
],
"url": "/schemas/browsers.schema.json"
}
]
}
65 changes: 65 additions & 0 deletions .vscode/snippets.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"Browser Compatibility Data Template": {
"scope": "json",
"prefix": ["bcd", "browser-compat"],
"body": [
"{",
" \"${1|api,css,html,http,javascript,mathml,svg,webdriver,webextensions,xpath,xslt|}\": {",
" \"${2:${TM_FILENAME_BASE}}\": {",
" \"__compat\": {",
" \"mdn_url\": \"${3:mdn-url}\",",
" \"support\": {",
" \"chrome\": {",
" \"version_added\": null",
" },",
" \"chrome_android\": {",
" \"version_added\": null",
" },",
" \"edge\": {",
" \"version_added\": null",
" },",
" \"edge_mobile\": {",
" \"version_added\": null",
" },",
" \"firefox\": {",
" \"version_added\": null",
" },",
" \"firefox_android\": {",
" \"version_added\": null",
" },",
" \"ie\": {",
" \"version_added\": null",
" },",
" \"opera\": {",
" \"version_added\": null",
" },",
" \"opera_android\": {",
" \"version_added\": null",
" },",
" \"safari\": {",
" \"version_added\": null",
" },",
" \"safari_ios\": {",
" \"version_added\": null",
" },",
" \"samsunginternet_android\": {",
" \"version_added\": null",
" },",
" \"webview_android\": {",
" \"version_added\": null",
" }",
" },",
" \"status\": {",
" \"experimental\": ${4|false,true|},",
" \"standard_track\": ${5|true,false|},",
" \"deprecated\": ${6|false,true|}",
" }",
" }",
" }",
" }",
"}",
""
],
"description": "A Browser Compatibility Data JSON file."
}
}
19 changes: 17 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ There are many ways you can help improve this repository! For example:
or maybe you found your own.
* **Reviewing a pull request:** there is a list of [PRs](https://github.com/mdn/browser-compat-data/pulls).
Let us know if these look good to you.
* **Publishing a new package (staff only):** A new npm package should be published regularly, [see below](#publishing-a-new-package-version) for details.

## Validating the data
You can use `npm test` to validate data against the schema. You might need to install the devDependencies using `npm install --only=dev`.
You can use `npm test` to validate data against the schema. You might need to install the devDependencies using `npm install`.
The JSON data is validated against the schema using [`ajv`](http://epoberezkin.github.io/ajv/).

### Optional: Validate/cross-reference against Web API Confluence Dashboard
If the feature you're interested in is a JavaScript API, you can cross-reference data against the [Web API Confluence Dashboard](https://web-confluence.appspot.com/) using the `confluence` npm script. This script will overwrite data in your current working tree according to data from the dashboard.

**Note: Web API Confluence Dashboard data should not be regarded as perfect knowledge of JavaScript APIs.**
**Note: Web API Confluence Dashboard data should not be regarded as perfect knowledge of JavaScript APIs.**
The dashboard derives its data from the JavaScript object graph on a sample page loaded in each browser. For example, an own property named `URL` on `Document.prototype` implies the "`Document` interface has a member named `URL`. For various reasons, not all APIs are exposed on JavaScript prototypes, even when the API is available in the browser.

Examples:
Expand Down Expand Up @@ -52,6 +53,20 @@ Not everything is enforced or validated by the schema. A few things to pay atten

The JSON files should be formatted according to the [.editorconfig](https://github.com/mdn/browser-compat-data/blob/master/.editorconfig) file.


## Publishing a new package version

Regularly, a new release of [mdn-browser-compat-data](https://www.npmjs.com/package/mdn-browser-compat-data) is created by MDN staff and will then be [deployed to the MDN site](https://github.com/mdn/browser-compat-data#browser-compatibility-tables-on-mdn). Usually this is done every Thursday (MDN never deploys to production on Fridays). Releases should be coordinated with the project owner [Florian Scholz](https://github.com/Elchi3), but anyone with merge permissions on the mdn/browser-compat-data repository has the ability to run the following steps which will create a new package version:

1. Figure out the new version number by looking at [past releases](https://github.com/mdn/browser-compat-data/releases). The project is in alpha, so we're using only patch versions. Lets assume the next version should be `0.0.43`.
2. On your updated and clean master branch, run `npm version patch -m "43rd alpha version"`. Locally, this updates `package.json`, creates a new commit, and creates a new release tag (see also the docs for [npm version](https://docs.npmjs.com/cli/version)).
3. Push the commit to master: `git push origin master`.
4. Check if the commit passes fine on [Travis CI](https://travis-ci.org/mdn/browser-compat-data).
5. If Travis is alright, push the git tag as well: `git push origin v0.0.43`.
This step will trigger Travis to publish to npm automatically (see our [.travis.yml file](https://github.com/mdn/browser-compat-data/blob/master/.travis.yml)).
6. Check [Travis CI](https://travis-ci.org/mdn/browser-compat-data) again for the v0.0.43 build and also check [mdn-browser-compat-data on npm](https://www.npmjs.com/package/mdn-browser-compat-data) to see if `0.0.43` shows up correctly once Travis has finished its work.
7. Notify the [#mdndev](irc://irc.mozilla.org/mdndev) IRC channel on irc.mozilla.org about the new release and coordinate with jwhitlock or rjohnson a deployment of the new package to the MDN site.

## Licensing

Please note that the compatibility data is made available under the
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ JSON file containing the compatibility data.

- [webextensions/](https://github.com/mdn/browser-compat-data/tree/master/webextensions) contains data for [WebExtensions](https://developer.mozilla.org/en-US/Add-ons/WebExtensions) JavaScript APIs and manifest keys.

- [xpath/](https://github.com/mdn/browser-compat-data/tree/master/xpath) contains data for [XPath](https://developer.mozilla.org/docs/Web/XPath) axes, and functions.

- [xslt/](https://github.com/mdn/browser-compat-data/tree/master/xslt) contains data for [XSLT](https://developer.mozilla.org/docs/Web/XSLT) elements, attributes, and global attributes.

## Format of the browser compat json files
The definitive description of the format used to represent compatibility data is the [schema file](https://github.com/mdn/browser-compat-data/blob/master/schemas/compat-data.schema.json).
You can also have a look at the [schema documentation](https://github.com/mdn/browser-compat-data/blob/master/schemas/compat-data-schema.md).
Expand Down Expand Up @@ -88,3 +92,4 @@ Here are some projects using the data, as an [npm module](https://www.npmjs.com/
* [compat-tester](https://github.com/SphinxKnight/compat-tester) - Scan local documents for compatibility issues.
* [mdncomp](https://github.com/epistemex/mdncomp) - View compatibility data on the command line.
* [Browser Compatibility Data Explorer](https://github.com/connorshea/mdn-compat-data-explorer) - View, search, and visualize data from the compatibility dataset.
* [Visual Studio Code](https://code.visualstudio.com) - Shows the compatibility information in [the code completion popup](https://code.visualstudio.com/updates/v1_25#_improved-accuracy-of-browser-compatibility-data).
24 changes: 12 additions & 12 deletions api/ANGLE_instanced_arrays.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays",
"support": {
"webview_android": {
"version_added": null
},
"chrome": {
"version_added": null
},
Expand Down Expand Up @@ -42,6 +39,9 @@
},
"samsunginternet_android": {
"version_added": null
},
"webview_android": {
"version_added": null
}
},
"status": {
Expand All @@ -54,9 +54,6 @@
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays/drawArraysInstancedANGLE",
"support": {
"webview_android": {
"version_added": null
},
"chrome": {
"version_added": null
},
Expand Down Expand Up @@ -92,6 +89,9 @@
},
"samsunginternet_android": {
"version_added": null
},
"webview_android": {
"version_added": null
}
},
"status": {
Expand All @@ -105,9 +105,6 @@
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays/drawElementsInstancedANGLE",
"support": {
"webview_android": {
"version_added": null
},
"chrome": {
"version_added": null
},
Expand Down Expand Up @@ -143,6 +140,9 @@
},
"samsunginternet_android": {
"version_added": null
},
"webview_android": {
"version_added": null
}
},
"status": {
Expand All @@ -156,9 +156,6 @@
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays/vertexAttribDivisorANGLE",
"support": {
"webview_android": {
"version_added": null
},
"chrome": {
"version_added": null
},
Expand Down Expand Up @@ -194,6 +191,9 @@
},
"samsunginternet_android": {
"version_added": null
},
"webview_android": {
"version_added": null
}
},
"status": {
Expand Down
40 changes: 20 additions & 20 deletions api/AbortController.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/AbortController",
"support": {
"webview_android": {
"version_added": "66"
},
"chrome": {
"version_added": "66"
},
Expand All @@ -29,10 +26,10 @@
"version_added": false
},
"opera": {
"version_added": "43"
"version_added": "53"
},
"opera_android": {
"version_added": "43"
"version_added": "53"
},
"safari": {
"version_added": "11.1"
Expand All @@ -42,6 +39,9 @@
},
"samsunginternet_android": {
"version_added": false
},
"webview_android": {
"version_added": "66"
}
},
"status": {
Expand All @@ -55,9 +55,6 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/API/AbortController/AbortController",
"description": "<code>AbortController()</code> constructor",
"support": {
"webview_android": {
"version_added": "66"
},
"chrome": {
"version_added": "66"
},
Expand All @@ -80,10 +77,10 @@
"version_added": false
},
"opera": {
"version_added": "43"
"version_added": "53"
},
"opera_android": {
"version_added": "43"
"version_added": "53"
},
"safari": {
"version_added": "11.1"
Expand All @@ -93,6 +90,9 @@
},
"samsunginternet_android": {
"version_added": false
},
"webview_android": {
"version_added": "66"
}
},
"status": {
Expand All @@ -106,9 +106,6 @@
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/AbortController/signal",
"support": {
"webview_android": {
"version_added": "66"
},
"chrome": {
"version_added": "66"
},
Expand All @@ -131,10 +128,10 @@
"version_added": false
},
"opera": {
"version_added": "43"
"version_added": "53"
},
"opera_android": {
"version_added": "43"
"version_added": "53"
},
"safari": {
"version_added": "11.1"
Expand All @@ -144,6 +141,9 @@
},
"samsunginternet_android": {
"version_added": false
},
"webview_android": {
"version_added": "66"
}
},
"status": {
Expand All @@ -157,9 +157,6 @@
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/AbortController/abort",
"support": {
"webview_android": {
"version_added": "66"
},
"chrome": {
"version_added": "66"
},
Expand All @@ -182,10 +179,10 @@
"version_added": false
},
"opera": {
"version_added": "43"
"version_added": "53"
},
"opera_android": {
"version_added": "43"
"version_added": "53"
},
"safari": {
"version_added": "11.1"
Expand All @@ -195,6 +192,9 @@
},
"samsunginternet_android": {
"version_added": false
},
"webview_android": {
"version_added": "66"
}
},
"status": {
Expand Down
Loading

0 comments on commit d3c7ba1

Please sign in to comment.