@cyanheads/browser-compat-mcp-server 0.3.0 → 0.3.2
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/AGENTS.md +7 -7
- package/CLAUDE.md +7 -7
- package/README.md +12 -12
- package/THIRD_PARTY_NOTICES.md +7 -7
- package/changelog/0.3.x/0.3.1.md +36 -0
- package/changelog/0.3.x/0.3.2.md +39 -0
- package/changelog/template.md +20 -11
- package/dist/data/browserslist-bcd-map.d.ts +7 -6
- package/dist/data/browserslist-bcd-map.d.ts.map +1 -1
- package/dist/data/browserslist-bcd-map.js +7 -6
- package/dist/data/browserslist-bcd-map.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-check-baseline.tool.d.ts +1 -0
- package/dist/mcp-server/tools/definitions/browsercompat-check-baseline.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-check-baseline.tool.js +31 -7
- package/dist/mcp-server/tools/definitions/browsercompat-check-baseline.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-compare-support.tool.d.ts +13 -2
- package/dist/mcp-server/tools/definitions/browsercompat-compare-support.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-compare-support.tool.js +134 -71
- package/dist/mcp-server/tools/definitions/browsercompat-compare-support.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-list-reference.tool.js +2 -2
- package/dist/mcp-server/tools/definitions/browsercompat-list-reference.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-search-features.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/browsercompat-search-features.tool.js +17 -42
- package/dist/mcp-server/tools/definitions/browsercompat-search-features.tool.js.map +1 -1
- package/dist/services/bcd/bcd-service.d.ts +10 -3
- package/dist/services/bcd/bcd-service.d.ts.map +1 -1
- package/dist/services/bcd/bcd-service.js +25 -4
- package/dist/services/bcd/bcd-service.js.map +1 -1
- package/dist/services/targets/targets-service.d.ts +32 -11
- package/dist/services/targets/targets-service.d.ts.map +1 -1
- package/dist/services/targets/targets-service.js +92 -25
- package/dist/services/targets/targets-service.js.map +1 -1
- package/dist/services/targets/types.d.ts +23 -6
- package/dist/services/targets/types.d.ts.map +1 -1
- package/package.json +14 -14
- package/server.json +3 -3
- package/skills/browser-compat-guide/SKILL.md +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browsercompat-check-baseline.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/browsercompat-check-baseline.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAClB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAE5B,oFAAoF;AACpF,MAAM,YAAY,GAChB,iLAAiL,CAAC;AAEpL,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,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AAC,IAAI,CAAC,EAAE,EAAE,qBAAqB,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAC5F,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"browsercompat-check-baseline.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/browsercompat-check-baseline.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAClB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAE5B,oFAAoF;AACpF,MAAM,YAAY,GAChB,iLAAiL,CAAC;AAEpL,qFAAqF;AACrF,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAEzD;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,UAAoB;IAC7C,OAAO,CACL,UAAU,CAAC,MAAM,GAAG,CAAC;QACrB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K,CAAC,IAAI,CAAC,+BAA+B,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC;YAC5E,CAAC;YACD,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS;gBACjC,KAAK,CAAC,IAAI,CAAC,qBAAqB,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;YACrE,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;gBACrB,KAAK,CAAC,IAAI,CACR,oBAAoB,qBAAqB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,CAC9J,CAAC;YACJ,CAAC;YACD,IAAI,IAAI,CAAC,QAAQ;gBAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC7D,CAAC;QACD,IAAI,MAAM,CAAC,gBAAgB;YAAE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,qBAAqB,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAC5F,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -11,11 +11,13 @@ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
|
11
11
|
export declare const browsercompatCompareSupport: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
12
12
|
features: z.ZodArray<z.ZodString>;
|
|
13
13
|
targets: z.ZodString;
|
|
14
|
+
usage_region: z.ZodOptional<z.ZodString>;
|
|
14
15
|
resolve: z.ZodDefault<z.ZodBoolean>;
|
|
15
16
|
target_offset: z.ZodDefault<z.ZodNumber>;
|
|
16
17
|
target_limit: z.ZodDefault<z.ZodNumber>;
|
|
17
18
|
}, z.core.$strip>, z.ZodObject<{
|
|
18
19
|
query_echo: z.ZodString;
|
|
20
|
+
usage_region: z.ZodOptional<z.ZodString>;
|
|
19
21
|
comparable_features: z.ZodNumber;
|
|
20
22
|
targets_resolved: z.ZodArray<z.ZodObject<{
|
|
21
23
|
agent: z.ZodString;
|
|
@@ -99,8 +101,10 @@ export declare const browsercompatCompareSupport: import("@cyanheads/mcp-ts-core
|
|
|
99
101
|
removed: "removed";
|
|
100
102
|
unsupported: "unsupported";
|
|
101
103
|
}>;
|
|
104
|
+
usage_percent: z.ZodNumber;
|
|
102
105
|
}, z.core.$strip>>;
|
|
103
106
|
failing_total: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
failing_coverage_percent: z.ZodOptional<z.ZodNumber>;
|
|
104
108
|
failing_ranges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
105
109
|
agent: z.ZodString;
|
|
106
110
|
newest: z.ZodString;
|
|
@@ -116,6 +120,7 @@ export declare const browsercompatCompareSupport: import("@cyanheads/mcp-ts-core
|
|
|
116
120
|
removed: "removed";
|
|
117
121
|
unsupported: "unsupported";
|
|
118
122
|
}>;
|
|
123
|
+
usage_percent: z.ZodNumber;
|
|
119
124
|
}, z.core.$strip>>>;
|
|
120
125
|
evaluated_total: z.ZodOptional<z.ZodNumber>;
|
|
121
126
|
evaluated_coverage_percent: z.ZodOptional<z.ZodNumber>;
|
|
@@ -143,13 +148,19 @@ export declare const browsercompatCompareSupport: import("@cyanheads/mcp-ts-core
|
|
|
143
148
|
readonly reason: "invalid_target_query";
|
|
144
149
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
145
150
|
readonly when: "browserslist rejected the targets query, or it requires config packages or custom configuration.";
|
|
146
|
-
readonly recovery: "Use a self-contained query without config packages or custom configuration — call browsercompat_list_reference with topic browserslist_agents for
|
|
151
|
+
readonly recovery: "Use a self-contained query without config packages or custom configuration — call browsercompat_list_reference with topic browserslist_agents for valid agent ids. A negation-only query needs a base, e.g. \"defaults, not dead\" rather than \"not dead\".";
|
|
147
152
|
readonly thrownBy: "service";
|
|
148
153
|
}, {
|
|
149
154
|
readonly reason: "no_targets_resolved";
|
|
150
155
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
151
156
|
readonly when: "The query matched no browser versions at all, or only agents with no browser-compat-data counterpart. A mapped agent whose version token does not resolve is reported in unchecked_targets instead.";
|
|
152
|
-
readonly recovery: "Widen the targets query so it selects at least one
|
|
157
|
+
readonly recovery: "Widen the targets query so it selects at least one agent with compatibility data — call browsercompat_list_reference with topic browserslist_agents to see which agents do.";
|
|
158
|
+
}, {
|
|
159
|
+
readonly reason: "unknown_region";
|
|
160
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
161
|
+
readonly when: "usage_region is malformed or has no bundled caniuse usage data.";
|
|
162
|
+
readonly recovery: "Use a bundled country code such as CN or an alt-xx code such as alt-as, or omit usage_region for global traffic.";
|
|
163
|
+
readonly thrownBy: "service";
|
|
153
164
|
}, {
|
|
154
165
|
readonly reason: "invalid_feature_input";
|
|
155
166
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browsercompat-compare-support.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/browsercompat-compare-support.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"browsercompat-compare-support.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/browsercompat-compare-support.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAmQjE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwoBtC,CAAC"}
|
|
@@ -13,7 +13,7 @@ import { getBaselineService } from '../../../services/baseline/baseline-service.
|
|
|
13
13
|
import { resolveFeature } from '../../../services/baseline/feature-resolver.js';
|
|
14
14
|
import { getBcdService } from '../../../services/bcd/bcd-service.js';
|
|
15
15
|
import { DataVersionSchema, getDataVersion, renderDataVersion, } from '../../../services/data-version/data-version-service.js';
|
|
16
|
-
import { CANIUSE_ATTRIBUTION, getTargetsService } from '../../../services/targets/targets-service.js';
|
|
16
|
+
import { CANIUSE_ATTRIBUTION, getTargetsService, usageAudience, } from '../../../services/targets/targets-service.js';
|
|
17
17
|
import { markdownText } from '../../../utils/markdown-text.js';
|
|
18
18
|
import { batchCompatKeys, FEATURES_MAX, FEATURES_PER_CALL, formatBatchCompatKeys, formatOmittedFeatures, formatStatementParts, ResolvedAsSchema, STATEMENT_FIELDS, } from './compat-shapes.js';
|
|
19
19
|
/**
|
|
@@ -31,7 +31,10 @@ const FailingVerdictSchema = z
|
|
|
31
31
|
'before_feature_support',
|
|
32
32
|
'no_feature_support',
|
|
33
33
|
])
|
|
34
|
-
.describe('Why this target failed. From a key: partial means the implementation does not meet the mandatory specified behavior, prefixed means it only ships under a vendor prefix or a different name, flagged means it only works behind a preference or runtime flag, removed means it shipped and was later removed before
|
|
34
|
+
.describe('Why this target failed. From a key: partial means the implementation does not meet the mandatory specified behavior, prefixed means it only ships under a vendor prefix or a different name, flagged means it only works behind a preference or runtime flag, removed means it shipped and was later removed, at or before the release the target failed at, unsupported means it was never added, preview_only means it only works in a preview channel. From web-features’ feature-level support: before_feature_support means the target predates the release web-features lists for the feature, no_feature_support means web-features lists no release of this core browser for the feature — which also covers a feature it lists no release for at all, such as a discontinued one (mutation-events) that older releases shipped; call again with one of compat_keys for a key-level verdict on such a target.');
|
|
35
|
+
const TargetUsageSchema = z
|
|
36
|
+
.number()
|
|
37
|
+
.describe('Percentage points of traffic this target covers, globally or in usage_region.');
|
|
35
38
|
const FailingTargetSchema = z.object({
|
|
36
39
|
agent: z.string().describe('browserslist agent id the target came from.'),
|
|
37
40
|
version_token: z.string().describe('Version token browserslist produced for that agent.'),
|
|
@@ -39,8 +42,9 @@ const FailingTargetSchema = z.object({
|
|
|
39
42
|
bcd_version: z
|
|
40
43
|
.string()
|
|
41
44
|
.nullable()
|
|
42
|
-
.describe('browser-compat-data release the token
|
|
45
|
+
.describe('browser-compat-data release the failure was found at: the release the token maps to, or for a grouped token such as ios_saf 15.0-15.1 the oldest failing release it spans. null when that release predates them all.'),
|
|
43
46
|
verdict: FailingVerdictSchema,
|
|
47
|
+
usage_percent: TargetUsageSchema,
|
|
44
48
|
...STATEMENT_FIELDS,
|
|
45
49
|
});
|
|
46
50
|
const FailingRangeSchema = z.object({
|
|
@@ -51,6 +55,9 @@ const FailingRangeSchema = z.object({
|
|
|
51
55
|
.describe('Version token of the run’s last, oldest target; equals newest for a run of one.'),
|
|
52
56
|
count: z.number().int().describe('Query targets in the run.'),
|
|
53
57
|
verdict: FailingVerdictSchema,
|
|
58
|
+
usage_percent: z
|
|
59
|
+
.number()
|
|
60
|
+
.describe('Percentage points of traffic the targets in this run cover, globally or in usage_region.'),
|
|
54
61
|
});
|
|
55
62
|
const ResolvedTargetSchema = z.object({
|
|
56
63
|
agent: z.string().describe('browserslist agent id.'),
|
|
@@ -59,14 +66,14 @@ const ResolvedTargetSchema = z.object({
|
|
|
59
66
|
bcd_version: z
|
|
60
67
|
.string()
|
|
61
68
|
.nullable()
|
|
62
|
-
.describe('browser-compat-data release the token
|
|
69
|
+
.describe('browser-compat-data release the token maps to, or null when it predates them all. A grouped token such as ios_saf 15.0-15.1 maps at its lower endpoint and is judged at every release from this one through its upper endpoint’s.'),
|
|
63
70
|
bcd_release_index: z
|
|
64
71
|
.number()
|
|
65
72
|
.int()
|
|
66
|
-
.describe('
|
|
73
|
+
.describe('Ordinal of the bcd_version release; -1 when the token predates every release.'),
|
|
67
74
|
evaluated: z
|
|
68
75
|
.boolean()
|
|
69
|
-
.describe('True when every compared feature has compatibility data for this target. False when at least one compared feature
|
|
76
|
+
.describe('True when every compared feature has compatibility data for this target. False when the data of at least one compared feature does not establish support for it either way, or when no feature in the call was comparable — the target then also appears in unchecked_targets. Mapping onto a release is not evaluation.'),
|
|
70
77
|
});
|
|
71
78
|
const UncheckedTargetSchema = z.object({
|
|
72
79
|
agent: z.string().describe('browserslist agent id.'),
|
|
@@ -79,8 +86,8 @@ const UncheckedTargetSchema = z.object({
|
|
|
79
86
|
'no_feature_level_data',
|
|
80
87
|
'no_comparable_feature',
|
|
81
88
|
])
|
|
82
|
-
.describe('no_bcd_browser when the agent has no browser-compat-data counterpart, unknown_version when the token maps to no release, no_bcd_data when a compared key records nothing for that browser, no_feature_level_data when a feature judged on web-features’ feature-level support has no answer for the target — a browser outside the Baseline core set, or a release before a ≤ bound — so call again with one of its compat_keys for a key-level answer, no_comparable_feature when every entry in features was a miss or ambiguous so nothing was compared. In the top-level list a target unchecked by several compared features takes the reason of the first of them.'),
|
|
83
|
-
usage_percent:
|
|
89
|
+
.describe('no_bcd_browser when the agent has no browser-compat-data counterpart, unknown_version when the token maps to no release, no_bcd_data when a compared key’s data does not establish support either way for the target — the key records nothing for that browser, or the target sits before a ≤ bound — no_feature_level_data when a feature judged on web-features’ feature-level support has no answer for the target — a browser outside the Baseline core set, or a release before a ≤ bound — so call again with one of its compat_keys for a key-level answer, no_comparable_feature when every entry in features was a miss or ambiguous so nothing was compared. In the top-level list a target unchecked by several compared features takes the reason of the first of them.'),
|
|
90
|
+
usage_percent: TargetUsageSchema,
|
|
84
91
|
});
|
|
85
92
|
const ResultSchema = z.object({
|
|
86
93
|
input: z.string().describe('The feature string as the caller sent it.'),
|
|
@@ -101,7 +108,11 @@ const ResultSchema = z.object({
|
|
|
101
108
|
.number()
|
|
102
109
|
.int()
|
|
103
110
|
.optional()
|
|
104
|
-
.describe('Failing targets across the whole query. Present when the feature was compared
|
|
111
|
+
.describe('Failing targets across the whole query. Present when the feature was compared.'),
|
|
112
|
+
failing_coverage_percent: z
|
|
113
|
+
.number()
|
|
114
|
+
.optional()
|
|
115
|
+
.describe('Percentage points of traffic the failing targets cover across the whole query, globally or in usage_region. Present when the feature was compared, including 0 when none failed.'),
|
|
105
116
|
failing_ranges: z
|
|
106
117
|
.array(FailingRangeSchema.describe('A run of consecutive failing query targets.'))
|
|
107
118
|
.optional()
|
|
@@ -114,7 +125,7 @@ const ResultSchema = z.object({
|
|
|
114
125
|
evaluated_coverage_percent: z
|
|
115
126
|
.number()
|
|
116
127
|
.optional()
|
|
117
|
-
.describe('Percentage points of
|
|
128
|
+
.describe('Percentage points of traffic the evaluated targets cover, globally or in usage_region.'),
|
|
118
129
|
unchecked_total: z
|
|
119
130
|
.number()
|
|
120
131
|
.int()
|
|
@@ -123,7 +134,7 @@ const ResultSchema = z.object({
|
|
|
123
134
|
unchecked_coverage_percent: z
|
|
124
135
|
.number()
|
|
125
136
|
.optional()
|
|
126
|
-
.describe('Percentage points of
|
|
137
|
+
.describe('Percentage points of traffic the targets not evaluated for this feature cover, globally or in usage_region.'),
|
|
127
138
|
unchecked_targets: z
|
|
128
139
|
.array(UncheckedTargetSchema.describe('A target this feature was not evaluated against.'))
|
|
129
140
|
.optional()
|
|
@@ -139,14 +150,27 @@ const ResultSchema = z.object({
|
|
|
139
150
|
.describe('Every browser-compat-data key the id owns. Present with compat_keys.'),
|
|
140
151
|
guidance: z.string().optional().describe('What to do next on a miss or an ambiguous verdict.'),
|
|
141
152
|
});
|
|
142
|
-
/**
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
153
|
+
/**
|
|
154
|
+
* Judge a target at every release it spans, oldest first. The oldest failing
|
|
155
|
+
* release decides, and the failure names that release; with no failure, a
|
|
156
|
+
* release the source has no answer for leaves the target unknown, so a grouped
|
|
157
|
+
* token never clears on part of its range.
|
|
158
|
+
*/
|
|
159
|
+
function judgeSpan(target, judge) {
|
|
160
|
+
let unknown = false;
|
|
161
|
+
for (const release of target.span) {
|
|
162
|
+
const judgement = judge(target.bcd_browser, release.index);
|
|
163
|
+
if (judgement.verdict === 'unknown')
|
|
164
|
+
unknown = true;
|
|
165
|
+
else if (judgement.verdict !== 'supported')
|
|
166
|
+
return { ...judgement, release };
|
|
167
|
+
}
|
|
168
|
+
return { verdict: unknown ? 'unknown' : 'supported' };
|
|
169
|
+
}
|
|
146
170
|
/** The browserslist token a target row came from. */
|
|
147
171
|
const tokenOf = (target) => `${target.agent} ${target.version_token}`.trim();
|
|
148
172
|
export const browsercompatCompareSupport = tool('browsercompat_compare_support', {
|
|
149
|
-
description: 'Compute whether a set of web features clears an explicit browserslist target query. Compares up to 20 features per call; up to 100 may be sent, and entries past the 20th come back unevaluated in omitted_features for the next call. Every call evaluates the whole query: each feature gets a verdict, the
|
|
173
|
+
description: 'Compute whether a set of web features clears an explicit browserslist target query. Compares up to 20 features per call; up to 100 may be sent, and entries past the 20th come back unevaluated in omitted_features for the next call. Every call evaluates the whole query: each feature gets a verdict, the failing targets grouped into runs in failing_ranges, and counts and traffic coverage for evaluated, unchecked, and failing targets. Coverage is global unless usage_region selects a bundled region. The target rows behind those numbers cover target_limit query targets per call, 10 by default and up to 1000; page through them with target_offset, and verdicts, coverage, and totals stay identical on every page. Failing rows include the prefix, alternative name, or flag behind the verdict when applicable. A feature clears only when every target was evaluated and supports it. A query with unchecked targets and no failure is inconclusive. A BCD key is judged on its own per-browser or runtime support. A web-features id spanning several keys, such as grid, is judged on feature-level support in Baseline core browsers; other targets are unchecked.',
|
|
150
174
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
151
175
|
input: z.object({
|
|
152
176
|
features: z
|
|
@@ -159,6 +183,10 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
159
183
|
.min(1)
|
|
160
184
|
.max(500)
|
|
161
185
|
.describe('A self-contained browserslist query, for example "defaults" or "> 0.5%, last 2 versions", 1 to 500 characters. Config packages and custom configuration are unsupported; local config discovery is disabled.'),
|
|
186
|
+
usage_region: z
|
|
187
|
+
.string()
|
|
188
|
+
.optional()
|
|
189
|
+
.describe('Audience for all usage and coverage figures, independent of target selection. Use a bundled country code such as CN or an alt-xx code such as alt-as. The default is global traffic.'),
|
|
162
190
|
resolve: z
|
|
163
191
|
.boolean()
|
|
164
192
|
.default(false)
|
|
@@ -173,12 +201,16 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
173
201
|
.number()
|
|
174
202
|
.int()
|
|
175
203
|
.min(1)
|
|
176
|
-
.max(
|
|
177
|
-
.default(
|
|
178
|
-
.describe('How many query targets this page covers,
|
|
204
|
+
.max(1000)
|
|
205
|
+
.default(10)
|
|
206
|
+
.describe('How many query targets this page covers, 1 to 1000; the page holds that many, fewer only on the last page. It bounds every list of target rows in the response and never the evaluation: verdicts, coverage, and totals always describe the whole query.'),
|
|
179
207
|
}),
|
|
180
208
|
output: z.object({
|
|
181
209
|
query_echo: z.string().describe('The targets query as the server parsed it.'),
|
|
210
|
+
usage_region: z
|
|
211
|
+
.string()
|
|
212
|
+
.optional()
|
|
213
|
+
.describe('Normalized audience code when requested. When omitted, usage figures are global.'),
|
|
182
214
|
comparable_features: z
|
|
183
215
|
.number()
|
|
184
216
|
.int()
|
|
@@ -203,10 +235,10 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
203
235
|
.describe('Query targets not evaluated for every compared feature, across every page.'),
|
|
204
236
|
target_coverage_percent: z
|
|
205
237
|
.number()
|
|
206
|
-
.describe('Percentage points of
|
|
238
|
+
.describe('Percentage points of traffic covered by the targets evaluated for every compared feature, globally or in usage_region; 0 when no feature was comparable.'),
|
|
207
239
|
unchecked_coverage_percent: z
|
|
208
240
|
.number()
|
|
209
|
-
.describe('Percentage points of
|
|
241
|
+
.describe('Percentage points of traffic covered by the targets counted in unchecked_targets_total, globally or in usage_region.'),
|
|
210
242
|
results: z
|
|
211
243
|
.array(ResultSchema.describe('One result per evaluated entry, in input order.'))
|
|
212
244
|
.describe('Per-feature verdicts and totals over the whole query for the first 20 entries, each with its own target rows for this page.'),
|
|
@@ -222,9 +254,7 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
222
254
|
data_version: DataVersionSchema.describe('Vintage of each bundled dataset behind this answer.'),
|
|
223
255
|
totalCount: z.number().describe('Number of targets the query resolved to, across every page.'),
|
|
224
256
|
shown: z.number().describe('Number of query targets this page covers.'),
|
|
225
|
-
cap: z
|
|
226
|
-
.number()
|
|
227
|
-
.describe('The page size applied: target_limit, or 10 when target_limit was above 10.'),
|
|
257
|
+
cap: z.number().describe('The page size requested in target_limit.'),
|
|
228
258
|
truncated: z.boolean().describe('True when more query targets remain past this page.'),
|
|
229
259
|
nextOffset: z
|
|
230
260
|
.number()
|
|
@@ -236,7 +266,7 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
236
266
|
uncheckedNotice: z
|
|
237
267
|
.string()
|
|
238
268
|
.optional()
|
|
239
|
-
.describe('How many of the query targets were not evaluated for every compared feature, the agents they belong to, and
|
|
269
|
+
.describe('How many of the query targets were not evaluated for every compared feature, the agents they belong to, and the audience percentage points they cover.'),
|
|
240
270
|
offsetNotice: z
|
|
241
271
|
.string()
|
|
242
272
|
.optional()
|
|
@@ -258,14 +288,21 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
258
288
|
reason: 'invalid_target_query',
|
|
259
289
|
code: JsonRpcErrorCode.ValidationError,
|
|
260
290
|
when: 'browserslist rejected the targets query, or it requires config packages or custom configuration.',
|
|
261
|
-
recovery: 'Use a self-contained query without config packages or custom configuration — call browsercompat_list_reference with topic browserslist_agents for
|
|
291
|
+
recovery: 'Use a self-contained query without config packages or custom configuration — call browsercompat_list_reference with topic browserslist_agents for valid agent ids. A negation-only query needs a base, e.g. "defaults, not dead" rather than "not dead".',
|
|
262
292
|
thrownBy: 'service',
|
|
263
293
|
},
|
|
264
294
|
{
|
|
265
295
|
reason: 'no_targets_resolved',
|
|
266
296
|
code: JsonRpcErrorCode.ValidationError,
|
|
267
297
|
when: 'The query matched no browser versions at all, or only agents with no browser-compat-data counterpart. A mapped agent whose version token does not resolve is reported in unchecked_targets instead.',
|
|
268
|
-
recovery: 'Widen the targets query so it selects at least one
|
|
298
|
+
recovery: 'Widen the targets query so it selects at least one agent with compatibility data — call browsercompat_list_reference with topic browserslist_agents to see which agents do.',
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
reason: 'unknown_region',
|
|
302
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
303
|
+
when: 'usage_region is malformed or has no bundled caniuse usage data.',
|
|
304
|
+
recovery: 'Use a bundled country code such as CN or an alt-xx code such as alt-as, or omit usage_region for global traffic.',
|
|
305
|
+
thrownBy: 'service',
|
|
269
306
|
},
|
|
270
307
|
{
|
|
271
308
|
reason: 'invalid_feature_input',
|
|
@@ -276,7 +313,6 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
276
313
|
],
|
|
277
314
|
async handler(input, ctx) {
|
|
278
315
|
const dataVersion = await getDataVersion();
|
|
279
|
-
ctx.enrich({ data_version: dataVersion, attribution: CANIUSE_ATTRIBUTION });
|
|
280
316
|
if (input.features.some((entry) => entry.trim().length === 0)) {
|
|
281
317
|
throw ctx.fail('invalid_feature_input', 'One or more entries in features are whitespace-only.', { ...ctx.recoveryFor('invalid_feature_input') });
|
|
282
318
|
}
|
|
@@ -285,8 +321,16 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
285
321
|
getBaselineService(),
|
|
286
322
|
getTargetsService(),
|
|
287
323
|
]);
|
|
324
|
+
const regionalUsage = input.usage_region === undefined ? undefined : targets.regionalUsage(input.usage_region);
|
|
325
|
+
const usageRegion = regionalUsage?.region;
|
|
326
|
+
const audience = usageAudience(usageRegion);
|
|
327
|
+
const coverage = (tokens) => targets.coverage(tokens, usageRegion);
|
|
328
|
+
ctx.enrich({
|
|
329
|
+
data_version: dataVersion,
|
|
330
|
+
attribution: regionalUsage?.attribution ?? CANIUSE_ATTRIBUTION,
|
|
331
|
+
});
|
|
288
332
|
const tokens = targets.queryTokens(input.targets);
|
|
289
|
-
const { resolved, unchecked: unmapped } = await targets.resolveTargets(tokens);
|
|
333
|
+
const { resolved, unchecked: unmapped } = await targets.resolveTargets(tokens, usageRegion);
|
|
290
334
|
/**
|
|
291
335
|
* Only a query with nothing left to evaluate is an error. A mapped agent
|
|
292
336
|
* whose version token does not resolve carries a per-token reason of its
|
|
@@ -304,37 +348,39 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
304
348
|
const queryTargets = tokens
|
|
305
349
|
.map((token) => byToken.get(token))
|
|
306
350
|
.filter((target) => target !== undefined);
|
|
307
|
-
const
|
|
308
|
-
const onPage = new Set(tokens.slice(input.target_offset, input.target_offset + pageSize));
|
|
351
|
+
const onPage = new Set(tokens.slice(input.target_offset, input.target_offset + input.target_limit));
|
|
309
352
|
const isOnPage = (target) => onPage.has(tokenOf(target));
|
|
310
353
|
const usage = new Map();
|
|
311
|
-
/**
|
|
312
|
-
const
|
|
313
|
-
const token = tokenOf(target);
|
|
354
|
+
/** Reuse singleton coverage for rows shared by several features. */
|
|
355
|
+
const usagePercent = (token) => {
|
|
314
356
|
let usagePercent = usage.get(token);
|
|
315
357
|
if (usagePercent === undefined) {
|
|
316
|
-
usagePercent =
|
|
358
|
+
usagePercent = coverage([token]);
|
|
317
359
|
usage.set(token, usagePercent);
|
|
318
360
|
}
|
|
319
|
-
return
|
|
320
|
-
agent: target.agent,
|
|
321
|
-
version_token: target.version_token,
|
|
322
|
-
reason,
|
|
323
|
-
usage_percent: usagePercent,
|
|
324
|
-
};
|
|
361
|
+
return usagePercent;
|
|
325
362
|
};
|
|
363
|
+
/** A mapped target a comparison could not evaluate, reported the way an unmapped one is. */
|
|
364
|
+
const uncheckedRow = (target, reason) => ({
|
|
365
|
+
agent: target.agent,
|
|
366
|
+
version_token: target.version_token,
|
|
367
|
+
reason,
|
|
368
|
+
usage_percent: usagePercent(tokenOf(target)),
|
|
369
|
+
});
|
|
326
370
|
/**
|
|
327
|
-
* Judge every query target with one support source
|
|
328
|
-
* no answer for is unchecked with that
|
|
329
|
-
* Failing targets are also grouped into
|
|
330
|
-
*
|
|
331
|
-
*
|
|
371
|
+
* Judge every query target with one support source, at every release the
|
|
372
|
+
* target spans. A target the source has no answer for is unchecked with that
|
|
373
|
+
* source's reason, never a failure. Failing targets are also grouped into
|
|
374
|
+
* runs as they arrive in query order: a run continues only across
|
|
375
|
+
* consecutive targets of one agent failing with one verdict, and any target
|
|
376
|
+
* that passed or went unevaluated ends it.
|
|
332
377
|
*/
|
|
333
378
|
const compare = (judge, unknownReason) => {
|
|
334
379
|
const failing = [];
|
|
335
380
|
const ranges = [];
|
|
336
381
|
const notEvaluated = [];
|
|
337
382
|
const evaluatedTokens = [];
|
|
383
|
+
const failingTokens = [];
|
|
338
384
|
let run;
|
|
339
385
|
for (const target of queryTargets) {
|
|
340
386
|
if ('reason' in target) {
|
|
@@ -342,22 +388,25 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
342
388
|
run = undefined;
|
|
343
389
|
continue;
|
|
344
390
|
}
|
|
345
|
-
const
|
|
346
|
-
if (verdict === 'unknown') {
|
|
391
|
+
const judgement = judgeSpan(target, judge);
|
|
392
|
+
if (judgement.verdict === 'unknown') {
|
|
347
393
|
notEvaluated.push(uncheckedRow(target, unknownReason));
|
|
348
394
|
run = undefined;
|
|
349
395
|
continue;
|
|
350
396
|
}
|
|
351
|
-
|
|
352
|
-
|
|
397
|
+
const token = tokenOf(target);
|
|
398
|
+
evaluatedTokens.push(token);
|
|
399
|
+
if (judgement.verdict === 'supported') {
|
|
353
400
|
run = undefined;
|
|
354
401
|
continue;
|
|
355
402
|
}
|
|
403
|
+
const { verdict, statement, release } = judgement;
|
|
404
|
+
failingTokens.push(token);
|
|
356
405
|
failing.push({
|
|
357
406
|
agent: target.agent,
|
|
358
407
|
version_token: target.version_token,
|
|
359
408
|
bcd_browser: target.bcd_browser,
|
|
360
|
-
bcd_version:
|
|
409
|
+
bcd_version: release.version,
|
|
361
410
|
verdict,
|
|
362
411
|
...statement,
|
|
363
412
|
});
|
|
@@ -376,13 +425,20 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
376
425
|
ranges.push(run);
|
|
377
426
|
}
|
|
378
427
|
}
|
|
428
|
+
let start = 0;
|
|
379
429
|
return {
|
|
380
430
|
failing,
|
|
381
|
-
|
|
431
|
+
failingCoverage: coverage(failingTokens),
|
|
432
|
+
ranges: ranges.map((range) => {
|
|
433
|
+
const end = start + range.count;
|
|
434
|
+
const usage_percent = coverage(failingTokens.slice(start, end));
|
|
435
|
+
start = end;
|
|
436
|
+
return { ...range, usage_percent };
|
|
437
|
+
}),
|
|
382
438
|
unchecked: notEvaluated,
|
|
383
439
|
evaluatedTotal: evaluatedTokens.length,
|
|
384
|
-
evaluatedCoverage:
|
|
385
|
-
uncheckedCoverage:
|
|
440
|
+
evaluatedCoverage: coverage(evaluatedTokens),
|
|
441
|
+
uncheckedCoverage: coverage(notEvaluated.map(tokenOf)),
|
|
386
442
|
};
|
|
387
443
|
};
|
|
388
444
|
/**
|
|
@@ -425,8 +481,8 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
425
481
|
source: 'bcd_key',
|
|
426
482
|
cacheKey: `${key}`,
|
|
427
483
|
unknownReason: 'no_bcd_data',
|
|
428
|
-
judge: (
|
|
429
|
-
const { verdict, detail } = bcd.supportAt(leaf,
|
|
484
|
+
judge: (browser, releaseIndex) => {
|
|
485
|
+
const { verdict, detail } = bcd.supportAt(leaf, browser, releaseIndex);
|
|
430
486
|
if (verdict === 'supported' || verdict === 'unknown')
|
|
431
487
|
return { verdict };
|
|
432
488
|
const { notes: _notes, impl_url: _implUrl, ...statement } = detail;
|
|
@@ -438,8 +494,8 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
438
494
|
source: 'web_features_feature',
|
|
439
495
|
cacheKey: `${featureId}`,
|
|
440
496
|
unknownReason: 'no_feature_level_data',
|
|
441
|
-
judge: (
|
|
442
|
-
verdict: bcd.featureSupportAt(featureLevel, baseline.coreBrowserIds,
|
|
497
|
+
judge: (browser, releaseIndex) => ({
|
|
498
|
+
verdict: bcd.featureSupportAt(featureLevel, baseline.coreBrowserIds, browser, releaseIndex),
|
|
443
499
|
}),
|
|
444
500
|
}
|
|
445
501
|
: undefined;
|
|
@@ -473,8 +529,12 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
473
529
|
: comparison.unchecked.length > 0
|
|
474
530
|
? 'inconclusive'
|
|
475
531
|
: 'clears',
|
|
476
|
-
failing_targets: comparison.failing.filter(isOnPage)
|
|
532
|
+
failing_targets: comparison.failing.filter(isOnPage).map((row) => ({
|
|
533
|
+
...row,
|
|
534
|
+
usage_percent: usagePercent(tokenOf(row)),
|
|
535
|
+
})),
|
|
477
536
|
failing_total: comparison.failing.length,
|
|
537
|
+
failing_coverage_percent: comparison.failingCoverage,
|
|
478
538
|
failing_ranges: comparison.ranges,
|
|
479
539
|
evaluated_total: comparison.evaluatedTotal,
|
|
480
540
|
evaluated_coverage_percent: comparison.evaluatedCoverage,
|
|
@@ -511,11 +571,11 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
511
571
|
});
|
|
512
572
|
const uncheckedTokens = new Set(uncheckedTargets.map(tokenOf));
|
|
513
573
|
const evaluatedTokens = tokens.filter((token) => !uncheckedTokens.has(token));
|
|
514
|
-
const uncheckedCoverage =
|
|
574
|
+
const uncheckedCoverage = coverage([...uncheckedTokens]);
|
|
515
575
|
const shown = onPage.size;
|
|
516
576
|
const nextOffset = input.target_offset + shown;
|
|
517
577
|
const truncated = nextOffset < tokens.length;
|
|
518
|
-
ctx.enrich({ totalCount: tokens.length, shown, cap:
|
|
578
|
+
ctx.enrich({ totalCount: tokens.length, shown, cap: input.target_limit, truncated });
|
|
519
579
|
if (truncated)
|
|
520
580
|
ctx.enrich({ nextOffset });
|
|
521
581
|
if (shown === 0) {
|
|
@@ -525,13 +585,13 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
525
585
|
}
|
|
526
586
|
if (comparableFeatures === 0) {
|
|
527
587
|
ctx.enrich({
|
|
528
|
-
uncheckedNotice: `No feature was comparable, so none of the ${tokens.length} target versions was evaluated (${uncheckedCoverage}% of
|
|
588
|
+
uncheckedNotice: `No feature was comparable, so none of the ${tokens.length} target versions was evaluated (${uncheckedCoverage}% of ${audience}). Resolve the miss and ambiguous entries and call again.`,
|
|
529
589
|
});
|
|
530
590
|
}
|
|
531
591
|
else if (uncheckedTargets.length > 0) {
|
|
532
592
|
const agents = [...new Set(uncheckedTargets.map((target) => target.agent))].join(', ');
|
|
533
593
|
ctx.enrich({
|
|
534
|
-
uncheckedNotice: `${uncheckedTargets.length} of ${tokens.length} target versions were not evaluated for every compared feature (${agents}), together ${uncheckedCoverage}% of
|
|
594
|
+
uncheckedNotice: `${uncheckedTargets.length} of ${tokens.length} target versions were not evaluated for every compared feature (${agents}), together ${uncheckedCoverage}% of ${audience}. These targets prevent an all-clear result.`,
|
|
535
595
|
});
|
|
536
596
|
}
|
|
537
597
|
ctx.log.debug('Compared support', {
|
|
@@ -545,15 +605,17 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
545
605
|
});
|
|
546
606
|
return {
|
|
547
607
|
query_echo: input.targets.trim(),
|
|
608
|
+
...(usageRegion === undefined ? {} : { usage_region: usageRegion }),
|
|
548
609
|
comparable_features: comparableFeatures,
|
|
549
|
-
targets_resolved: resolved
|
|
550
|
-
|
|
551
|
-
|
|
610
|
+
targets_resolved: resolved.filter(isOnPage).map(({ span: _span, ...target }) => ({
|
|
611
|
+
...target,
|
|
612
|
+
evaluated: !uncheckedTokens.has(tokenOf(target)),
|
|
613
|
+
})),
|
|
552
614
|
targets_resolved_total: resolved.length,
|
|
553
615
|
evaluated_targets_total: evaluatedTokens.length,
|
|
554
616
|
unchecked_targets: uncheckedTargets.filter(isOnPage),
|
|
555
617
|
unchecked_targets_total: uncheckedTargets.length,
|
|
556
|
-
target_coverage_percent:
|
|
618
|
+
target_coverage_percent: coverage(evaluatedTokens),
|
|
557
619
|
unchecked_coverage_percent: uncheckedCoverage,
|
|
558
620
|
results,
|
|
559
621
|
...(omitted.length === 0 ? {} : { omitted_features: omitted }),
|
|
@@ -561,6 +623,7 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
561
623
|
};
|
|
562
624
|
},
|
|
563
625
|
format: (result) => {
|
|
626
|
+
const audience = usageAudience(result.usage_region);
|
|
564
627
|
const clearing = result.results.filter((item) => item.verdict === 'clears').length;
|
|
565
628
|
const queryTotal = result.evaluated_targets_total + result.unchecked_targets_total;
|
|
566
629
|
const lines = [
|
|
@@ -568,7 +631,7 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
568
631
|
...(result.comparable_features === 0
|
|
569
632
|
? ['No feature was comparable, so no target version was evaluated.']
|
|
570
633
|
: []),
|
|
571
|
-
`Evaluated for every compared feature: ${result.evaluated_targets_total} of ${queryTotal} target versions (${result.target_coverage_percent}% of
|
|
634
|
+
`Evaluated for every compared feature: ${result.evaluated_targets_total} of ${queryTotal} target versions (${result.target_coverage_percent}% of ${audience}) · not evaluated: ${result.unchecked_targets_total} (${result.unchecked_coverage_percent}%)`,
|
|
572
635
|
`Compared ${result.comparable_features} of ${result.results.length} features · ${result.targets_resolved_total} of ${queryTotal} target versions map to a browser-compat-data release`,
|
|
573
636
|
`**all_clear:** ${result.all_clear}`,
|
|
574
637
|
...(result.omitted_features ? [formatOmittedFeatures(result.omitted_features)] : []),
|
|
@@ -585,15 +648,15 @@ export const browsercompatCompareSupport = tool('browsercompat_compare_support',
|
|
|
585
648
|
: ' - support_source: web_features_feature — web-features’ release per Baseline core browser for the feature as a whole');
|
|
586
649
|
}
|
|
587
650
|
if (item.unchecked_targets) {
|
|
588
|
-
lines.push(` - evaluated on ${item.evaluated_total} of ${queryTotal} target versions (${item.evaluated_coverage_percent}% of
|
|
651
|
+
lines.push(` - evaluated on ${item.evaluated_total} of ${queryTotal} target versions (${item.evaluated_coverage_percent}% of ${audience}) · failing ${item.failing_total} (${item.failing_coverage_percent}%) · not evaluated ${item.unchecked_total} (${item.unchecked_coverage_percent}%)`, ` - on this page: ${item.failing_targets.length} of ${item.failing_total} failing, ${item.unchecked_targets.length} of ${item.unchecked_total} not evaluated`);
|
|
589
652
|
}
|
|
590
653
|
if (item.failing_ranges) {
|
|
591
|
-
const runs = item.failing_ranges.map((range) => `${markdownText(range.agent)} ${markdownText(range.newest)}${range.oldest === range.newest ? '' : ` to ${markdownText(range.oldest)}`}: ${range.count} ${range.verdict}`);
|
|
654
|
+
const runs = item.failing_ranges.map((range) => `${markdownText(range.agent)} ${markdownText(range.newest)}${range.oldest === range.newest ? '' : ` to ${markdownText(range.oldest)}`}: ${range.count} ${range.verdict} (${range.usage_percent}% usage)`);
|
|
592
655
|
lines.push(` - failing_ranges (whole query): ${runs.length === 0 ? 'none' : runs.join('; ')}`);
|
|
593
656
|
}
|
|
594
657
|
for (const target of item.failing_targets) {
|
|
595
658
|
const statement = formatStatementParts(target);
|
|
596
|
-
lines.push(` - fails on ${markdownText(target.agent)} ${markdownText(target.version_token)} → ${markdownText(target.bcd_browser)} ${markdownText(target.bcd_version ?? 'older than all releases')} (${target.verdict})${statement.length === 0 ? '' : ` · ${statement.join(' · ')}`}`);
|
|
659
|
+
lines.push(` - fails on ${markdownText(target.agent)} ${markdownText(target.version_token)} → ${markdownText(target.bcd_browser)} ${markdownText(target.bcd_version ?? 'older than all releases')} (${target.verdict})${statement.length === 0 ? '' : ` · ${statement.join(' · ')}`} · ${target.usage_percent}% usage`);
|
|
597
660
|
}
|
|
598
661
|
for (const target of item.unchecked_targets ?? []) {
|
|
599
662
|
lines.push(` - not evaluated on ${markdownText(target.agent)} ${markdownText(target.version_token)} (${target.reason}, ${target.usage_percent}% usage)`);
|