baseline-browser-mapping 2.5.9 → 2.6.1
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 +8 -0
- package/dist/cli.js +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +7 -4
- package/CONTRIBUTING.md +0 -21
- package/dist/scripts/baseline-browser-versions.d.ts +0 -76
- package/dist/scripts/expose-data.d.ts +0 -34
package/README.md
CHANGED
|
@@ -344,6 +344,14 @@ The outputs of `getAllVersions()` are available as JSON or CSV files generated o
|
|
|
344
344
|
|
|
345
345
|
These files are updated on a daily basis.
|
|
346
346
|
|
|
347
|
+
## CLI
|
|
348
|
+
|
|
349
|
+
`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:
|
|
350
|
+
|
|
351
|
+
```sh
|
|
352
|
+
npx baseline-browser-mapping --help
|
|
353
|
+
```
|
|
354
|
+
|
|
347
355
|
## Downstream browsers
|
|
348
356
|
|
|
349
357
|
### Limitations
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
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"]}));
|