Skip to content

Commit b87e457

Browse files
Merge branch 'main' into feat/empty-xref-search
2 parents f7fa003 + 82ea5f4 commit b87e457

4 files changed

Lines changed: 16 additions & 7 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"cors": "^2.8.6",
1717
"dotenv": "^17.4.2",
1818
"express": "^5.2.1",
19-
"express-rate-limit": "^8.4.0",
19+
"express-rate-limit": "^8.4.1",
2020
"helmet": "^8.1.0",
2121
"morgan": "^1.10.1",
2222
"nanoid": "^5.1.9",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

routes/caniuse/lib/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const SUPPORT_TITLES = new Map([
3232
["p", "No support, but has Polyfill."],
3333
["u", "Support unknown."],
3434
["x", "Requires prefix to work."],
35-
["d", "Disabled by default (needs to enabled)."],
35+
["d", "Disabled by default (needs to be enabled)."],
3636
]);
3737

3838
export type SupportKeys = ("y" | "n" | "a" | string)[];

routes/caniuse/lib/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,15 @@ function formatAsHTML(
130130
data: Data["summary"],
131131
): string {
132132
const getSupportTitle = (keys: SupportKeys) => {
133+
const keySet = new Set(keys);
134+
if (keySet.has("d")) {
135+
if (keySet.has("y")) {
136+
return "Supported (disabled by default, needs to be enabled).";
137+
}
138+
if (keySet.has("a")) {
139+
return "Almost supported (disabled by default, needs to be enabled).";
140+
}
141+
}
133142
return keys
134143
.filter(key => SUPPORT_TITLES.has(key))
135144
.map(key => SUPPORT_TITLES.get(key)!)

0 commit comments

Comments
 (0)