From 953be494517997279d6c0384cf7ad1949d8e8134 Mon Sep 17 00:00:00 2001 From: Bart Veneman Date: Sun, 19 Jul 2026 15:05:47 +0200 Subject: [PATCH] chore(deps): update css-parser to 0.17.0 --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- src/index.ts | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index c725f21..d125124 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "lint": "oxlint && oxfmt --check" }, "dependencies": { - "@projectwallace/css-parser": "~0.16.0" + "@projectwallace/css-parser": "~0.17.0" }, "devDependencies": { "@projectwallace/preset-oxlint": "^0.0.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6500f85..2e07f5f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@projectwallace/css-parser': - specifier: ~0.16.0 - version: 0.16.2 + specifier: ~0.17.0 + version: 0.17.0 devDependencies: '@projectwallace/preset-oxlint': specifier: ^0.0.11 @@ -313,8 +313,8 @@ packages: cpu: [x64] os: [win32] - '@projectwallace/css-parser@0.16.2': - resolution: {integrity: sha512-Z5cWNEI5alUAv9Fwm61/mkpNiepxRGUK04ndYyU02HhzITWQpFqxn+OwsHGz8PJ8iaQ4DfZzIA3bGBSgtQWIOg==} + '@projectwallace/css-parser@0.17.0': + resolution: {integrity: sha512-y+PHhq9YzC8M3Rndw3XX2tucnV8zEYDLyz/fEsRfd0VCSxol0bB6MU03vvXuICkW8+FLsME6Ff0TA0DVEUfg5A==} engines: {pnpm: '>=11.0.0'} '@projectwallace/preset-oxlint@0.0.11': @@ -1422,7 +1422,7 @@ snapshots: '@oxlint/binding-win32-x64-msvc@1.74.0': optional: true - '@projectwallace/css-parser@0.16.2': {} + '@projectwallace/css-parser@0.17.0': {} '@projectwallace/preset-oxlint@0.0.11(oxlint@1.74.0)': dependencies: diff --git a/src/index.ts b/src/index.ts index 5fa58b6..e582201 100644 --- a/src/index.ts +++ b/src/index.ts @@ -41,13 +41,13 @@ export function layer_tree_from_ast(ast: CSSNode): TreeNode[] { if (node.has_prelude) { let groups = node.prelude.text.split(',').map((s) => s.trim()) if (node.has_block) { - // prelude.children contains the individual segments for dotted notation - // e.g., @layer base.props {} has children: ["base", "props"] + // prelude.children contains one LayerName node per dotted notation, + // e.g., @layer base.props {} has a single child with name "base.props" let layer_names: string[] = [] if (is_atrule_prelude(node.prelude)) { for (let child of node.prelude.children) { if (is_layer_name(child)) { - layer_names.push(child.name) + layer_names.push(...get_layer_names(child.name)) } } } @@ -112,7 +112,7 @@ export function layer_tree_from_ast(ast: CSSNode): TreeNode[] { let layer_count = 0 for (let child of node.prelude.children) { if (is_layer_name(child)) { - layer_count++ + layer_count += get_layer_names(child.name).length } } // Pop all of them