Skip to content

Commit 6253970

Browse files
Bump @webref/css from 6.23.15 to 8.0.0 (microsoft#2230)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 17ac2ac commit 6253970

File tree

5 files changed

+9
-21
lines changed

5 files changed

+9
-21
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@typescript-eslint/eslint-plugin": "^8",
4848
"@typescript-eslint/parser": "^8",
4949
"@typescript/native-preview": "^7.0.0-dev.20251029.1",
50-
"@webref/css": "^6.23.7",
50+
"@webref/css": "^8.0.0",
5151
"@webref/elements": "^2.5.0",
5252
"@webref/events": "^1.18.6",
5353
"@webref/idl": "^3.66.2",

src/build/utils/map.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@ export function addToArrayMap<T>(
88
map.set(name, array);
99
}
1010

11-
export function addToStringMap(
12-
map: Map<string, string>,
13-
name: string,
14-
value: string,
15-
): void {
16-
const old = map.get(name) || "";
17-
map.set(name, `${old}\n${value}\n`);
18-
}
19-
2011
export function addToNestedMap(
2112
map: Map<string, Map<string, string>>,
2213
name: string,

src/build/webref/idl.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { listAll as listAllIdl } from "@webref/idl";
22
import { listAll as listAllCss } from "@webref/css";
33
import { generateWebIdlFromCssProperties } from "./css.js";
4-
import { addToStringMap } from "../utils/map.js";
54

65
export async function getWebidls(): Promise<Map<string, string>> {
76
const idl = await listAllIdl();
@@ -12,11 +11,9 @@ export async function getWebidls(): Promise<Map<string, string>> {
1211
const text = await file.text();
1312
map.set(key, text);
1413
}
15-
for (const [key, data] of Object.entries(css)) {
16-
const properties = data.properties.map((p) => p.name);
17-
if (properties.length) {
18-
addToStringMap(map, key, generateWebIdlFromCssProperties(properties));
19-
}
14+
const properties = css.properties.map((p) => p.name);
15+
if (properties.length) {
16+
map.set("css", generateWebIdlFromCssProperties(properties));
2017
}
2118
return map;
2219
}

src/build/webref/webref-css.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ declare module "@webref/css" {
55
interface Data {
66
properties: Property[];
77
}
8-
function listAll(): Promise<Record<string, Data>>;
8+
function listAll(): Promise<Data>;
99
}

0 commit comments

Comments
 (0)