Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

upgrade: upstream CSS codemods parse stylesheets as JS

Aperta
#67 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
66/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
css, typescript
Ambito
cli, tooling

Direzione di ricerca

Start in packages/cli/codemods/upstream.mjs at wrapAstryxTransform, and check how it picks the parser for each file. The bug is that .css files reach the jscodeshift parser instead of the transform's postcss path. Reproduce by running the migrate-deprecated-theme-surface codemod over a stylesheet with an @layer rule. Done when CSS files are transformed without parse errors and JS/TS files still use the jscodeshift path.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

ui-common upgrade --from 0.2.0-alpha.18 (CLI 0.2.0-alpha.19) runs Astryx's migrate-deprecated-theme-surface codemod over .css files as if they were JS, and every stylesheet fails:

src/index.css (astryx:migrate-deprecated-theme-surface): produced unparseable output, not applied: Leading decorators must be attached to a class declaration. (19:7)
src/components/BAISider.css (astryx:migrate-deprecated-theme-surface): produced unparseable output, not applied: Unexpected token (12:0)

The @layer at-rule is read as a decorator. Running the same codemod with Astryx's own CLI (ui-common astryx upgrade --from 0.6.5 --path src) transforms those files through postcss, so the problem is in how packages/cli/codemods/upstream.mjs wraps an Astryx transform (wrapAstryxTransform): a CSS file should reach the transform's postcss path, not the jscodeshift parser.

Seen while moving backend.ai-webui to alpha.19 (lablup/backend.ai-webui#10327). Note also that Astryx's postcss path rewrites <style> inside CSS comments to \3c style>, so a consumer should review that diff either way.

Lingua principale
TypeScript
Stelle
2
Fork
0
Merge medio
1g 16h
PR unite (30g)
34

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lablup/ui-common

Tutte le issue di lablup/ui-common

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.