baseline-browser-mapping 2.5.1 → 2.5.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 +7 -16
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -47,15 +47,6 @@ If you want to load the script and data directly in a web page without hosting i
|
|
|
47
47
|
</script>
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
`baseline-browser-mapping` is packaged as an ES module by default. If you need to run it in a legacy environment that doesn't support ES modules, use the `/legacy` version:
|
|
51
|
-
|
|
52
|
-
```javascript
|
|
53
|
-
const {
|
|
54
|
-
getCompatibleVersions,
|
|
55
|
-
getAllVersions,
|
|
56
|
-
} = require("baseline-browser-mapping/legacy");
|
|
57
|
-
```
|
|
58
|
-
|
|
59
50
|
## Get Baseline Widely available browser versions or Baseline year browser versions
|
|
60
51
|
|
|
61
52
|
To get the current list of minimum browser versions compatible with Baseline Widely available features from the core browser set, call the `getCompatibleVersions()` function:
|
|
@@ -90,7 +81,7 @@ Executed on 7th March 2025, the above code returns the following browser version
|
|
|
90
81
|
];
|
|
91
82
|
```
|
|
92
83
|
|
|
93
|
-
> [!NOTE]
|
|
84
|
+
> [!NOTE]
|
|
94
85
|
> The minimum versions of each browser are not necessarily the final release before the Widely available cutoff date of `TODAY - 30 MONTHS`. Some earlier versions will have supported the full Widely available feature set.
|
|
95
86
|
|
|
96
87
|
### `getCompatibleVersions()` configuration options
|
|
@@ -138,9 +129,9 @@ Returns the following versions:
|
|
|
138
129
|
];
|
|
139
130
|
```
|
|
140
131
|
|
|
141
|
-
> [!NOTE]
|
|
142
|
-
> The minimum version of each browser is not necessarily the final version released in that calendar year. In the above example, Firefox 84 was the final version released in 2020; however Firefox 83 supported all of the features that were interoperable at the end of 2020.
|
|
143
|
-
> [!WARNING]
|
|
132
|
+
> [!NOTE]
|
|
133
|
+
> The minimum version of each browser is not necessarily the final version released in that calendar year. In the above example, Firefox 84 was the final version released in 2020; however Firefox 83 supported all of the features that were interoperable at the end of 2020.
|
|
134
|
+
> [!WARNING]
|
|
144
135
|
> You cannot use `targetYear` and `widelyAavailableDate` together. Please only use one of these options at a time.
|
|
145
136
|
|
|
146
137
|
#### `widelyAvailableOnDate`
|
|
@@ -153,7 +144,7 @@ getCompatibleVersions({
|
|
|
153
144
|
});
|
|
154
145
|
```
|
|
155
146
|
|
|
156
|
-
> [!TIP]
|
|
147
|
+
> [!TIP]
|
|
157
148
|
> This option is useful if you provide a versioned library that targets Baseline Widely available on each version's release date and you need to provide a statement on minimum supported browser versions in your documentation.
|
|
158
149
|
|
|
159
150
|
#### `includeDownstreamBrowsers`
|
|
@@ -374,7 +365,7 @@ Shows UC Browser Mobile 13.8 implementing Chromium 100, and:
|
|
|
374
365
|
|
|
375
366
|
Shows Yandex Browser Mobile 24.10 implementing Chromium 128. The Chromium version from this string is mapped to the corresponding Chrome version from MDN `browser-compat-data`.
|
|
376
367
|
|
|
377
|
-
> [!NOTE]
|
|
368
|
+
> [!NOTE]
|
|
378
369
|
> Where possible, approximate release dates have been included based on useragents.io "first seen" data. useragents.io does not have "first seen" dates prior to June 2020. However, these browsers' Baseline compatibility is determined by their Chromium version, so their release dates are more informative than critical.
|
|
379
370
|
|
|
380
371
|
This data is updated on a daily basis using a [script](https://github.com/web-platform-dx/web-features/tree/main/scripts/refresh-downstream.ts) triggered by a GitHub [action](https://github.com/web-platform-dx/web-features/tree/main/.github/workflows/refresh_downstream.yml). Useragents.io provides a private API for this module which exposes the last 7 days of newly seen user agents for the currently tracked browsers. If a new major version of one of the tracked browsers is encountered with a Chromium version that meets or exceeds the previous latest version of that browser, it is added to the [src/data/downstream-browsers.json](src/data/downstream-browsers.json) file with the date it was first seen by useragents.io as its release date.
|
|
@@ -398,5 +389,5 @@ This data is updated on a daily basis using a [script](https://github.com/web-pl
|
|
|
398
389
|
| UC Browser Mobile | `uc_android` | `false` | useragents.io |
|
|
399
390
|
| Yandex Browser Mobile | `ya_android` | `false` | useragents.io |
|
|
400
391
|
|
|
401
|
-
> [!NOTE]
|
|
392
|
+
> [!NOTE]
|
|
402
393
|
> All the non-core browsers currently included implement Chromium. Their inclusion in any of the above methods is based on the Baseline feature set supported by the Chromium version they implement, not their release date.
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baseline-browser-mapping",
|
|
3
3
|
"main": "./dist/index.js",
|
|
4
|
-
"version": "2.5.
|
|
4
|
+
"version": "2.5.3",
|
|
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
|
".": {
|
|
8
|
-
"require": "./dist/index.
|
|
9
|
-
"types": "./dist/index.d.ts"
|
|
8
|
+
"require": "./dist/index.cjs",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
10
11
|
},
|
|
11
12
|
"./legacy": {
|
|
12
13
|
"require": "./dist/index.cjs",
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
"README.md",
|
|
20
21
|
"CONTRIBUTING.md"
|
|
21
22
|
],
|
|
22
|
-
"types": "./index.d.ts",
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
23
24
|
"type": "module",
|
|
24
25
|
"scripts": {
|
|
25
26
|
"test:format": "npx prettier --check .",
|