baseline-browser-mapping 2.6.7 → 2.7.0

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
@@ -149,7 +149,7 @@ getCompatibleVersions({
149
149
 
150
150
  #### `includeDownstreamBrowsers`
151
151
 
152
- Setting `includeDownstreamBrowsers` to `true` will include browsers outside of the Baseline core browser set where it is possible to map those browsers to an upstream Chromium version:
152
+ Setting `includeDownstreamBrowsers` to `true` will include browsers outside of the Baseline core browser set where it is possible to map those browsers to an upstream Chromium or Gecko version:
153
153
 
154
154
  ```javascript
155
155
  getCompatibleVersions({
@@ -159,6 +159,20 @@ getCompatibleVersions({
159
159
 
160
160
  For more information on downstream browsers, see [the section on downstream browsers](#downstream-browsers) below.
161
161
 
162
+ #### `includeKaiOS`
163
+
164
+ KaiOS is an operating system and app framework based on the Gecko engine from Firefox. KaiOS is based on the Gecko engine and feature support can be derived from the upstream Gecko version that each KaiOS version implements. However KaiOS requires other considerations beyond feature compatibility to ensure a good user experience as it runs on device types that do not have either mouse and keyboard or touch screen input in the way that all the other browsers supported by this module do.
165
+
166
+ ```javascript
167
+ getCompatibleVersions({
168
+ includeDownstreamBrowsers: true,
169
+ includeKaiOS: true,
170
+ });
171
+ ```
172
+
173
+ > [!NOTE]
174
+ > Including KaiOS requires you to include all downstream browsers using the `includeDownstreamBrowsers` option.
175
+
162
176
  #### `listAllCompatibleVersions`
163
177
 
164
178
  Setting `listAllCompatibleVersions` to true will include the minimum versions of each compatible browser, and all the subsequent versions:
@@ -227,7 +241,7 @@ Browser versions that do not support Widely or Newly available will not include
227
241
 
228
242
  #### `includeDownstreamBrowsers` (in `getAllVersions()` output)
229
243
 
230
- As with `getCompatibleVersions()`, you can set `includeDownstreamBrowsers` to `true` to include the Chromium downstream browsers [listed below](#list-of-downstream-browsers).
244
+ As with `getCompatibleVersions()`, you can set `includeDownstreamBrowsers` to `true` to include the Chromium and Gecko downstream browsers [listed below](#list-of-downstream-browsers).
231
245
 
232
246
  ```javascript
233
247
  getAllVersions({
@@ -253,6 +267,17 @@ Downstream browsers include the same properties as core browsers, as well as the
253
267
  ]
254
268
  ```
255
269
 
270
+ #### `includeKaiOS` (in `getAllVersions()` output)
271
+
272
+ As with `getCompatibleVersions()` you can include KaiOS in your output. The same requirement to have `includeDownstreamBrowsers: true` applies.
273
+
274
+ ```javascript
275
+ getAllVersions({
276
+ includeDownstreamBrowsers: true,
277
+ includeKaiOS: true,
278
+ });
279
+ ```
280
+
256
281
  #### `outputFormat`
257
282
 
258
283
  By default, this function returns an `Array` of `Objects` which can be manipulated in Javascript or output to JSON.
@@ -374,10 +399,12 @@ Shows UC Browser Mobile 13.8 implementing Chromium 100, and:
374
399
  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`.
375
400
 
376
401
  > [!NOTE]
377
- > 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.
402
+ > 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 or Gecko version, so their release dates are more informative than critical.
378
403
 
379
404
  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.
380
405
 
406
+ KaiOS is an exception - its upstream version mappings are handled separately from the other browsers because they happen very infrequently.
407
+
381
408
  ### List of downstream browsers
382
409
 
383
410
  | Browser | ID | Core | Source |
@@ -396,6 +423,7 @@ This data is updated on a daily basis using a [script](https://github.com/web-pl
396
423
  | QQ Browser Mobile | `qq_android` | `false` | useragents.io |
397
424
  | UC Browser Mobile | `uc_android` | `false` | useragents.io |
398
425
  | Yandex Browser Mobile | `ya_android` | `false` | useragents.io |
426
+ | KaiOS | `kai_os` | `false` | Manual |
399
427
 
400
428
  > [!NOTE]
401
- > 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.
429
+ > All the non-core browsers currently included implement Chromium or Gecko. Their inclusion in any of the above methods is based on the Baseline feature set supported by the Chromium or Gecko version they implement, not their release date.
package/dist/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{parseArgs as e}from"node:util";import{exit as a}from"node:process";import{getCompatibleVersions as s}from"./index.js";const r=process.argv.slice(2),{values:n}=e({args:r,options:{"target-year":{type:"string"},"widely-available-on-date":{type:"string"},"include-downstream-browsers":{type:"boolean"},"list-all-compatible-versions":{type:"boolean"},help:{type:"boolean",short:"h"}},strict:!0});n.help&&(console.log("\nGet Baseline Widely available browser versions or Baseline year browser versions.\n\nUsage: baseline-browser-mapping [options]\n\nOptions:\n --target-year Pass a year between 2015 and the current year to get browser versions compatible \n with all Newly Available features as of the end of the year specified.\n --widely-available-on-date Pass a date in the format 'YYYY-MM-DD' to get versions compatible with Widely \n available on the specified date.\n --include-downstream-browsers Whether to include browsers that use the same engines as a core Baseline browser.\n --list-all-compatible-versions Whether to include only the minimum compatible browser versions or all compatible versions.\n -h, --help Show help\n\nExamples:\n npx baseline-browser-mapping --target-year 2020\n npx baseline-browser-mapping --widely-available-on-date 2023-04-05\n npx baseline-browser-mapping --include-downstream-browsers\n npx baseline-browser-mapping --list-all-compatible-versions\n".trim()),a(0)),console.log(s({targetYear:n["target-year"]?Number.parseInt(n["target-year"]):void 0,widelyAvailableOnDate:n["widely-available-on-date"],includeDownstreamBrowsers:n["include-downstream-browsers"],listAllCompatibleVersions:n["list-all-compatible-versions"]}));
2
+ import{parseArgs as e}from"node:util";import{exit as a}from"node:process";import{getCompatibleVersions as s}from"./index.js";const n=process.argv.slice(2),{values:o}=e({args:n,options:{"target-year":{type:"string"},"widely-available-on-date":{type:"string"},"include-downstream-browsers":{type:"boolean"},"list-all-compatible-versions":{type:"boolean"},"include-kaios":{type:"boolean"},help:{type:"boolean",short:"h"}},strict:!0});o.help&&(console.log("\nGet Baseline Widely available browser versions or Baseline year browser versions.\n\nUsage: baseline-browser-mapping [options]\n\nOptions:\n --target-year Pass a year between 2015 and the current year to get browser versions compatible \n with all Newly Available features as of the end of the year specified.\n --widely-available-on-date Pass a date in the format 'YYYY-MM-DD' to get versions compatible with Widely \n available on the specified date.\n --include-downstream-browsers Whether to include browsers that use the same engines as a core Baseline browser.\n --include-kaios Whether to include KaiOS in downstream browsers. Requires --include-downstream-browsers.\n --list-all-compatible-versions Whether to include only the minimum compatible browser versions or all compatible versions.\n -h, --help Show help\n\nExamples:\n npx baseline-browser-mapping --target-year 2020\n npx baseline-browser-mapping --widely-available-on-date 2023-04-05\n npx baseline-browser-mapping --include-downstream-browsers\n npx baseline-browser-mapping --list-all-compatible-versions\n".trim()),a(0)),console.log(s({targetYear:o["target-year"]?Number.parseInt(o["target-year"]):void 0,widelyAvailableOnDate:o["widely-available-on-date"],includeDownstreamBrowsers:o["include-downstream-browsers"],listAllCompatibleVersions:o["list-all-compatible-versions"],includeKaiOS:o["include-kaios"]}));