web-features 2.15.0 → 2.16.0

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/data.schema.json CHANGED
@@ -57,6 +57,28 @@
57
57
  "description": "Short description of the feature, as an HTML string",
58
58
  "type": "string"
59
59
  },
60
+ "discouraged": {
61
+ "additionalProperties": false,
62
+ "description": "Whether developers are formally discouraged from using this feature",
63
+ "properties": {
64
+ "according_to": {
65
+ "description": "Links to a formal discouragement notice, such as specification text, intent-to-unship, etc.",
66
+ "items": {
67
+ "type": "string"
68
+ },
69
+ "type": "array"
70
+ },
71
+ "alternatives": {
72
+ "description": "IDs for features that substitute some or all of this feature's utility",
73
+ "items": {},
74
+ "type": "array"
75
+ }
76
+ },
77
+ "required": [
78
+ "according_to"
79
+ ],
80
+ "type": "object"
81
+ },
60
82
  "group": {
61
83
  "anyOf": [
62
84
  {
package/index.d.ts CHANGED
@@ -1,3 +1,21 @@
1
+ interface WebFeaturesData {
2
+ /** Browsers and browser release data */
3
+ browsers: {
4
+ [key in BrowserIdentifier]: BrowserData;
5
+ };
6
+ /** Feature identifiers and data */
7
+ features: {
8
+ [key: string]: FeatureData;
9
+ };
10
+ /** Group identifiers and data */
11
+ groups: {
12
+ [key: string]: GroupData;
13
+ };
14
+ /** Snapshot identifiers and data */
15
+ snapshots: {
16
+ [key: string]: SnapshotData;
17
+ };
18
+ }
1
19
  /** Browser information */
2
20
  interface BrowserData {
3
21
  /** The name of the browser, as in "Edge" or "Safari on iOS" */
@@ -31,6 +49,8 @@ interface FeatureData {
31
49
  status: SupportStatus;
32
50
  /** Sources of support data for this feature */
33
51
  compat_features?: string[];
52
+ /** Whether developers are formally discouraged from using this feature */
53
+ discouraged?: Discouraged;
34
54
  }
35
55
  type BrowserIdentifier = "chrome" | "chrome_android" | "edge" | "firefox" | "firefox_android" | "safari" | "safari_ios";
36
56
  type BaselineHighLow = "high" | "low";
@@ -50,6 +70,12 @@ interface SupportStatus extends Status {
50
70
  /** Statuses for each key in the feature's compat_features list, if applicable. Not available to the npm release of web-features. */
51
71
  by_compat_key?: Record<string, Status>;
52
72
  }
73
+ interface Discouraged {
74
+ /** Links to a formal discouragement notice, such as specification text, intent-to-unship, etc. */
75
+ according_to: string[];
76
+ /** IDs for features that substitute some or all of this feature's utility */
77
+ alternatives?: (keyof WebFeaturesData["features"])[];
78
+ }
53
79
  interface GroupData {
54
80
  /** Short name */
55
81
  name: string;
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": "2.15.0",
4
+ "version": "2.16.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",