From 051d53313b8c13b45975f78a137261870549ac3c Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 21 Oct 2026 18:28:51 +0000 Subject: [PATCH] chore: bump @projectwallace/css-parser to 0.19.0 str_index_of and str_starts_with now take the lowercase needle first. Update the one str_index_of call site accordingly. --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- src/lib/index.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 06df565..a680131 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "knip": "knip" }, "dependencies": { - "@projectwallace/css-parser": "^0.18.12" + "@projectwallace/css-parser": "^0.19.0" }, "devDependencies": { "@projectwallace/preset-oxlint": "^0.0.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f5333a6..8e9b209 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@projectwallace/css-parser': - specifier: ^0.18.12 - version: 0.18.12 + specifier: ^0.19.0 + version: 0.19.0 devDependencies: '@projectwallace/preset-oxlint': specifier: ^0.0.11 @@ -567,8 +567,8 @@ packages: cpu: [x64] os: [win32] - '@projectwallace/css-parser@0.18.12': - resolution: {integrity: sha512-U3sOKtSXuoY5cgtTiAn4TrS4uyLDDk+ezvk55ExjXpajZ4vkaCCEiwdYqIV4Z8aaLh5izCrskEM9w9Ddk5wwpw==} + '@projectwallace/css-parser@0.19.0': + resolution: {integrity: sha512-Sgb2uCRJbVfsEHbGaypNd8XnBcwtofc8vwDuxLrXXMQ1BeYT0X7Jr/DuFgbDX4cvQT9HusLXcNWT8JdjFzV/cw==} engines: {pnpm: '>=11.0.0'} '@projectwallace/preset-oxlint@0.0.11': @@ -1687,7 +1687,7 @@ snapshots: '@oxlint/binding-win32-x64-msvc@1.87.0': optional: true - '@projectwallace/css-parser@0.18.12': {} + '@projectwallace/css-parser@0.19.0': {} '@projectwallace/preset-oxlint@0.0.11(oxlint@1.87.0)': dependencies: diff --git a/src/lib/index.ts b/src/lib/index.ts index 1f29c37..9dae204 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -474,7 +474,7 @@ export function format_atrule_prelude( ): string { let optional_space = minify ? EMPTY_STRING : SPACE return prelude - .replaceAll(ATRULE_COLON_COMMA_RE, str_index_of(prelude, 'selector(') === -1 ? '$1 ' : '$1') // force whitespace after colon or comma, except inside `selector()` + .replaceAll(ATRULE_COLON_COMMA_RE, str_index_of('selector(', prelude) === -1 ? '$1 ' : '$1') // force whitespace after colon or comma, except inside `selector()` .replaceAll(ATRULE_PAREN_TEXT_RE, ') $1') // force whitespace between closing parenthesis and following text (usually and|or) .replaceAll(ATRULE_KEYWORD_PAREN_RE, '$1 (') // force whitespace between media/supports keywords and opening parenthesis .replaceAll(ATRULE_ARROW_COMPARE_RE, `${optional_space}$1${optional_space}`) // add optional spacing around =>, >= and <=