web-features 2.49.0 → 3.0.0-dev-20250917154839-f630e00
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 +75 -0
- package/data.json +1 -1
- package/data.schema.json +220 -290
- package/index.d.ts +6 -91
- package/package.json +4 -2
- package/types.d.ts +26 -0
- package/types.quicktype.d.ts +217 -0
package/index.d.ts
CHANGED
|
@@ -1,93 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
/** Browser release information */
|
|
9
|
-
interface Release {
|
|
10
|
-
/** The version string, as in "10" or "17.1" */
|
|
11
|
-
version: string;
|
|
12
|
-
/** The release date, as in "2023-12-11" */
|
|
13
|
-
date: string;
|
|
14
|
-
}
|
|
15
|
-
interface FeatureData {
|
|
16
|
-
/** Short name */
|
|
17
|
-
name: string;
|
|
18
|
-
/** Short description of the feature, as a plain text string */
|
|
19
|
-
description: string;
|
|
20
|
-
/** Short description of the feature, as an HTML string */
|
|
21
|
-
description_html: string;
|
|
22
|
-
/** Specification URL(s) */
|
|
23
|
-
spec: string | [string, string, ...string[]];
|
|
24
|
-
/** Group identifier(s) */
|
|
25
|
-
group?: string | [string, string, ...string[]];
|
|
26
|
-
/** Snapshot identifier(s) */
|
|
27
|
-
snapshot?: string | [string, string, ...string[]];
|
|
28
|
-
/** caniuse.com identifier(s) */
|
|
29
|
-
caniuse?: string | [string, string, ...string[]];
|
|
30
|
-
/** Whether a feature is considered a "baseline" web platform feature and when it achieved that status */
|
|
31
|
-
status: SupportStatus;
|
|
32
|
-
/** Sources of support data for this feature */
|
|
33
|
-
compat_features?: string[];
|
|
34
|
-
/** Whether developers are formally discouraged from using this feature */
|
|
35
|
-
discouraged?: Discouraged;
|
|
36
|
-
}
|
|
37
|
-
type BrowserIdentifier = "chrome" | "chrome_android" | "edge" | "firefox" | "firefox_android" | "safari" | "safari_ios";
|
|
38
|
-
type BaselineHighLow = "high" | "low";
|
|
39
|
-
interface Status {
|
|
40
|
-
/** Whether the feature is Baseline (low substatus), Baseline (high substatus), or not (false) */
|
|
41
|
-
baseline: BaselineHighLow | false;
|
|
42
|
-
/** Date the feature achieved Baseline low status */
|
|
43
|
-
baseline_low_date?: string;
|
|
44
|
-
/** Date the feature achieved Baseline high status */
|
|
45
|
-
baseline_high_date?: string;
|
|
46
|
-
/** Browser versions that most-recently introduced the feature */
|
|
47
|
-
support: {
|
|
48
|
-
[K in BrowserIdentifier]?: string;
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
interface SupportStatus extends Status {
|
|
52
|
-
/** Statuses for each key in the feature's compat_features list, if applicable. Not available to the npm release of web-features. */
|
|
53
|
-
by_compat_key?: Record<string, Status>;
|
|
54
|
-
}
|
|
55
|
-
interface Discouraged {
|
|
56
|
-
/** Links to a formal discouragement notice, such as specification text, intent-to-unship, etc. */
|
|
57
|
-
according_to: string[];
|
|
58
|
-
/** IDs for features that substitute some or all of this feature's utility */
|
|
59
|
-
alternatives?: string[];
|
|
60
|
-
}
|
|
61
|
-
interface GroupData {
|
|
62
|
-
/** Short name */
|
|
63
|
-
name: string;
|
|
64
|
-
/** Identifier of parent group */
|
|
65
|
-
parent?: string;
|
|
66
|
-
}
|
|
67
|
-
interface SnapshotData {
|
|
68
|
-
/** Short name */
|
|
69
|
-
name: string;
|
|
70
|
-
/** Specification */
|
|
71
|
-
spec: string;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
declare const browsers: {
|
|
75
|
-
chrome: BrowserData;
|
|
76
|
-
chrome_android: BrowserData;
|
|
77
|
-
edge: BrowserData;
|
|
78
|
-
firefox: BrowserData;
|
|
79
|
-
firefox_android: BrowserData;
|
|
80
|
-
safari: BrowserData;
|
|
81
|
-
safari_ios: BrowserData;
|
|
1
|
+
declare const browsers: import("./types.quicktype").Browsers, features: {
|
|
2
|
+
[key: string]: import("./types").FeatureData | import("./types").FeatureMovedData | import("./types").FeatureSplitData;
|
|
3
|
+
}, groups: {
|
|
4
|
+
[key: string]: import("./types.quicktype").GroupData;
|
|
5
|
+
}, snapshots: {
|
|
6
|
+
[key: string]: import("./types.quicktype").SnapshotData;
|
|
82
7
|
};
|
|
83
|
-
declare const features: {
|
|
84
|
-
[key: string]: FeatureData;
|
|
85
|
-
};
|
|
86
|
-
declare const groups: {
|
|
87
|
-
[key: string]: GroupData;
|
|
88
|
-
};
|
|
89
|
-
declare const snapshots: {
|
|
90
|
-
[key: string]: SnapshotData;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
8
|
export { browsers, features, groups, snapshots };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web-features",
|
|
3
3
|
"description": "Curated list of Web platform features",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0-dev-20250917154839-f630e00",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -18,12 +18,14 @@
|
|
|
18
18
|
"types": "./index.d.ts",
|
|
19
19
|
"files": [
|
|
20
20
|
"index.d.ts",
|
|
21
|
+
"types.d.ts",
|
|
22
|
+
"types.quicktype.d.ts",
|
|
21
23
|
"index.js",
|
|
22
24
|
"data.json",
|
|
23
25
|
"data.schema.json"
|
|
24
26
|
],
|
|
25
27
|
"scripts": {
|
|
26
|
-
"prepare": "tsc && rm types.js &&
|
|
28
|
+
"prepare": "tsc && rm types.js && rm types.quicktype.js"
|
|
27
29
|
},
|
|
28
30
|
"devDependencies": {
|
|
29
31
|
"@types/node": "^20.19.16",
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { BaselineEnum as BaselineHighLow, BrowserData, Browsers, Discouraged, GroupData, Kind, FeatureData as QuicktypeMonolithicFeatureData, Status as QuicktypeStatus, StatusHeadline as QuicktypeStatusHeadline, WebFeaturesData as QuicktypeWebFeaturesData, Release, SnapshotData, Support } from "./types.quicktype";
|
|
2
|
+
export type { BaselineHighLow, BrowserData, Browsers, Discouraged, GroupData, Release, SnapshotData, Support, };
|
|
3
|
+
export interface Status extends QuicktypeStatus {
|
|
4
|
+
baseline: false | BaselineHighLow;
|
|
5
|
+
}
|
|
6
|
+
export interface SupportStatus extends QuicktypeStatusHeadline {
|
|
7
|
+
baseline: false | BaselineHighLow;
|
|
8
|
+
}
|
|
9
|
+
export interface WebFeaturesData extends Pick<QuicktypeWebFeaturesData, "browsers" | "groups" | "snapshots"> {
|
|
10
|
+
features: {
|
|
11
|
+
[key: string]: FeatureData | FeatureMovedData | FeatureSplitData;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export type FeatureData = {
|
|
15
|
+
kind: "feature";
|
|
16
|
+
} & Required<Pick<QuicktypeMonolithicFeatureData, "description_html" | "description" | "name" | "spec" | "status">> & Partial<Pick<QuicktypeMonolithicFeatureData, "caniuse" | "compat_features" | "discouraged" | "group" | "snapshot">>;
|
|
17
|
+
type FeatureRedirectData = {
|
|
18
|
+
kind: Exclude<Kind, "feature">;
|
|
19
|
+
} & Required<Pick<QuicktypeMonolithicFeatureData, "redirect_target" | "redirect_targets">>;
|
|
20
|
+
export interface FeatureMovedData extends Omit<FeatureRedirectData, "redirect_targets"> {
|
|
21
|
+
kind: "moved";
|
|
22
|
+
}
|
|
23
|
+
export interface FeatureSplitData extends Omit<FeatureRedirectData, "redirect_target"> {
|
|
24
|
+
kind: "split";
|
|
25
|
+
}
|
|
26
|
+
export type BrowserIdentifier = keyof Browsers;
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The top-level web-features data package
|
|
3
|
+
*/
|
|
4
|
+
export interface WebFeaturesData {
|
|
5
|
+
/**
|
|
6
|
+
* Browsers and browser release data
|
|
7
|
+
*/
|
|
8
|
+
browsers: Browsers;
|
|
9
|
+
/**
|
|
10
|
+
* Feature identifiers and data
|
|
11
|
+
*/
|
|
12
|
+
features: {
|
|
13
|
+
[key: string]: FeatureData;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Group identifiers and data
|
|
17
|
+
*/
|
|
18
|
+
groups: {
|
|
19
|
+
[key: string]: GroupData;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Snapshot identifiers and data
|
|
23
|
+
*/
|
|
24
|
+
snapshots: {
|
|
25
|
+
[key: string]: SnapshotData;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Browsers and browser release data
|
|
30
|
+
*/
|
|
31
|
+
export interface Browsers {
|
|
32
|
+
chrome: BrowserData;
|
|
33
|
+
chrome_android: BrowserData;
|
|
34
|
+
edge: BrowserData;
|
|
35
|
+
firefox: BrowserData;
|
|
36
|
+
firefox_android: BrowserData;
|
|
37
|
+
safari: BrowserData;
|
|
38
|
+
safari_ios: BrowserData;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Browser information
|
|
42
|
+
*/
|
|
43
|
+
export interface BrowserData {
|
|
44
|
+
/**
|
|
45
|
+
* The name of the browser, as in "Edge" or "Safari on iOS"
|
|
46
|
+
*/
|
|
47
|
+
name: string;
|
|
48
|
+
releases: Release[];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Browser release information
|
|
52
|
+
*/
|
|
53
|
+
export interface Release {
|
|
54
|
+
/**
|
|
55
|
+
* The release date, as in "2023-12-11"
|
|
56
|
+
*/
|
|
57
|
+
date: string;
|
|
58
|
+
/**
|
|
59
|
+
* The version string, as in "10" or "17.1"
|
|
60
|
+
*/
|
|
61
|
+
version: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A feature data entry
|
|
65
|
+
*
|
|
66
|
+
* A feature has permanently moved to exactly one other ID
|
|
67
|
+
*
|
|
68
|
+
* A feature has split into two or more other features
|
|
69
|
+
*/
|
|
70
|
+
export interface FeatureData {
|
|
71
|
+
/**
|
|
72
|
+
* caniuse.com identifiers
|
|
73
|
+
*/
|
|
74
|
+
caniuse?: string[];
|
|
75
|
+
/**
|
|
76
|
+
* Sources of support data for this feature
|
|
77
|
+
*/
|
|
78
|
+
compat_features?: string[];
|
|
79
|
+
/**
|
|
80
|
+
* Short description of the feature, as a plain text string
|
|
81
|
+
*/
|
|
82
|
+
description?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Short description of the feature, as an HTML string
|
|
85
|
+
*/
|
|
86
|
+
description_html?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Whether developers are formally discouraged from using this feature
|
|
89
|
+
*/
|
|
90
|
+
discouraged?: Discouraged;
|
|
91
|
+
/**
|
|
92
|
+
* Group identifiers
|
|
93
|
+
*/
|
|
94
|
+
group?: string[];
|
|
95
|
+
kind: Kind;
|
|
96
|
+
/**
|
|
97
|
+
* Short name
|
|
98
|
+
*/
|
|
99
|
+
name?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Snapshot identifiers
|
|
102
|
+
*/
|
|
103
|
+
snapshot?: string[];
|
|
104
|
+
/**
|
|
105
|
+
* Specification URLs
|
|
106
|
+
*/
|
|
107
|
+
spec?: string[];
|
|
108
|
+
/**
|
|
109
|
+
* Whether a feature is considered a "Baseline" web platform feature and when it achieved
|
|
110
|
+
* that status
|
|
111
|
+
*/
|
|
112
|
+
status?: StatusHeadline;
|
|
113
|
+
/**
|
|
114
|
+
* The new ID for this feature
|
|
115
|
+
*/
|
|
116
|
+
redirect_target?: string;
|
|
117
|
+
/**
|
|
118
|
+
* The new IDs for this feature
|
|
119
|
+
*/
|
|
120
|
+
redirect_targets?: string[];
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Whether developers are formally discouraged from using this feature
|
|
124
|
+
*/
|
|
125
|
+
export interface Discouraged {
|
|
126
|
+
/**
|
|
127
|
+
* Links to a formal discouragement notice, such as specification text, intent-to-unship,
|
|
128
|
+
* etc.
|
|
129
|
+
*/
|
|
130
|
+
according_to: string[];
|
|
131
|
+
/**
|
|
132
|
+
* IDs for features that substitute some or all of this feature's utility
|
|
133
|
+
*/
|
|
134
|
+
alternatives?: string[];
|
|
135
|
+
}
|
|
136
|
+
export type Kind = "feature" | "moved" | "split";
|
|
137
|
+
/**
|
|
138
|
+
* Whether a feature is considered a "Baseline" web platform feature and when it achieved
|
|
139
|
+
* that status
|
|
140
|
+
*/
|
|
141
|
+
export interface StatusHeadline {
|
|
142
|
+
/**
|
|
143
|
+
* Whether the feature is Baseline (low substatus), Baseline (high substatus), or not (false)
|
|
144
|
+
*/
|
|
145
|
+
baseline: boolean | BaselineEnum;
|
|
146
|
+
/**
|
|
147
|
+
* Date the feature achieved Baseline high status
|
|
148
|
+
*/
|
|
149
|
+
baseline_high_date?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Date the feature achieved Baseline low status
|
|
152
|
+
*/
|
|
153
|
+
baseline_low_date?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Statuses for each key in the feature's compat_features list, if applicable. Not available
|
|
156
|
+
* to the npm release of web-features.
|
|
157
|
+
*/
|
|
158
|
+
by_compat_key?: {
|
|
159
|
+
[key: string]: Status;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Browser versions that most-recently introduced the feature
|
|
163
|
+
*/
|
|
164
|
+
support: Support;
|
|
165
|
+
}
|
|
166
|
+
export type BaselineEnum = "high" | "low";
|
|
167
|
+
export interface Status {
|
|
168
|
+
/**
|
|
169
|
+
* Whether the feature is Baseline (low substatus), Baseline (high substatus), or not (false)
|
|
170
|
+
*/
|
|
171
|
+
baseline: boolean | BaselineEnum;
|
|
172
|
+
/**
|
|
173
|
+
* Date the feature achieved Baseline high status
|
|
174
|
+
*/
|
|
175
|
+
baseline_high_date?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Date the feature achieved Baseline low status
|
|
178
|
+
*/
|
|
179
|
+
baseline_low_date?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Browser versions that most-recently introduced the feature
|
|
182
|
+
*/
|
|
183
|
+
support: Support;
|
|
184
|
+
[property: string]: any;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Browser versions that most-recently introduced the feature
|
|
188
|
+
*/
|
|
189
|
+
export interface Support {
|
|
190
|
+
chrome?: string;
|
|
191
|
+
chrome_android?: string;
|
|
192
|
+
edge?: string;
|
|
193
|
+
firefox?: string;
|
|
194
|
+
firefox_android?: string;
|
|
195
|
+
safari?: string;
|
|
196
|
+
safari_ios?: string;
|
|
197
|
+
}
|
|
198
|
+
export interface GroupData {
|
|
199
|
+
/**
|
|
200
|
+
* Short name
|
|
201
|
+
*/
|
|
202
|
+
name: string;
|
|
203
|
+
/**
|
|
204
|
+
* Identifier of parent group
|
|
205
|
+
*/
|
|
206
|
+
parent?: string;
|
|
207
|
+
}
|
|
208
|
+
export interface SnapshotData {
|
|
209
|
+
/**
|
|
210
|
+
* Short name
|
|
211
|
+
*/
|
|
212
|
+
name: string;
|
|
213
|
+
/**
|
|
214
|
+
* Specification
|
|
215
|
+
*/
|
|
216
|
+
spec: string;
|
|
217
|
+
}
|