baseline-browser-mapping 2.5.9 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/cli.js +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +7 -4
- package/CONTRIBUTING.md +0 -21
- package/dist/scripts/baseline-browser-versions.d.ts +0 -76
- package/dist/scripts/expose-data.d.ts +0 -34
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baseline-browser-mapping",
|
|
3
3
|
"main": "./dist/index.js",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.6.1",
|
|
5
5
|
"description": "A library for obtaining browser versions with their maximum supported Baseline feature set and Widely Available status.",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -16,19 +16,22 @@
|
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"dist/*",
|
|
19
|
+
"!dist/scripts/*",
|
|
19
20
|
"LICENSE.txt",
|
|
20
|
-
"README.md"
|
|
21
|
-
"CONTRIBUTING.md"
|
|
21
|
+
"README.md"
|
|
22
22
|
],
|
|
23
23
|
"types": "./dist/index.d.ts",
|
|
24
24
|
"type": "module",
|
|
25
|
+
"bin": {
|
|
26
|
+
"baseline-browser-mapping": "./dist/cli.js"
|
|
27
|
+
},
|
|
25
28
|
"scripts": {
|
|
26
29
|
"test:format": "npx prettier --check .",
|
|
27
30
|
"test:lint": "npx eslint .",
|
|
28
31
|
"test:bcb": "mkdir test-bcb && cd test-bcb && npm init -y && npm i ../../baseline-browser-mapping browserslist browserslist-config-baseline &&jq '. += {\"browserslist\":[\"extends browserslist-config-baseline\"]}' package.json >p && mv p package.json && npx browserslist && cd ../ && rm -rf test-bcb",
|
|
29
32
|
"test:jasmine": "npx jasmine",
|
|
30
33
|
"test": "npm run build && rm -rf test-bcb && npm run test:format && npm run test:lint && npx jasmine && npm run test:bcb",
|
|
31
|
-
"build": "rm -rf dist; npx prettier . --write; rollup -c",
|
|
34
|
+
"build": "rm -rf dist; npx prettier . --write; rollup -c; rm -rf ./dist/scripts/expose-data.d.ts ./dist/cli.d.ts",
|
|
32
35
|
"refresh-downstream": "npx tsx scripts/refresh-downstream.ts",
|
|
33
36
|
"refresh-static": "npx tsx scripts/refresh-static.ts",
|
|
34
37
|
"update-data-file": "npx tsx scripts/update-data-file.ts; npx prettier ./src/data/data.js --write",
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Contributing to `baseline-browser-mapping`
|
|
2
|
-
|
|
3
|
-
## Bugs
|
|
4
|
-
|
|
5
|
-
If you find a functional bug in `baseline-browser-mapping`, please create an issue in this repository. Any detail you can include, including as console errors, expected and actual output, is welcome. If you've already figured out how to solve the issue, please create a PR.
|
|
6
|
-
|
|
7
|
-
## Downstream browser data accuracy and completeness
|
|
8
|
-
|
|
9
|
-
The data for [Chromium downstream browsers](/README.md#limitations) not included in `@mdn/browser-compat-data` is provided on a best effort basis in [`src/data/downstream-browsers.json`](src/data/downstream-browsers.json). If you have an accurate source for the Chromium versions implemented by the browsers already in this module (UC Mobile, QQ Mobile, Yandex Browser), or if you have data for a browser not included in this module, we welcome issues or PRs to discuss including that data.
|
|
10
|
-
|
|
11
|
-
## Working with `baseline-browser-mapping` locally
|
|
12
|
-
|
|
13
|
-
To work with `baseline-browser-mapping` locally, clone this repository and install its dependencies:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
git clone https://github.com/web-platform-dx/baseline-browser-mapping
|
|
17
|
-
cd baseline-browser-mapping
|
|
18
|
-
npm install
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
If you make changes to the code, make sure to run `nmp run prepare` before you test your changes from another package.
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
type BrowserVersion = {
|
|
2
|
-
browser: string;
|
|
3
|
-
version: string;
|
|
4
|
-
release_date?: string;
|
|
5
|
-
engine?: string;
|
|
6
|
-
engine_version?: string;
|
|
7
|
-
};
|
|
8
|
-
interface AllBrowsersBrowserVersion extends BrowserVersion {
|
|
9
|
-
year: number | string;
|
|
10
|
-
supports?: string;
|
|
11
|
-
wa_compatible?: boolean;
|
|
12
|
-
}
|
|
13
|
-
type NestedBrowserVersions = {
|
|
14
|
-
[browser: string]: {
|
|
15
|
-
[version: string]: AllBrowsersBrowserVersion;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
type Options = {
|
|
19
|
-
/**
|
|
20
|
-
* Whether to include only the minimum compatible browser versions or all compatible versions.
|
|
21
|
-
* Defaults to `false`.
|
|
22
|
-
*/
|
|
23
|
-
listAllCompatibleVersions?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Whether to include browsers that use the same engines as a core Baseline browser.
|
|
26
|
-
* Defaults to `false`.
|
|
27
|
-
*/
|
|
28
|
-
includeDownstreamBrowsers?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Pass a date in the format 'YYYY-MM-DD' to get versions compatible with Widely available on the specified date.
|
|
31
|
-
* If left undefined and a `targetYear` is not passed, defaults to Widely available as of the current date.
|
|
32
|
-
* > NOTE: cannot be used with `targetYear`.
|
|
33
|
-
*/
|
|
34
|
-
widelyAvailableOnDate?: string | number;
|
|
35
|
-
/**
|
|
36
|
-
* Pass a year between 2015 and the current year to get browser versions compatible with all
|
|
37
|
-
* Newly Available features as of the end of the year specified.
|
|
38
|
-
* > NOTE: cannot be used with `widelyAvailableOnDate`.
|
|
39
|
-
*/
|
|
40
|
-
targetYear?: number;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Returns browser versions compatible with specified Baseline targets.
|
|
44
|
-
* Defaults to returning the minimum versions of the core browser set that support Baseline Widely available.
|
|
45
|
-
* Takes an optional configuraation object `Object` with four optional properties:
|
|
46
|
-
* - `listAllCompatibleVersions`: `false` (default) or `false`
|
|
47
|
-
* - `includeDownstreamBrowsers`: `false` (default) or `false`
|
|
48
|
-
* - `widelyAvailableOnDate`: date in format `YYYY-MM-DD`
|
|
49
|
-
* - `targetYear`: year in format `YYYY`
|
|
50
|
-
*/
|
|
51
|
-
export declare function getCompatibleVersions(userOptions?: Options): BrowserVersion[];
|
|
52
|
-
type AllVersionsOptions = {
|
|
53
|
-
/**
|
|
54
|
-
* Whether to return the output as a Javascript `Array` (`array`) or a CSV string (`csv`).
|
|
55
|
-
* Defaults to `array`.
|
|
56
|
-
*/
|
|
57
|
-
outputFormat?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Whether to include browsers that use the same engines as a core Baseline browser.
|
|
60
|
-
* Defaults to `false`.
|
|
61
|
-
*/
|
|
62
|
-
includeDownstreamBrowsers?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Whether to use the new "supports" property in place of "wa_compatible"
|
|
65
|
-
* Defaults to `false`
|
|
66
|
-
*/
|
|
67
|
-
useSupports?: boolean;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* Returns all browser versions known to this module with their level of Baseline support either as an `Array` or a `String` CSV.
|
|
71
|
-
* Takes an object as an argument with two optional properties:
|
|
72
|
-
* - `includeDownstreamBrowsers`: `true` (default) or `false`
|
|
73
|
-
* - `outputFormat`: `array` (default), `object` or `csv`
|
|
74
|
-
*/
|
|
75
|
-
export declare function getAllVersions(userOptions?: AllVersionsOptions): AllBrowsersBrowserVersion[] | NestedBrowserVersions | string;
|
|
76
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
type FeatureKeyed = {
|
|
2
|
-
id: string;
|
|
3
|
-
status: {
|
|
4
|
-
baseline_low_date: string;
|
|
5
|
-
support: {
|
|
6
|
-
[key: string]: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
type BrowserVersionKeyed = {
|
|
11
|
-
version: string;
|
|
12
|
-
release_date: string | undefined;
|
|
13
|
-
status: string | undefined;
|
|
14
|
-
engine: string | undefined;
|
|
15
|
-
engine_version: string | undefined;
|
|
16
|
-
};
|
|
17
|
-
declare const features: {
|
|
18
|
-
[key: string]: FeatureKeyed;
|
|
19
|
-
};
|
|
20
|
-
declare const bcdBrowsers: {
|
|
21
|
-
[browser: string]: {
|
|
22
|
-
releases: {
|
|
23
|
-
[key: string]: BrowserVersionKeyed;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
declare const otherBrowsers: {
|
|
28
|
-
[browser: string]: {
|
|
29
|
-
releases: {
|
|
30
|
-
[key: string]: BrowserVersionKeyed;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
export { features, bcdBrowsers, otherBrowsers };
|