@chromatic-com/playwright 0.13.0 → 0.13.1-9775a40-20260409130941

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.
Files changed (119) hide show
  1. package/embedded/node_modules/baseline-browser-mapping/LICENSE.txt +201 -0
  2. package/embedded/node_modules/baseline-browser-mapping/README.md +467 -0
  3. package/embedded/node_modules/baseline-browser-mapping/dist/cli.cjs +2 -0
  4. package/embedded/node_modules/baseline-browser-mapping/dist/index.cjs +1 -0
  5. package/embedded/node_modules/baseline-browser-mapping/dist/index.d.ts +104 -0
  6. package/embedded/node_modules/baseline-browser-mapping/dist/index.js +1 -0
  7. package/embedded/node_modules/baseline-browser-mapping/package.json +68 -0
  8. package/embedded/node_modules/callsites/index.d.ts +96 -0
  9. package/embedded/node_modules/callsites/index.js +13 -0
  10. package/embedded/node_modules/callsites/license +9 -0
  11. package/embedded/node_modules/callsites/package.json +39 -0
  12. package/embedded/node_modules/callsites/readme.md +48 -0
  13. package/embedded/node_modules/cjs-module-lexer/LICENSE +10 -0
  14. package/embedded/node_modules/cjs-module-lexer/README.md +462 -0
  15. package/embedded/node_modules/cjs-module-lexer/dist/lexer.js +1 -0
  16. package/embedded/node_modules/cjs-module-lexer/dist/lexer.mjs +2 -0
  17. package/embedded/node_modules/cjs-module-lexer/lexer.d.ts +8 -0
  18. package/embedded/node_modules/cjs-module-lexer/lexer.js +1443 -0
  19. package/embedded/node_modules/cjs-module-lexer/package.json +48 -0
  20. package/embedded/node_modules/commander/LICENSE +22 -0
  21. package/embedded/node_modules/commander/Readme.md +1176 -0
  22. package/embedded/node_modules/commander/esm.mjs +16 -0
  23. package/embedded/node_modules/commander/index.js +24 -0
  24. package/embedded/node_modules/commander/lib/argument.js +150 -0
  25. package/embedded/node_modules/commander/lib/command.js +2777 -0
  26. package/embedded/node_modules/commander/lib/error.js +39 -0
  27. package/embedded/node_modules/commander/lib/help.js +747 -0
  28. package/embedded/node_modules/commander/lib/option.js +380 -0
  29. package/embedded/node_modules/commander/lib/suggestSimilar.js +101 -0
  30. package/embedded/node_modules/commander/package-support.json +19 -0
  31. package/embedded/node_modules/commander/package.json +82 -0
  32. package/embedded/node_modules/commander/typings/esm.d.mts +3 -0
  33. package/embedded/node_modules/commander/typings/index.d.ts +1113 -0
  34. package/embedded/node_modules/domelementtype/LICENSE +11 -0
  35. package/embedded/node_modules/domelementtype/lib/esm/index.d.ts +48 -0
  36. package/embedded/node_modules/domelementtype/lib/esm/index.d.ts.map +1 -0
  37. package/embedded/node_modules/domelementtype/lib/esm/index.js +51 -0
  38. package/embedded/node_modules/domelementtype/lib/esm/package.json +1 -0
  39. package/embedded/node_modules/domelementtype/lib/index.d.ts +48 -0
  40. package/embedded/node_modules/domelementtype/lib/index.d.ts.map +1 -0
  41. package/embedded/node_modules/domelementtype/lib/index.js +55 -0
  42. package/embedded/node_modules/domelementtype/package.json +54 -0
  43. package/embedded/node_modules/domelementtype/readme.md +1 -0
  44. package/embedded/node_modules/es-module-lexer/LICENSE +10 -0
  45. package/embedded/node_modules/es-module-lexer/README.md +338 -0
  46. package/embedded/node_modules/es-module-lexer/dist/lexer.asm.js +2 -0
  47. package/embedded/node_modules/es-module-lexer/dist/lexer.cjs +1 -0
  48. package/embedded/node_modules/es-module-lexer/dist/lexer.js +2 -0
  49. package/embedded/node_modules/es-module-lexer/lexer.js +925 -0
  50. package/embedded/node_modules/es-module-lexer/package.json +57 -0
  51. package/embedded/node_modules/es-module-lexer/types/lexer.d.ts +195 -0
  52. package/embedded/node_modules/escalade/dist/index.js +22 -0
  53. package/embedded/node_modules/escalade/dist/index.mjs +22 -0
  54. package/embedded/node_modules/escalade/index.d.mts +11 -0
  55. package/embedded/node_modules/escalade/index.d.ts +15 -0
  56. package/embedded/node_modules/escalade/license +9 -0
  57. package/embedded/node_modules/escalade/package.json +74 -0
  58. package/embedded/node_modules/escalade/readme.md +211 -0
  59. package/embedded/node_modules/escalade/sync/index.d.mts +9 -0
  60. package/embedded/node_modules/escalade/sync/index.d.ts +13 -0
  61. package/embedded/node_modules/escalade/sync/index.js +18 -0
  62. package/embedded/node_modules/escalade/sync/index.mjs +18 -0
  63. package/embedded/node_modules/has-flag/index.d.ts +39 -0
  64. package/embedded/node_modules/has-flag/index.js +8 -0
  65. package/embedded/node_modules/has-flag/license +9 -0
  66. package/embedded/node_modules/has-flag/package.json +46 -0
  67. package/embedded/node_modules/has-flag/readme.md +89 -0
  68. package/embedded/node_modules/import-fresh/index.d.ts +30 -0
  69. package/embedded/node_modules/import-fresh/index.js +34 -0
  70. package/embedded/node_modules/import-fresh/license +9 -0
  71. package/embedded/node_modules/import-fresh/node_modules/resolve-from/index.js +47 -0
  72. package/embedded/node_modules/import-fresh/node_modules/resolve-from/license +9 -0
  73. package/embedded/node_modules/import-fresh/node_modules/resolve-from/package.json +34 -0
  74. package/embedded/node_modules/import-fresh/node_modules/resolve-from/readme.md +72 -0
  75. package/embedded/node_modules/import-fresh/package.json +48 -0
  76. package/embedded/node_modules/import-fresh/readme.md +54 -0
  77. package/embedded/node_modules/nth-check/LICENSE +11 -0
  78. package/embedded/node_modules/nth-check/README.md +136 -0
  79. package/embedded/node_modules/nth-check/lib/compile.d.ts +55 -0
  80. package/embedded/node_modules/nth-check/lib/compile.d.ts.map +1 -0
  81. package/embedded/node_modules/nth-check/lib/compile.js +121 -0
  82. package/embedded/node_modules/nth-check/lib/compile.js.map +1 -0
  83. package/embedded/node_modules/nth-check/lib/esm/compile.d.ts +55 -0
  84. package/embedded/node_modules/nth-check/lib/esm/compile.d.ts.map +1 -0
  85. package/embedded/node_modules/nth-check/lib/esm/compile.js +113 -0
  86. package/embedded/node_modules/nth-check/lib/esm/compile.js.map +1 -0
  87. package/embedded/node_modules/nth-check/lib/esm/index.d.ts +59 -0
  88. package/embedded/node_modules/nth-check/lib/esm/index.d.ts.map +1 -0
  89. package/embedded/node_modules/nth-check/lib/esm/index.js +63 -0
  90. package/embedded/node_modules/nth-check/lib/esm/index.js.map +1 -0
  91. package/embedded/node_modules/nth-check/lib/esm/package.json +1 -0
  92. package/embedded/node_modules/nth-check/lib/esm/parse.d.ts +9 -0
  93. package/embedded/node_modules/nth-check/lib/esm/parse.d.ts.map +1 -0
  94. package/embedded/node_modules/nth-check/lib/esm/parse.js +73 -0
  95. package/embedded/node_modules/nth-check/lib/esm/parse.js.map +1 -0
  96. package/embedded/node_modules/nth-check/lib/index.d.ts +59 -0
  97. package/embedded/node_modules/nth-check/lib/index.d.ts.map +1 -0
  98. package/embedded/node_modules/nth-check/lib/index.js +70 -0
  99. package/embedded/node_modules/nth-check/lib/index.js.map +1 -0
  100. package/embedded/node_modules/nth-check/lib/parse.d.ts +9 -0
  101. package/embedded/node_modules/nth-check/lib/parse.d.ts.map +1 -0
  102. package/embedded/node_modules/nth-check/lib/parse.js +77 -0
  103. package/embedded/node_modules/nth-check/lib/parse.js.map +1 -0
  104. package/embedded/node_modules/nth-check/package.json +78 -0
  105. package/embedded/node_modules/parent-module/index.js +37 -0
  106. package/embedded/node_modules/parent-module/license +9 -0
  107. package/embedded/node_modules/parent-module/package.json +46 -0
  108. package/embedded/node_modules/parent-module/readme.md +67 -0
  109. package/embedded/node_modules/resolve-from/index.d.ts +31 -0
  110. package/embedded/node_modules/resolve-from/index.js +47 -0
  111. package/embedded/node_modules/resolve-from/license +9 -0
  112. package/embedded/node_modules/resolve-from/package.json +36 -0
  113. package/embedded/node_modules/resolve-from/readme.md +72 -0
  114. package/embedded/node_modules/supports-color/browser.js +24 -0
  115. package/embedded/node_modules/supports-color/index.js +152 -0
  116. package/embedded/node_modules/supports-color/license +9 -0
  117. package/embedded/node_modules/supports-color/package.json +58 -0
  118. package/embedded/node_modules/supports-color/readme.md +77 -0
  119. package/package.json +1 -1
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,467 @@
1
+ # [`baseline-browser-mapping`](https://github.com/web-platform-dx/web-features/packages/baseline-browser-mapping)
2
+
3
+ By the [W3C WebDX Community Group](https://www.w3.org/community/webdx/) and contributors.
4
+
5
+ `baseline-browser-mapping` provides:
6
+
7
+ - An `Array` of browsers compatible with Baseline Widely available and Baseline year feature sets via the [`getCompatibleVersions()` function](#get-baseline-widely-available-browser-versions-or-baseline-year-browser-versions).
8
+ - An `Array`, `Object` or `CSV` as a string describing the Baseline feature set support of all browser versions included in the module's data set via the [`getAllVersions()` function](#get-data-for-all-browser-versions).
9
+
10
+ You can use `baseline-browser-mapping` to help you determine minimum browser version support for your chosen Baseline feature set; or to analyse the level of support for different Baseline feature sets in your site's traffic by joining the data with your analytics data.
11
+
12
+ ## Install for local development
13
+
14
+ To install the package, run:
15
+
16
+ `npm install --save-dev baseline-browser-mapping`
17
+
18
+ The minimum supported NodeJS version for `baseline-browser-mapping` is v8 in alignment with `browserslist`. For NodeJS versions earlier than v13.2, the [`require('baseline-browser-mapping')`](https://nodejs.org/api/modules.html#requireid) syntax should be used to import the module.
19
+
20
+ ## Keeping `baseline-browser-mapping` up to date
21
+
22
+ `baseline-browser-mapping` depends on `web-features` and `@mdn/browser-compat-data` for core browser version selection, but the data is pre-packaged and minified. This package checks for updates to those modules and the supported [downstream browsers](#downstream-browsers) on a daily basis and is updated frequently.
23
+
24
+ If you are only using this module to generate minimum browser versions for Baseline Widely available or Baseline year feature sets, you don't need to update this module frequently, as the backward looking data is reasonably stable.
25
+
26
+ However, if you are targeting Newly available, using the [`getAllVersions()`](#get-data-for-all-browser-versions) function or heavily relying on the data for downstream browsers, you should update this module more frequently. If you target a feature cut off date within the last two months and your installed version of `baseline-browser-mapping` has data that is more than 2 months old, you will receive a console warning advising you to update to the latest version when you call `getCompatibleVersions()` or `getAllVersions()`.
27
+
28
+ If you want to suppress the console warnings mentioned above you can use the `suppressWarnings: true` option in the configuration object passed to `getCompatibleVersions()` or `getAllVersions()`. Alternatively, you can use the `BASELINE_BROWSER_MAPPING_IGNORE_OLD_DATA=true` environment variable when running your build process. This module also respects the `BROWSERSLIST_IGNORE_OLD_DATA=true` environment variable. Environment variables can also be provided in a `.env` file from Node 20 onwards; however, this module does not load .env files automatically to avoid conflicts with other libraries with different requirements. You will need to use `process.loadEnvFile()` or a library like `dotenv` to load .env files before `baseline-browser-mapping` is called.
29
+
30
+ If you're building a tool that uses this module, consider suppressing the warnings but building a process into your tool that automatically updates this module. See, for example, [`browserslist`](https://github.com/browserslist/browserslist/blob/main/node.js#L471) and its [`update-browserslist-db`](https://github.com/browserslist/update-db) package.
31
+
32
+ If you're implementing `baseline-browser-mapping` directly, you should add a script to your `package.json` to update `baseline-browser-mapping` and use it as part of your build process to ensure your data is as up to date as possible. For example, if you are using NPM for package management:
33
+
34
+ ```javascript
35
+ "scripts": [
36
+ "refresh-baseline-browser-mapping": "npm i baseline-browser-mapping@latest -D"
37
+ ]
38
+ ```
39
+
40
+ If you want to ensure [reproducible builds](https://www.wikiwand.com/en/articles/Reproducible_builds), we strongly recommend using the `widelyAvailableOnDate` option to fix the Widely available date on a per build basis to ensure dependent tools provide the same output and you do not produce data staleness warnings. If you are using [`browserslist`](https://github.com/browserslist/browserslist) to target Baseline Widely available, consider automatically updating your `browserslist` configuration in `package.json` or `.browserslistrc` to `baseline widely available on {YYYY-MM-DD}` as part of your build process to ensure the same or sufficiently similar list of minimum browsers is reproduced for historical builds.
41
+
42
+ ## Importing `baseline-browser-mapping`
43
+
44
+ This module exposes two functions: `getCompatibleVersions()` and `getAllVersions()`, both which can be imported directly from `baseline-browser-mapping`:
45
+
46
+ ```javascript
47
+ import {
48
+ getCompatibleVersions,
49
+ getAllVersions,
50
+ } from "baseline-browser-mapping";
51
+ ```
52
+
53
+ If you want to load the script and data directly in a web page without hosting it yourself, consider using a CDN:
54
+
55
+ ```html
56
+ <script type="module">
57
+ import {
58
+ getCompatibleVersions,
59
+ getAllVersions,
60
+ } from "https://cdn.jsdelivr.net/npm/baseline-browser-mapping";
61
+ </script>
62
+ ```
63
+
64
+ ## Get Baseline Widely available browser versions or Baseline year browser versions
65
+
66
+ To get the current list of minimum browser versions compatible with Baseline Widely available features from the core browser set, call the `getCompatibleVersions()` function:
67
+
68
+ ```javascript
69
+ getCompatibleVersions();
70
+ ```
71
+
72
+ Executed on 7th March 2025, the above code returns the following browser versions:
73
+
74
+ ```javascript
75
+ [
76
+ { browser: "chrome", version: "105", release_date: "2022-09-02" },
77
+ {
78
+ browser: "chrome_android",
79
+ version: "105",
80
+ release_date: "2022-09-02",
81
+ },
82
+ { browser: "edge", version: "105", release_date: "2022-09-02" },
83
+ { browser: "firefox", version: "104", release_date: "2022-08-23" },
84
+ {
85
+ browser: "firefox_android",
86
+ version: "104",
87
+ release_date: "2022-08-23",
88
+ },
89
+ { browser: "safari", version: "15.6", release_date: "2022-09-02" },
90
+ {
91
+ browser: "safari_ios",
92
+ version: "15.6",
93
+ release_date: "2022-09-02",
94
+ },
95
+ ];
96
+ ```
97
+
98
+ > [!NOTE]
99
+ > 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.
100
+
101
+ ### `getCompatibleVersions()` configuration options
102
+
103
+ `getCompatibleVersions()` accepts an `Object` as an argument with configuration options. The defaults are as follows:
104
+
105
+ ```javascript
106
+ {
107
+ targetYear: undefined,
108
+ widelyAvailableOnDate: undefined,
109
+ includeDownstreamBrowsers: false,
110
+ listAllCompatibleVersions: false,
111
+ suppressWarnings: false
112
+ }
113
+ ```
114
+
115
+ #### `targetYear`
116
+
117
+ The `targetYear` option returns the minimum browser versions compatible with all **Baseline Newly available** features at the end of the specified calendar year. For example, calling:
118
+
119
+ ```javascript
120
+ getCompatibleVersions({
121
+ targetYear: 2020,
122
+ });
123
+ ```
124
+
125
+ Returns the following versions:
126
+
127
+ ```javascript
128
+ [
129
+ { browser: "chrome", version: "87", release_date: "2020-11-19" },
130
+ {
131
+ browser: "chrome_android",
132
+ version: "87",
133
+ release_date: "2020-11-19",
134
+ },
135
+ { browser: "edge", version: "87", release_date: "2020-11-19" },
136
+ { browser: "firefox", version: "83", release_date: "2020-11-17" },
137
+ {
138
+ browser: "firefox_android",
139
+ version: "83",
140
+ release_date: "2020-11-17",
141
+ },
142
+ { browser: "safari", version: "14", release_date: "2020-09-16" },
143
+ { browser: "safari_ios", version: "14", release_date: "2020-09-16" },
144
+ ];
145
+ ```
146
+
147
+ > [!NOTE]
148
+ > 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.
149
+ > [!WARNING]
150
+ > You cannot use `targetYear` and `widelyAavailableDate` together. Please only use one of these options at a time.
151
+
152
+ #### `widelyAvailableOnDate`
153
+
154
+ The `widelyAvailableOnDate` option returns the minimum versions compatible with Baseline Widely available on a specified date in the format `YYYY-MM-DD`:
155
+
156
+ ```javascript
157
+ getCompatibleVersions({
158
+ widelyAvailableOnDate: `2023-04-05`,
159
+ });
160
+ ```
161
+
162
+ > [!TIP]
163
+ > 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.
164
+
165
+ #### `includeDownstreamBrowsers`
166
+
167
+ 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:
168
+
169
+ ```javascript
170
+ getCompatibleVersions({
171
+ includeDownstreamBrowsers: true,
172
+ });
173
+ ```
174
+
175
+ For more information on downstream browsers, see [the section on downstream browsers](#downstream-browsers) below.
176
+
177
+ #### `includeKaiOS`
178
+
179
+ 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.
180
+
181
+ ```javascript
182
+ getCompatibleVersions({
183
+ includeDownstreamBrowsers: true,
184
+ includeKaiOS: true,
185
+ });
186
+ ```
187
+
188
+ > [!NOTE]
189
+ > Including KaiOS requires you to include all downstream browsers using the `includeDownstreamBrowsers` option.
190
+
191
+ #### `listAllCompatibleVersions`
192
+
193
+ Setting `listAllCompatibleVersions` to true will include the minimum versions of each compatible browser, and all the subsequent versions:
194
+
195
+ ```javascript
196
+ getCompatibleVersions({
197
+ listAllCompatibleVersions: true,
198
+ });
199
+ ```
200
+
201
+ #### `suppressWarnings`
202
+
203
+ Setting `suppressWarnings` to `true` will suppress the console warning about old data:
204
+
205
+ ```javascript
206
+ getCompatibleVersions({
207
+ suppressWarnings: true,
208
+ });
209
+ ```
210
+
211
+ ## Get data for all browser versions
212
+
213
+ You may want to obtain data on all the browser versions available in this module for use in an analytics solution or dashboard. To get details of each browser version's level of Baseline support, call the `getAllVersions()` function:
214
+
215
+ ```javascript
216
+ import { getAllVersions } from "baseline-browser-mapping";
217
+
218
+ getAllVersions();
219
+ ```
220
+
221
+ By default, this function returns an `Array` of `Objects` and excludes downstream browsers:
222
+
223
+ ```javascript
224
+ [
225
+ ...
226
+ {
227
+ browser: "firefox_android", // Browser name
228
+ version: "125", // Browser version
229
+ release_date: "2024-04-16", // Release date
230
+ year: 2023, // Baseline year feature set the version supports
231
+ wa_compatible: true // Whether the browser version supports Widely available
232
+ },
233
+ ...
234
+ ]
235
+ ```
236
+
237
+ 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"`.
238
+
239
+ ### Understanding which browsers support Newly available features
240
+
241
+ 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:
242
+
243
+ ```javascript
244
+ getAllVersions({
245
+ useSupports: true,
246
+ });
247
+ ```
248
+
249
+ The `supports` property is optional and has two possible values:
250
+
251
+ - `widely` for browser versions that support all Widely available features.
252
+ - `newly` for browser versions that support all Newly available features.
253
+
254
+ 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.
255
+
256
+ ### `getAllVersions()` Configuration options
257
+
258
+ `getAllVersions()` accepts an `Object` as an argument with configuration options. The defaults are as follows:
259
+
260
+ ```javascript
261
+ {
262
+ includeDownstreamBrowsers: false,
263
+ outputFormat: "array",
264
+ suppressWarnings: false
265
+ }
266
+ ```
267
+
268
+ #### `includeDownstreamBrowsers` (in `getAllVersions()` output)
269
+
270
+ As with `getCompatibleVersions()`, you can set `includeDownstreamBrowsers` to `true` to include the Chromium and Gecko downstream browsers [listed below](#list-of-downstream-browsers).
271
+
272
+ ```javascript
273
+ getAllVersions({
274
+ includeDownstreamBrowsers: true,
275
+ });
276
+ ```
277
+
278
+ Downstream browsers include the same properties as core browsers, as well as the `engine`they use and `engine_version`, for example:
279
+
280
+ ```javascript
281
+ [
282
+ ...
283
+ {
284
+ browser: "samsunginternet_android",
285
+ version: "27.0",
286
+ release_date: "2024-11-06",
287
+ engine: "Blink",
288
+ engine_version: "125",
289
+ year: 2023,
290
+ supports: "widely"
291
+ },
292
+ ...
293
+ ]
294
+ ```
295
+
296
+ #### `includeKaiOS` (in `getAllVersions()` output)
297
+
298
+ As with `getCompatibleVersions()` you can include KaiOS in your output. The same requirement to have `includeDownstreamBrowsers: true` applies.
299
+
300
+ ```javascript
301
+ getAllVersions({
302
+ includeDownstreamBrowsers: true,
303
+ includeKaiOS: true,
304
+ });
305
+ ```
306
+
307
+ #### `suppressWarnings` (in `getAllVersions()` output)
308
+
309
+ As with `getCompatibleVersions()`, you can set `suppressWarnings` to `true` to suppress the console warning about old data:
310
+
311
+ ```javascript
312
+ getAllVersions({
313
+ suppressWarnings: true,
314
+ });
315
+ ```
316
+
317
+ #### `outputFormat`
318
+
319
+ By default, this function returns an `Array` of `Objects` which can be manipulated in Javascript or output to JSON.
320
+
321
+ To return an `Object` that nests keys , set `outputFormat` to `object`:
322
+
323
+ ```javascript
324
+ getAllVersions({
325
+ outputFormat: "object",
326
+ });
327
+ ```
328
+
329
+ In thise case, `getAllVersions()` returns a nested object with the browser [IDs listed below](#list-of-downstream-browsers) as keys, and versions as keys within them:
330
+
331
+ ```javascript
332
+ {
333
+ "chrome": {
334
+ "53": {
335
+ "year": 2016,
336
+ "release_date": "2016-09-07"
337
+ },
338
+ ...
339
+ }
340
+ ```
341
+
342
+ Downstream browsers will include extra fields for `engine` and `engine_versions`
343
+
344
+ ```javascript
345
+ {
346
+ ...
347
+ "webview_android": {
348
+ "53": {
349
+ "year": 2016,
350
+ "release_date": "2016-09-07",
351
+ "engine": "Blink",
352
+ "engine_version": "53"
353
+ },
354
+ ...
355
+ }
356
+ ```
357
+
358
+ To return a `String` in CSV format, set `outputFormat` to `csv`:
359
+
360
+ ```javascript
361
+ getAllVersions({
362
+ outputFormat: "csv",
363
+ });
364
+ ```
365
+
366
+ `getAllVersions` returns a `String` with a header row and comma-separated values for each browser version that you can write to a file or pass to another service. Core browsers will have "NULL" as the value for their `engine` and `engine_version`:
367
+
368
+ ```csv
369
+ "browser","version","year","supports","release_date","engine","engine_version"
370
+ ...
371
+ "chrome","24","pre_baseline","","2013-01-10","NULL","NULL"
372
+ ...
373
+ "chrome","53","2016","","2016-09-07","NULL","NULL"
374
+ ...
375
+ "firefox","135","2024","widely","2025-02-04","NULL","NULL"
376
+ "firefox","136","2024","newly","2025-03-04","NULL","NULL"
377
+ ...
378
+ "ya_android","20.12","2020","year_only","2020-12-20","Blink","87"
379
+ ...
380
+ ```
381
+
382
+ > [!NOTE]
383
+ > The above example uses `"includeDownstreamBrowsers": true`
384
+
385
+ ### Static resources
386
+
387
+ The outputs of `getAllVersions()` are available as JSON or CSV files generated on a daily basis and hosted on GitHub pages:
388
+
389
+ - Core browsers only
390
+ - [Array](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_array.json)
391
+ - [Object](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_object.json)
392
+ - [CSV](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions.csv)
393
+ - Core browsers only, with `supports` property
394
+ - [Array](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_array_with_supports.json)
395
+ - [Object](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_object_with_supports.json)
396
+ - [CSV](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_with_supports.csv)
397
+ - Including downstream browsers
398
+ - [Array](https://web-platform-dx.github.io/baseline-browser-mapping/with_downstream/all_versions_array.json)
399
+ - [Object](https://web-platform-dx.github.io/baseline-browser-mapping/with_downstream/all_versions_object.json)
400
+ - [CSV](https://web-platform-dx.github.io/baseline-browser-mapping/with_downstream/all_versions.csv)
401
+ - Including downstream browsers with `supports` property
402
+ - [Array](https://web-platform-dx.github.io/baseline-browser-mapping/with_downstream/all_versions_array_with_supports.json)
403
+ - [Object](https://web-platform-dx.github.io/baseline-browser-mapping/with_downstream/all_versions_object_with_supports.json)
404
+ - [CSV](https://web-platform-dx.github.io/baseline-browser-mapping/with_downstream/all_versions_with_supports.csv)
405
+
406
+ These files are updated on a daily basis.
407
+
408
+ ## CLI
409
+
410
+ `baseline-browser-mapping` includes a command line interface that exposes the same data and options as the `getCompatibleVersions()` function. To learn more about using the CLI, run:
411
+
412
+ ```sh
413
+ npx baseline-browser-mapping --help
414
+ ```
415
+
416
+ ## Downstream browsers
417
+
418
+ ### Limitations
419
+
420
+ The browser versions in this module come from two different sources:
421
+
422
+ - MDN's `browser-compat-data` module.
423
+ - Parsed user agent strings provided by [useragents.io](https://useragents.io/)
424
+
425
+ MDN `browser-compat-data` is an authoritative source of information for the browsers it contains. The release dates for the Baseline core browser set and the mapping of downstream browsers to Chromium versions should be considered accurate.
426
+
427
+ Browser mappings from useragents.io are provided on a best effort basis. They assume that browser vendors are accurately stating the Chromium version they have implemented. The initial set of version mappings was derived from a bulk export in November 2024. This version was iterated over with a Regex match looking for a major Chrome version and a corresponding version of the browser in question, e.g.:
428
+
429
+ `Mozilla/5.0 (Linux; U; Android 10; en-US; STK-L21 Build/HUAWEISTK-L21) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/100.0.4896.58 UCBrowser/13.8.2.1324 Mobile Safari/537.36`
430
+
431
+ Shows UC Browser Mobile 13.8 implementing Chromium 100, and:
432
+
433
+ `Mozilla/5.0 (Linux; arm_64; Android 11; Redmi Note 8 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.6613.123 YaBrowser/24.10.2.123.00 SA/3 Mobile Safari/537.36`
434
+
435
+ 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`.
436
+
437
+ > [!NOTE]
438
+ > 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.
439
+
440
+ 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.
441
+
442
+ KaiOS is an exception - its upstream version mappings are handled separately from the other browsers because they happen very infrequently.
443
+
444
+ ### List of downstream browsers
445
+
446
+ | Browser | ID | Core | Source |
447
+ | --------------------- | ------------------------- | ------- | ------------------------- |
448
+ | Chrome | `chrome` | `true` | MDN `browser-compat-data` |
449
+ | Chrome for Android | `chrome_android` | `true` | MDN `browser-compat-data` |
450
+ | Edge | `edge` | `true` | MDN `browser-compat-data` |
451
+ | Firefox | `firefox` | `true` | MDN `browser-compat-data` |
452
+ | Firefox for Android | `firefox_android` | `true` | MDN `browser-compat-data` |
453
+ | Safari | `safari` | `true` | MDN `browser-compat-data` |
454
+ | Safari on iOS | `safari_ios` | `true` | MDN `browser-compat-data` |
455
+ | Opera | `opera` | `false` | MDN `browser-compat-data` |
456
+ | Opera Android | `opera_android` | `false` | MDN `browser-compat-data` |
457
+ | Samsung Internet | `samsunginternet_android` | `false` | MDN `browser-compat-data` |
458
+ | WebView Android | `webview_android` | `false` | MDN `browser-compat-data` |
459
+ | QQ Browser Mobile | `qq_android` | `false` | useragents.io |
460
+ | UC Browser Mobile | `uc_android` | `false` | useragents.io |
461
+ | Yandex Browser Mobile | `ya_android` | `false` | useragents.io |
462
+ | KaiOS | `kai_os` | `false` | Manual |
463
+ | Facebook for Android | `facebook_android` | `false` | useragents.io |
464
+ | Instagram for Android | `instagram_android` | `false` | useragents.io |
465
+
466
+ > [!NOTE]
467
+ > 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.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ "use strict";const{getCompatibleVersions:e}=require("./index.cjs"),a=process.argv.slice(2),s={};for(let e=0;e<a.length;e++){const r=a[e];r&&("-h"===r||"--help"===r?s.help=!0:"--include-downstream-browsers"===r?s["include-downstream-browsers"]=!0:"--list-all-compatible-versions"===r?s["list-all-compatible-versions"]=!0:"--include-kaios"===r?s["include-kaios"]=!0:"--suppress-warnings"===r?s["suppress-warnings"]=!0:r.startsWith("--target-year=")?s["target-year"]=r.substring(14):"--target-year"===r?s["target-year"]=a[++e]:r.startsWith("--widely-available-on-date=")?s["widely-available-on-date"]=r.substring(27):"--widely-available-on-date"===r?s["widely-available-on-date"]=a[++e]:r.startsWith("--override-last-updated=")?s["override-last-updated"]=r.substring(24):"--override-last-updated"===r?s["override-last-updated"]=a[++e]:(console.error(`Unknown argument: ${r}`),process.exit(1)))}s.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 --suppress-warnings Supress potential warnings about data staleness when using a very recent feature cut off date.\n --override-last-updated Override the last updated date for the baseline data for debugging purposes.\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()),process.exit(0)),console.log(e({targetYear:s["target-year"]?Number.parseInt(s["target-year"]):void 0,widelyAvailableOnDate:s["widely-available-on-date"],includeDownstreamBrowsers:s["include-downstream-browsers"],listAllCompatibleVersions:s["list-all-compatible-versions"],includeKaiOS:s["include-kaios"],suppressWarnings:s["suppress-warnings"],overrideLastUpdated:s["override-last-updated"]?Number.parseInt(s["override-last-updated"]):void 0}));