Skip to content

Commit e81bedc

Browse files
committed
Updates to README to reflect schema changes
1 parent 095a270 commit e81bedc

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ To install the package, run:
1717

1818
`npm install --save baseline-browser-mapping`
1919

20-
`baseline-browser-mapping` depends on `web-features` and `@mdn/browser-compat-data` for version selection. It is strongly recommended that you update this module and it's dependencies often to ensure you have the most accurate data. Consider adding a script to your `package.json` and using it as a build step:
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:
2121

2222
```javascript
2323
"scripts": [
24-
"refresh-baseline-browser-mapping": "npm i --save baseline-browser-mapping@latest web-features@latest @mdn/browser-compat-data@latest"
24+
"refresh-baseline-browser-mapping": "npm i --save baseline-browser-mapping@latest"
2525
]
2626
```
2727

@@ -133,7 +133,7 @@ Setting `includeDownstreamBrowsers` to `true` will include browsers outside of t
133133

134134
```javascript
135135
getCompatibleVersions({
136-
widelyAvailableOnDate: `2023-04-05`,
136+
includeDownstreamBrowsers: true,
137137
});
138138
```
139139

@@ -175,6 +175,8 @@ By default, this function returns an `Array` of `Objects` and excludes downstrea
175175
]
176176
```
177177

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+
178180
### Understanding which browsers support Newly available features
179181

180182
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({
185187
});
186188
```
187189

188-
The `supports` property has three possible values:
190+
The `supports` property is optional and has two possible values:
189191

190-
- `year_only` for browser versions that do not support all Baseline Widely available Newly Available features.
191192
- `widely` for browser versions that support all Widely available features.
192193
- `newly` for browser versions that support all Newly available features.
193194

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.
195196

196197
### `getAllVersions()` Configuration options
197198

@@ -251,7 +252,6 @@ In thise case, `getAllVersions()` returns a nested object with the browser [IDs
251252
"chrome": {
252253
"53": {
253254
"year": 2016,
254-
"supports": "year_only",
255255
"release_date": "2016-09-07"
256256
},
257257
...
@@ -266,7 +266,6 @@ Downstream browsers will include extra fields for `engine` and `engine_versions`
266266
"webview_android": {
267267
"53": {
268268
"year": 2016,
269-
"supports": "year_only",
270269
"release_date": "2016-09-07",
271270
"engine": "Blink",
272271
"engine_version": "53"
@@ -287,7 +286,10 @@ getAllVersions({
287286
288287
```csv
289288
"browser","version","year","supports","release_date","engine","engine_version"
290-
"chrome","53","2016","year_only","2016-09-07","NULL","NULL"
289+
...
290+
"chrome","24","pre_baseline","","2013-01-10","NULL","NULL"
291+
...
292+
"chrome","53","2016","","2016-09-07","NULL","NULL"
291293
...
292294
"firefox","135","2024","widely","2025-02-04","NULL","NULL"
293295
"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
307309
- [Array](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_array.json)
308310
- [Object](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_object.json)
309311
- [CSV](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions.csv)
310-
Core browsers only, with `supports` property
312+
- Core browsers only, with `supports` property
311313
- [Array](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_array_with_supports.json)
312314
- [Object](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_object_with_supports.json)
313315
- [CSV](https://web-platform-dx.github.io/baseline-browser-mapping/all_versions_with_supports.csv)

0 commit comments

Comments
 (0)