ignore lightningcss global pseudo-class warning#13773
Merged
ascorbic merged 2 commits intowithastro:mainfrom May 21, 2025
Merged
ignore lightningcss global pseudo-class warning#13773ascorbic merged 2 commits intowithastro:mainfrom
ascorbic merged 2 commits intowithastro:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 608eb2a The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
CodSpeed Performance ReportMerging #13773 will not alter performanceComparing Summary
|
Member
|
Thank you @sijad , can you add a changeset? The contribution guide should tell you how |
549ca75 to
ccc50b1
Compare
Contributor
Author
|
@ematipico added |
ccc50b1 to
8f348f5
Compare
Merged
openscript
pushed a commit
to openscript/astro
that referenced
this pull request
Sep 12, 2025
* ignore lightningcss global pseudo-class warning * Update changeset --------- Co-authored-by: Matt Kane <m@mk.gg>
4 tasks
yurishkuro
added a commit
to jaegertracing/jaeger-ui
that referenced
this pull request
Mar 22, 2026
## Motivation The Vite 8 upgrade introduced new build warnings: 1. **`[EVAL] Warning` from `store/plugins/lib/json2.js`** — The `store` npm package (v2.0.12, latest and unmaintained) bundles a `json2` polyfill that uses `eval()`. Vite 8's rolldown bundler flags this. Since `store` is just a localStorage wrapper and the json2 polyfill is unnecessary in modern browsers, the entire dependency can be replaced. 2. **`::global` pseudo-element warning from LightningCSS** — Vite's CSS modules pipeline emits `::global()` syntax into the compiled CSS, which LightningCSS's minifier then flags as unrecognized. This is not in our source code — it's a Vite build tooling issue (related to [vitejs/vite#8480](vitejs/vite#8480)). The same workaround is used by Astro ([withastro/astro#13773](withastro/astro#13773)). ## Changes **Replaced `store` with `src/utils/storage.ts`** — A ~60-line utility wrapping `localStorage` with JSON serialization and type-safe getters: - `getString(key, defaultValue?)` — returns value only if it's a string - `getNumber(key, defaultValue?)` — returns value only if it's a number - `getBool(key, defaultValue?)` — returns value only if it's a boolean - `getJSON<T>(key)` — returns parsed JSON for complex objects - `set(key, value)` — stores JSON-serialized value Unlike the previous `as` type casts on the old `store.get()` (which returned `any`), the typed getters validate at runtime and return the default value if the stored data has an unexpected type. On JSON parse failure, `getRaw()` falls back to returning the raw string (matching the old `store` package behavior), so previously persisted plain-string values are not silently dropped. **Suppressed LightningCSS `::global` warning** — Added a small Vite plugin that filters this specific warning from the build logger. This is purely cosmetic; it does not change CSS processing. ## Side effects - The main JS bundle shrank by ~418 KB (from 2,797 KB to 2,379 KB) since the `store` package and its json2 polyfill are no longer included. - The `store` package is removed from `package.json` and `package-lock.json`. - Test files updated to mock the new `storage` utility instead of the `store` package. ## AI Usage in this PR (choose one) See [AI Usage Policy](https://github.com/jaegertracing/jaeger/blob/main/CONTRIBUTING_GUIDELINES.md#ai-usage-policy). - [ ] **None**: No AI tools were used in creating this PR - [ ] **Light**: AI provided minor assistance (formatting, simple suggestions) - [ ] **Moderate**: AI helped with code generation or debugging specific parts - [x] **Heavy**: AI generated most or all of the code changes --------- Signed-off-by: Yuri Shkuro <github@ysh.us>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
ignore lightningcss unsupported pseudo-class warning. fixes #13658
Testing
there's no testing for logger
Docs
no need to updated docs, no affect on user’s behavior