baseline-browser-mapping 2.10.41 → 2.11.21

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/dist/index.d.ts CHANGED
@@ -1,58 +1,5 @@
1
+ import { BrowserVersion, Options, AllVersionsOptions, AllBrowsersBrowserVersion, NestedBrowserVersions, TimelineOptions, TimelineEvent, BrowserTimeline } from "./types.js";
1
2
  export declare function _resetHasWarned(): void;
2
- type BrowserVersion = {
3
- browser: string;
4
- version: string;
5
- release_date?: string;
6
- engine?: string;
7
- engine_version?: string;
8
- };
9
- interface AllBrowsersBrowserVersion extends BrowserVersion {
10
- year: number | string;
11
- supports?: string;
12
- wa_compatible?: boolean;
13
- }
14
- type NestedBrowserVersions = {
15
- [browser: string]: {
16
- [version: string]: AllBrowsersBrowserVersion;
17
- };
18
- };
19
- type Options = {
20
- /**
21
- * Whether to include only the minimum compatible browser versions or all compatible versions.
22
- * Defaults to `false`.
23
- */
24
- listAllCompatibleVersions?: boolean;
25
- /**
26
- * Whether to include browsers that use the same engines as a core Baseline browser.
27
- * Defaults to `false`.
28
- */
29
- includeDownstreamBrowsers?: boolean;
30
- /**
31
- * Pass a date in the format 'YYYY-MM-DD' to get versions compatible with Widely available on the specified date.
32
- * If left undefined and a `targetYear` is not passed, defaults to Widely available as of the current date.
33
- * > NOTE: cannot be used with `targetYear`.
34
- */
35
- widelyAvailableOnDate?: string | number;
36
- /**
37
- * Pass a year between 2015 and the current year to get browser versions compatible with all
38
- * Newly Available features as of the end of the year specified.
39
- * > NOTE: cannot be used with `widelyAvailableOnDate`.
40
- */
41
- targetYear?: number;
42
- /**
43
- * Pass a boolean that determines whether KaiOS is included in browser mappings. KaiOS implements
44
- * the Gecko engine used in Firefox. However, KaiOS also has a different interaction paradigm to
45
- * other browsers and requires extra consideration beyond simple feature compatibility to provide
46
- * an optimal user experience. Defaults to `false`.
47
- */
48
- includeKaiOS?: boolean;
49
- overrideLastUpdated?: number;
50
- /**
51
- * Pass a boolean to suppress the warning about stale data.
52
- * Defaults to `false`.
53
- */
54
- suppressWarnings?: boolean;
55
- };
56
3
  /**
57
4
  * Returns browser versions compatible with specified Baseline targets.
58
5
  * Defaults to returning the minimum versions of the core browser set that support Baseline Widely available.
@@ -64,34 +11,6 @@ type Options = {
64
11
  * - `supressWarnings`: `false` (default) or `true`
65
12
  */
66
13
  export declare function getCompatibleVersions(userOptions?: Options): BrowserVersion[];
67
- type AllVersionsOptions = {
68
- /**
69
- * Whether to return the output as a JavaScript `Array` (`"array"`), `Object` (`"object"`) or a CSV string (`"csv"`).
70
- * Defaults to `"array"`.
71
- */
72
- outputFormat?: string;
73
- /**
74
- * Whether to include browsers that use the same engines as a core Baseline browser.
75
- * Defaults to `false`.
76
- */
77
- includeDownstreamBrowsers?: boolean;
78
- /**
79
- * Whether to use the new "supports" property in place of "wa_compatible"
80
- * Defaults to `false`
81
- */
82
- useSupports?: boolean;
83
- /**
84
- * Whether to include KaiOS in the output. KaiOS implements the Gecko engine used in Firefox.
85
- * However, KaiOS also has a different interaction paradigm to other browsers and requires extra
86
- * consideration beyond simple feature compatibility to provide an optimal user experience.
87
- */
88
- includeKaiOS?: boolean;
89
- /**
90
- * Pass a boolean to suppress the warning about old data.
91
- * Defaults to `false`.
92
- */
93
- suppressWarnings?: boolean;
94
- };
95
14
  /**
96
15
  * Returns all browser versions known to this module with their level of Baseline support as a JavaScript `Array` (`"array"`), `Object` (`"object"`) or a CSV string (`"csv"`).
97
16
  * Takes an optional configuration `Object` with three optional properties:
@@ -101,4 +20,9 @@ type AllVersionsOptions = {
101
20
  * - `supressWarnings`: `false` (default) or `true`
102
21
  */
103
22
  export declare function getAllVersions(userOptions?: AllVersionsOptions): AllBrowsersBrowserVersion[] | NestedBrowserVersions | string;
104
- export {};
23
+ export declare function getTimeline(userOptions?: TimelineOptions & {
24
+ groupBy?: "date";
25
+ }): TimelineEvent[];
26
+ export declare function getTimeline(userOptions: TimelineOptions & {
27
+ groupBy: "browser";
28
+ }): BrowserTimeline;