baseline-browser-mapping 2.10.41 → 2.11.21

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.
@@ -0,0 +1,121 @@
1
+ export type BrowserVersion = {
2
+ browser: string;
3
+ version: string;
4
+ release_date?: string;
5
+ engine?: string;
6
+ engine_version?: string;
7
+ };
8
+ export type Options = {
9
+ /**
10
+ * Whether to include only the minimum compatible browser versions or all compatible versions.
11
+ * Defaults to `false`.
12
+ */
13
+ listAllCompatibleVersions?: boolean;
14
+ /**
15
+ * Whether to include browsers that use the same engines as a core Baseline browser.
16
+ * Defaults to `false`.
17
+ */
18
+ includeDownstreamBrowsers?: boolean;
19
+ /**
20
+ * Pass a date in the format 'YYYY-MM-DD' to get versions compatible with Widely available on the specified date.
21
+ * If left undefined and a `targetYear` is not passed, defaults to Widely available as of the current date.
22
+ * > NOTE: cannot be used with `targetYear`.
23
+ */
24
+ widelyAvailableOnDate?: string | number;
25
+ /**
26
+ * Pass a year between 2015 and the current year to get browser versions compatible with all
27
+ * Newly Available features as of the end of the year specified.
28
+ * > NOTE: cannot be used with `widelyAvailableOnDate`.
29
+ */
30
+ targetYear?: number;
31
+ /**
32
+ * Pass a boolean that determines whether KaiOS is included in browser mappings. KaiOS implements
33
+ * the Gecko engine used in Firefox. However, KaiOS also has a different interaction paradigm to
34
+ * other browsers and requires extra consideration beyond simple feature compatibility to provide
35
+ * an optimal user experience. Defaults to `false`.
36
+ */
37
+ includeKaiOS?: boolean;
38
+ overrideLastUpdated?: number;
39
+ /**
40
+ * Pass a boolean to suppress the warning about stale data.
41
+ * Defaults to `false`.
42
+ */
43
+ suppressWarnings?: boolean;
44
+ };
45
+ export type AllVersionsOptions = {
46
+ /**
47
+ * Whether to return the output as a JavaScript `Array` (`"array"`), `Object` (`"object"`) or a CSV string (`"csv"`).
48
+ * Defaults to `"array"`.
49
+ */
50
+ outputFormat?: string;
51
+ /**
52
+ * Whether to include browsers that use the same engines as a core Baseline browser.
53
+ * Defaults to `false`.
54
+ */
55
+ includeDownstreamBrowsers?: boolean;
56
+ /**
57
+ * Whether to use the new "supports" property in place of "wa_compatible"
58
+ * Defaults to `false`
59
+ */
60
+ useSupports?: boolean;
61
+ /**
62
+ * Whether to include KaiOS in the output. KaiOS implements the Gecko engine used in Firefox.
63
+ * However, KaiOS also has a different interaction paradigm to other browsers and requires extra
64
+ * consideration beyond simple feature compatibility to provide an optimal user experience.
65
+ */
66
+ includeKaiOS?: boolean;
67
+ /**
68
+ * Pass a boolean to suppress the warning about old data.
69
+ * Defaults to `false`.
70
+ */
71
+ suppressWarnings?: boolean;
72
+ };
73
+ export interface AllBrowsersBrowserVersion extends BrowserVersion {
74
+ year: number | string;
75
+ supports?: string;
76
+ wa_compatible?: boolean;
77
+ }
78
+ export type NestedBrowserVersions = {
79
+ [browser: string]: {
80
+ [version: string]: AllBrowsersBrowserVersion;
81
+ };
82
+ };
83
+ export type TimelineOptions = {
84
+ /**
85
+ * Whether to return the timeline as a chronologically sorted array of events grouped by date ("date"),
86
+ * or as an object grouped by browser with their respective history of version changes ("browser").
87
+ * Defaults to "date".
88
+ */
89
+ groupBy?: "date" | "browser";
90
+ /**
91
+ * Whether to include all compatible browsers in each timeline event,
92
+ * or only the browsers that changed on that date.
93
+ * Only applicable when groupBy is "date".
94
+ * Defaults to `false`.
95
+ */
96
+ listAllBrowsers?: boolean;
97
+ /**
98
+ * Whether to include browsers that use the same engines as a core Baseline browser.
99
+ * Defaults to `false`.
100
+ */
101
+ includeDownstreamBrowsers?: boolean;
102
+ /**
103
+ * Whether to include KaiOS in the timeline.
104
+ * Defaults to `false`.
105
+ */
106
+ includeKaiOS?: boolean;
107
+ };
108
+ export type TimelineEvent = {
109
+ date: string;
110
+ browsers: BrowserVersion[];
111
+ };
112
+ export type BrowserTimelineEntry = {
113
+ date: string;
114
+ version: string;
115
+ release_date?: string;
116
+ engine?: string;
117
+ engine_version?: string;
118
+ };
119
+ export type BrowserTimeline = {
120
+ [browser: string]: BrowserTimelineEntry[];
121
+ };
@@ -0,0 +1 @@
1
+ export declare const compareVersions: (nextVersion: string, prevVersion: string) => 1 | 0 | -1;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "baseline-browser-mapping",
3
3
  "main": "./dist/index.cjs",
4
- "version": "2.10.41",
4
+ "version": "2.11.21",
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
  ".": {
@@ -40,16 +40,16 @@
40
40
  "build": "rm -rf dist; npx prettier . --write; rollup -c; rm -rf ./dist/scripts/expose-data.d.ts ./dist/cli.d.ts",
41
41
  "refresh-downstream": "npx tsx scripts/refresh-downstream.ts",
42
42
  "refresh-static": "npx tsx scripts/refresh-static.ts",
43
- "update-data-file": "npx tsx scripts/update-data-file.ts; npx prettier ./src/data/data.js --write",
43
+ "update-timeline": "npx tsx scripts/create-timeline.ts; npx prettier ./src/data/timeline.js --write",
44
44
  "update-data-dependencies": "npm i @mdn/browser-compat-data@latest web-features@latest -D",
45
- "check-data-changes": "git diff --name-only | grep -q '^src/data/data.js$' && echo 'changes-available=TRUE' || echo 'changes-available=FALSE'"
45
+ "check-timeline-changes": "git diff --name-only | grep -q '^src/data/timeline.js$' && echo 'changes-available=TRUE' || echo 'changes-available=FALSE'"
46
46
  },
47
47
  "license": "Apache-2.0",
48
48
  "devDependencies": {
49
- "@mdn/browser-compat-data": "^8.0.4",
49
+ "@mdn/browser-compat-data": "^8.1.0",
50
50
  "@rollup/plugin-terser": "^1.0.0",
51
51
  "@rollup/plugin-typescript": "^12.1.3",
52
- "@types/node": "^22.15.17",
52
+ "@types/node": "^22.19.21",
53
53
  "eslint-plugin-new-with-error": "^5.0.0",
54
54
  "jasmine": "^5.8.0",
55
55
  "jasmine-browser-runner": "^3.0.0",
@@ -59,7 +59,7 @@
59
59
  "tslib": "^2.8.1",
60
60
  "typescript": "^5.7.2",
61
61
  "typescript-eslint": "^8.35.0",
62
- "web-features": "^3.32.0"
62
+ "web-features": "^3.37.0"
63
63
  },
64
64
  "repository": {
65
65
  "type": "git",