Vite: a wildcard inside an import.meta.glob brace alternative is matched literally

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

I maintainer di solito rispondono entro 1 giorno

@FredApps ci sta già lavorando.

Dal 17/11/2026.

  • #274 di @FredApps — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
typescript, vite
Ambito
devtools, testing

Direzione di ricerca

Start with globPattern in src/repo/graph.ts and trace how brace alternatives in import.meta.glob patterns are converted for matching. Use the repro in src/registry.test.ts with src/icons/index.ts and src/icons/star-icon.ts; done means changing star-icon.ts selects the registry test instead of reporting no affected tests and fallbackRequired: false.

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

Descrizione

In src/repo/graph.ts, globPattern escapes each {...} alternative of an import.meta.glob pattern as literal text. ./icons/{index,*-icon}.ts matches index.ts only; the files loaded through *-icon have no edge. Changing one selects no tests and does not fall back.

Repro: src/registry.ts with import.meta.glob('./icons/{index,*-icon}.ts', { eager: true }), src/icons/index.ts, src/icons/star-icon.ts, and src/registry.test.ts importing the registry. Change src/icons/star-icon.ts.

Expected: src/registry.test.ts is selected.

Actual: no affected tests, fallbackRequired: false.

Lingua principale
TypeScript
Stelle
0
Fork
4
Merge medio
18h 41m
PR unite (30g)
48

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 DiffCI/core

Tutte le issue di DiffCI/core

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.