Skip to content

Commit

Permalink
Merge master-scoped-package to master (#7155)
Browse files Browse the repository at this point in the history
This concludes the `mdn-` package name and continues development under the `@mdn/browser-compat-data` name.

* Implement 2.0.0 breaking changes (#6713)

* Rename package and increment version to pre-2.0
* Require Node 10 or later
* Rename package in the docs
* Increment prerelease version

* Initial release of @mdn/browser-compat-data

A continuation of mdn/browser-compat-data

* Patch release containing data or non-breaking updates only

* Revert "Add mdn- and Node.js 8 deprecation warnings for 1.1 release (#6777)"

This applies only to the 1.1.x releases.

This reverts commit ee7feac.

* Patch release containing data or non-breaking updates only

* Patch release containing data or non-breaking updates only

* Use Node.js ≥10 for CI and drop Travis (#6797)

* Use Node.js ≥10 for CI
* Remove Travis CI config
* Remove badges from README

* Patch release containing data or non-breaking updates only
  • Loading branch information
ddbeck authored Oct 29, 2020
1 parent e2089e3 commit b816c3a
Show file tree
Hide file tree
Showing 13 changed files with 140 additions and 91 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:

strategy:
matrix:
# TODO: hoist to 10.x when we bump the version supported in #5931
node-version: [ 8.x ]
node-version: [ 10.x, 14.x ]

steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
# TODO: hoist to 10.x when we bump the version supported in #5931
node-version: 8.x
node-version: 10.x
registry-url: "https://registry.npmjs.org/"
- run: npm install
- run: npm test
Expand Down
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Governance

[mdn-browser-compat-data](https://github.com/mdn/browser-compat-data) (also often referred to as "BCD") is an open source project that depends on contributions from the community. As long as they abide by the project’s Contribution Guidelines, anyone may contribute to the project at any time by submitting code, participating in discussions, making suggestions, or any other contribution they see fit. This document describes how various types of contributors work within the mdn-browser-compat-data project and how decisions are made.
[`@mdn/browser-compat-data`](https://github.com/mdn/browser-compat-data) (also often referred to as "BCD") is an open source project that depends on contributions from the community. As long as they abide by the project’s Contribution Guidelines, anyone may contribute to the project at any time by submitting code, participating in discussions, making suggestions, or any other contribution they see fit. This document describes how various types of contributors work within the `@mdn/browser-compat-data` project and how decisions are made.

## Roles and Responsibilities

Expand Down Expand Up @@ -66,7 +66,7 @@ A Peer who shows an above-average level of contribution to the project, particul

### Owners

The mdn-browser-compat-data project is jointly governed by the [Mozilla MDN staff team](https://wiki.mozilla.org/Engagement/MDN_Durable_Team#Team_Members), the [MDN Product Advisory Board Members](https://developer.mozilla.org/en-US/docs/MDN/MDN_Product_Advisory_Board/Members), and the [Owner group](#list-of-current-owners). They are collectively responsible for high-level guidance of the project.
The `@mdn/browser-compat-data` project is jointly governed by the [Mozilla MDN staff team](https://wiki.mozilla.org/Engagement/MDN_Durable_Team#Team_Members), the [MDN Product Advisory Board Members](https://developer.mozilla.org/en-US/docs/MDN/MDN_Product_Advisory_Board/Members), and the [Owner group](#list-of-current-owners). They are collectively responsible for high-level guidance of the project.

The [Owner group](#list-of-current-owners) has final authority over this project including:

Expand Down Expand Up @@ -108,7 +108,7 @@ An individual is invited to become an Owner by existing Owners. A nomination wil

## Additional paths to becoming a Peer or Owner

Some Owners or Peers are also [MDN Content Curators](https://developer.mozilla.org/en-US/docs/MDN/Contribute/Documentation_topics_and_curators) and have thus earned the privilege to be a mdn-browser-compat-data Peer, so that their expertise in a given content area (CSS, HTML, etc.) can help improve the compat data for that same content area. Such Peers are marked in the relevant folders using GitHub’s Code Owner mechanism.
Some Owners or Peers are also [MDN Content Curators](https://developer.mozilla.org/en-US/docs/MDN/Contribute/Documentation_topics_and_curators) and have thus earned the privilege to be a `@mdn/browser-compat-data` Peer, so that their expertise in a given content area (CSS, HTML, etc.) can help improve the compat data for that same content area. Such Peers are marked in the relevant folders using GitHub’s Code Owner mechanism.

Peers might also be representatives of browser vendors and have expertise and/or access to browser-specific information within their company. Their company name is listed in the Peer list.

Expand Down Expand Up @@ -162,7 +162,7 @@ The moderator is responsible for summarizing the discussion of each agenda item

## Peers and owners emeriti

The mdn-browser-compat-data project would like to thank the following former Owners and Peers for their contributions and the countless hours invested.
The `@mdn/browser-compat-data` project would like to thank the following former Owners and Peers for their contributions and the countless hours invested.

- Richard Bloor (@rebloor) (Peer for WebExtensions compat data)
- Jean-Yves Perrier (@teoli2003) (Former project lead, schema design co-author)
Expand Down
123 changes: 120 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,122 @@
# Use [`@mdn/browser-compat-data`](https://www.npmjs.com/package/@mdn/browser-compat-data) instead!
# `@mdn/browser-compat-data`

This package is deprecated. Use [`@mdn/browser-compat-data`](https://www.npmjs.com/package/@mdn/browser-compat-data) instead.
[https://github.com/mdn/browser-compat-data](https://github.com/mdn/browser-compat-data)

If you're already using `mdn-browser-compat-data`, read [the upgrade guide](https://github.com/mdn/browser-compat-data/blob/v1.1.0/UPGRADE-2.0.x.md).
This repository contains compatibility data for Web technologies.
Browser compatibility data describes which platforms (where "platforms" are
usually, but not always, web browsers) support particular Web APIs.

This data can be used in documentation, to build compatibility tables listing
browser support for APIs. For example:
[Browser support for WebExtension APIs](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs).

Read how this project is [governed](https://github.com/mdn/browser-compat-data/blob/master/GOVERNANCE.md).

Chat on [chat.mozilla.org#mdn](https://chat.mozilla.org/#/room/#mdn:mozilla.org).

## Installation

You can install `@mdn/browser-compat-data` as a node package.

```
npm install @mdn/browser-compat-data
```

## Usage

```js
const bcd = require('@mdn/browser-compat-data');
bcd.css.properties.background;
// returns a compat data object (see schema)
```

## Repository contents

There's a top-level directory for each broad area covered: for example, "http",
"javascript", "webextensions". Inside each of these directories is one or more
JSON file containing the compatibility data.

- [api/](https://github.com/mdn/browser-compat-data/tree/master/api) contains data for each [Web API](https://developer.mozilla.org/en-US/docs/Web/API) interface.

- [css/](https://github.com/mdn/browser-compat-data/tree/master/css) contains data for [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) properties, selectors, and at-rules.

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

- [http/](https://github.com/mdn/browser-compat-data/tree/master/http) contains data for [HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP) headers, statuses, and methods.

- [javascript/](https://github.com/mdn/browser-compat-data/tree/master/javascript) contains data for [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript) built-in Objects, statement, operators, and other ECMAScript language features.

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

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

- [webdriver/](https://github.com/mdn/browser-compat-data/tree/master/webdriver) contains data for [WebDriver](https://developer.mozilla.org/en-US/docs/Web/WebDriver) commands.

- [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).

## Issues?

If you find a problem, please [file a bug](https://github.com/mdn/browser-compat-data/issues/new).

## Contributing

We're very happy to accept contributions to this data. See [Contributing to browser-compat-data](/docs/contributing.md) for more information.

## Projects using the data

Here are some projects using the data, as an [npm module](https://www.npmjs.com/browse/depended/@mdn/browser-compat-data) or directly:

- [Add-ons Linter](https://github.com/mozilla/addons-linter) - the Add-ons Linter is used on [addons.mozilla.org](https://addons.mozilla.org/) and the [web-ext](https://github.com/mozilla/web-ext/) tool. It uses browser-compat-data to check that the Firefox version that the add-on lists support for does in fact support the APIs used by the add-on.
- [Browser Compatibility Data Explorer](https://github.com/connorshea/mdn-compat-data-explorer) - View, search, and visualize data from the compatibility dataset.
- [caniuse](https://caniuse.com/) - In addition to the existing caniuse database, caniuse includes features from the MDN BCD project, formatted and interactive like any other caniuse support table.
- [Compat Report](https://addons.mozilla.org/en-US/firefox/addon/compat-report/) - Firefox Add-on that shows compatibility data for the current site in the developer tools.
- [compat-tester](https://github.com/SphinxKnight/compat-tester) - Scan local documents for compatibility issues.
- [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).
- [webhint.io](https://webhint.io/docs/user-guide/hints/hint-compat-api/) - Hints to check if your CSS HTML and JavaScript have deprecated or not broadly supported features.
- [WebStorm](https://www.jetbrains.com/webstorm/whatsnew/#v2019-1-html-and-css) - JavaScript IDE allowing you to check whether all CSS properties you use are supported in the target browser version.
- [Hexo Plugin: hexo-compat-report](https://github.com/TimDaub/hexo-compat-report) - Allows to embed MDN's compatibility table in a hexo blog post.

## Acknowledgments

Thanks to:

<table>
<tr align="center">
<td>
<img
src="https://user-images.githubusercontent.com/498917/52569900-852b3080-2e12-11e9-9bd0-f1e256b13e53.png"
height="86"
alt="BrowserStack"
/>
<p>
The
<a href="https://www.browserstack.com/open-source"
>BrowserStack Open Source Program</a
>
for testing services
</p>
</td>
<td>
<img
src="https://opensource.saucelabs.com/images/opensauce/powered-by-saucelabs-badge-white.png?sanitize=true"
height="86"
alt="Testing Powered By Sauce Labs"
/>
<p>
<a href="https://opensource.saucelabs.com/">Sauce Labs Open Source</a
>
for testing services
</p>
</td>
</tr>
</table>
30 changes: 0 additions & 30 deletions UPGRADE-2.0.x.md

This file was deleted.

6 changes: 3 additions & 3 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to browser-compat-data

We're really happy to accept contributions to the mdn-browser-compat-data repository!
We're really happy to accept contributions to the mdn/browser-compat-data repository!

## Table of contents

Expand Down Expand Up @@ -44,8 +44,8 @@ It takes up to four weeks for BCD changes to be reflected in MDN's browser compa
The process is:

1. A pull request is reviewed and merged to `master`.
2. Project owners publish a new release of [mdn-browser-compat-data](https://www.npmjs.com/package/mdn-browser-compat-data).
See [Publishing a new version of `mdn-browser-compat-data`](publishing.md) for details.
2. Project owners publish a new release of [`@mdn/browser-compat-data`](https://www.npmjs.com/package/@mdn/browser-compat-data).
See [Publishing a new version of `@mdn/browser-compat-data`](publishing.md) for details.
3. MDN staff build and deploy a new image of [Kumascript](https://github.com/mdn/kumascript), which includes the BCD release, to production.
This typically happens within a day of the release of the npm package.
4. Tables are generated on MDN:
Expand Down
4 changes: 2 additions & 2 deletions docs/publishing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Publishing a new version of `mdn-browser-compat-data`
# Publishing a new version of `@mdn/browser-compat-data`

[Project owners](/GOVERNANCE.md#owners) publish new releases of [mdn-browser-compat-data](https://www.npmjs.com/package/mdn-browser-compat-data) on npm.
[Project owners](/GOVERNANCE.md#owners) publish new releases of [`@mdn/browser-compat-data`](https://www.npmjs.com/package/@mdn/browser-compat-data) on npm.
MDN staff [deploy the package to the MDN site](contributing.md#updating-compatibility-tables-on-mdn).
Usually, this happens every Thursday (MDN never deploys to production on Fridays).

Expand Down
29 changes: 0 additions & 29 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,6 @@ const fs = require('fs');
const path = require('path');
const extend = require('extend');

function warnPackageName() {
if (!warnPackageName.emitted) {
warnPackageName.emitted = true;
process.emitWarning(
'mdn-browser-compat-data is deprecated. Upgrade to @mdn/browser-compat-data. Learn more: https://github.com/mdn/browser-compat-data/blob/v1.1.0/UPGRADE-2.0.x.md',
{
type: 'DeprecationWarning',
},
);
}
}

function warnNode8Deprecation() {
if (!warnNode8Deprecation.emitted) {
warnNode8Deprecation.emitted = true;
if (process.version.split('.')[0] === 'v8') {
process.emitWarning(
'mdn-browser-compat-data: @mdn/browser-compat-data ends support for Node.js 8. Upgrade to Node.js 10 or later.',
{
type: 'DeprecationWarning',
},
);
}
}
}

warnPackageName();
warnNode8Deprecation();

function load() {
// Recursively load one or more directories passed as arguments.
let dir,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "mdn-browser-compat-data",
"version": "1.1.2",
"name": "@mdn/browser-compat-data",
"version": "2.0.4",
"description": "Browser compatibility data provided by MDN Web Docs",
"main": "index.js",
"types": "index.d.ts",
"dependencies": {
"extend": "3.0.2"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions schemas/browsers-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ The release objects consist of the following properties:

### Exports

This structure is exported for consumers of `mdn-browser-compat-data`:
This structure is exported for consumers of `@mdn/browser-compat-data`:

```js
> const compat = require('mdn-browser-compat-data');
> const compat = require('@mdn/browser-compat-data');
> compat.browsers.firefox.releases['1.5'].status;
// "retired"
```
4 changes: 2 additions & 2 deletions schemas/compat-data-schema.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The mdn-browser-compat-data JSON schema
# The compat data JSON schema

This document helps you to understand how mdn-browser-compat-data is organized and structured.
This document helps you to understand how compatibility data is organized and structured.

## Where to find compat data

Expand Down

0 comments on commit b816c3a

Please sign in to comment.