baseline-browser-mapping 2.4.1 → 2.4.3
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
CHANGED
|
@@ -17,11 +17,11 @@ To install the package, run:
|
|
|
17
17
|
|
|
18
18
|
`npm install --save baseline-browser-mapping`
|
|
19
19
|
|
|
20
|
-
`baseline-browser-mapping` depends on `web-features` and `@mdn/browser-compat-data` for version selection.
|
|
20
|
+
`baseline-browser-mapping` depends on `web-features` and `@mdn/browser-compat-data` for version selection. This package uses dependabot to automatically update both modules on all minor and patch version releases and is updated frequently. Consider adding a script to your `package.json` to update `basesline-browser-mapping` and using it as a build step:
|
|
21
21
|
|
|
22
22
|
```javascript
|
|
23
23
|
"scripts": [
|
|
24
|
-
"refresh-baseline-browser-mapping": "npm i --save baseline-browser-mapping@latest
|
|
24
|
+
"refresh-baseline-browser-mapping": "npm i --save baseline-browser-mapping@latest"
|
|
25
25
|
]
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -133,7 +133,7 @@ Setting `includeDownstreamBrowsers` to `true` will include browsers outside of t
|
|
|
133
133
|
|
|
134
134
|
```javascript
|
|
135
135
|
getCompatibleVersions({
|
|
136
|
-
|
|
136
|
+
includeDownstreamBrowsers: true,
|
|
137
137
|
});
|
|
138
138
|
```
|
|
139
139
|
|
|
@@ -175,6 +175,8 @@ By default, this function returns an `Array` of `Objects` and excludes downstrea
|
|
|
175
175
|
]
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
+
For browser versions in `@mdn/browser-compat-data` that were released before Baseline can be defined, i.e. Baseline 2015, the `year` property is always the string: `"pre_baseline"`.
|
|
179
|
+
|
|
178
180
|
### Understanding which browsers support Newly available features
|
|
179
181
|
|
|
180
182
|
You may want to understand which recent browser versions support all Newly available features. You can replace the `wa_compatible` property with a `supports` property using the `useSupport` option:
|
|
@@ -185,13 +187,12 @@ getAllVersions({
|
|
|
185
187
|
});
|
|
186
188
|
```
|
|
187
189
|
|
|
188
|
-
The `supports` property has
|
|
190
|
+
The `supports` property is optional and has two possible values:
|
|
189
191
|
|
|
190
|
-
- `year_only` for browser versions that do not support all Baseline Widely available Newly Available features.
|
|
191
192
|
- `widely` for browser versions that support all Widely available features.
|
|
192
193
|
- `newly` for browser versions that support all Newly available features.
|
|
193
194
|
|
|
194
|
-
Browser versions that support all Newly available features also support all Widely available features.
|
|
195
|
+
Browser versions that do not support Widely or Newly available will not include the `support` property in the `array` or `object` outputs, and in the CSV output, the `support` column will contain an empty string. Browser versions that support all Newly available features also support all Widely available features.
|
|
195
196
|
|
|
196
197
|
### `getAllVersions()` Configuration options
|
|
197
198
|
|
|
@@ -251,7 +252,6 @@ In thise case, `getAllVersions()` returns a nested object with the browser [IDs
|
|
|
251
252
|
"chrome": {
|
|
252
253
|
"53": {
|
|
253
254
|
"year": 2016,
|
|
254
|
-
"supports": "year_only",
|
|
255
255
|
"release_date": "2016-09-07"
|
|
256
256
|
},
|
|
257
257
|
...
|
|
@@ -266,7 +266,6 @@ Downstream browsers will include extra fields for `engine` and `engine_versions`
|
|
|
266
266
|
"webview_android": {
|
|
267
267
|
"53": {
|
|
268
268
|
"year": 2016,
|
|
269
|
-
"supports": "year_only",
|
|
270
269
|
"release_date": "2016-09-07",
|
|
271
270
|
"engine": "Blink",
|
|
272
271
|
"engine_version": "53"
|
|
@@ -287,7 +286,10 @@ getAllVersions({
|
|
|
287
286
|
|
|
288
287
|
```csv
|
|
289
288
|
"browser","version","year","supports","release_date","engine","engine_version"
|
|
290
|
-
|
|
289
|
+
...
|
|
290
|
+
"chrome","24","pre_baseline","","2013-01-10","NULL","NULL"
|
|
291
|
+
...
|
|
292
|
+
"chrome","53","2016","","2016-09-07","NULL","NULL"
|
|
291
293
|
...
|
|
292
294
|
"firefox","135","2024","widely","2025-02-04","NULL","NULL"
|
|
293
295
|
"firefox","136","2024","newly","2025-03-04","NULL","NULL"
|
|
@@ -307,7 +309,7 @@ The outputs of `getAllVersions()` are available as JSON or CSV files generated o
|
|
|
307
309
|
- [Array](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_array.json)
|
|
308
310
|
- [Object](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_object.json)
|
|
309
311
|
- [CSV](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions.csv)
|
|
310
|
-
|
|
312
|
+
- Core browsers only, with `supports` property
|
|
311
313
|
- [Array](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_array_with_supports.json)
|
|
312
314
|
- [Object](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_object_with_supports.json)
|
|
313
315
|
- [CSV](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_with_supports.csv)
|
|
@@ -1019,6 +1019,12 @@
|
|
|
1019
1019
|
"engine_version": "100",
|
|
1020
1020
|
"status": "unknown",
|
|
1021
1021
|
"release_date": "2025-04-08"
|
|
1022
|
+
},
|
|
1023
|
+
"17.6": {
|
|
1024
|
+
"engine": "Blink",
|
|
1025
|
+
"engine_version": "123",
|
|
1026
|
+
"status": "unknown",
|
|
1027
|
+
"release_date": "2025-05-15"
|
|
1022
1028
|
}
|
|
1023
1029
|
}
|
|
1024
1030
|
},
|
|
@@ -1522,5 +1528,5 @@
|
|
|
1522
1528
|
}
|
|
1523
1529
|
}
|
|
1524
1530
|
},
|
|
1525
|
-
"lastUpdated": "2025-
|
|
1531
|
+
"lastUpdated": "2025-05-15T14:12:48.308Z"
|
|
1526
1532
|
}
|
|
@@ -69,19 +69,17 @@ const compareVersions = (incomingVersionString, previousVersionString) => {
|
|
|
69
69
|
return -1;
|
|
70
70
|
};
|
|
71
71
|
const getCompatibleFeaturesByDate = (date) => {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
72
|
+
return Object.entries(features)
|
|
73
|
+
.filter(([feature_id, feature]) => feature.status.baseline_low_date &&
|
|
74
|
+
new Date(feature.status.baseline_low_date) <= date)
|
|
75
|
+
.map(([feature_id, feature]) => {
|
|
76
|
+
return {
|
|
77
|
+
id: feature_id,
|
|
78
|
+
name: feature.name,
|
|
79
|
+
baseline_low_date: feature.status.baseline_low_date,
|
|
80
|
+
support: feature.status.support,
|
|
81
|
+
};
|
|
83
82
|
});
|
|
84
|
-
return compatibleFeatures;
|
|
85
83
|
};
|
|
86
84
|
const getMinimumVersionsFromFeatures = (features) => {
|
|
87
85
|
let minimumVersions = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baseline-browser-mapping",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3",
|
|
4
4
|
"description": "A library for obtaining browser versions with their maximum supported Baseline feature set and Widely Available status.",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js"
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@mdn/browser-compat-data": "^6.0.
|
|
25
|
-
"web-features": "^2.
|
|
24
|
+
"@mdn/browser-compat-data": "^6.0.15",
|
|
25
|
+
"web-features": "^2.35.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^22.15.17",
|