Support for negated ignore patterns
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
- Ambito
- tooling
Direzione di ricerca
Inizia individuando la gestione dell’opzione ignore da parte di tinyglobby e i test di globbing esistenti. Confronta l’esempio richiesto di pattern negato con il comportamento attuale, quindi definisci una copertura per preservare i percorsi esclusi e ripristinare .yarn/patches/index.js; il lavoro è completato quando l’input mostrato restituisce index.js e .yarn/patches/index.js.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Would be great to support negated patterns in the ignore option.
Use case: respect files like .gitignore (or others like .prettierignore etc) when globbing.
E.g. globby has the gitignore option which does the .gitignore reading, parsing and evaluation.
I wouldn't expect tinyglobby to include this feature (to read and parse such ignore files), but would be great to support negated ignore patterns so tinyglobby could be extended to support the use case.
The same has been requested in both node-glob and fast-glob, but neither of them currently supports it. Refs:
It would make migration more interesting for globby (with gitignore: true) users. Also I understand tinyglobby wants to stay tiny so feel free to reject!
Here's an example simplified use case to clarify things a bit. Let's say we want to glob all **/index.js files in a workspace that has this .gitignore:
.yarn/*
!.yarn/patches
...
And files:
.
├── index.js
└── .yarn
├── patches
│ └── index.js
└── index.js
After reading the .gitignore file(s) and converting the patterns the options look like this:
glob(["**/*.js"], {
dot: true,
ignore: ["**/.yarn/*", "!**/.yarn/patches/**"],
});
Expected result:
["index.js", ".yarn/patches/index.js"]
Just saying, for users to stuff it all into patterns argument directly is likely not a good idea. I think this doesn't and shouldn't work:
glob(["**/*.{js,ts}", "!.yarn", ".yarn/patches/**/*.{js,ts}"], { dot: true })
- Lingua principale
- TypeScript
- Stelle
- 546
- Fork
- 30
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SuperchupuDev/tinyglobby
-
Some extglob negation patterns are not working with `expandDirectories: true`Forse già presa @hong4rc l’ha presa 104 giorni fa. Apertabug upstream
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
SuperchupuDev/tinyglobby#188 · 2 commenti ·
-
Dotfile matching behaviour differs from `fast-glob`Forse già presa @MFA-G l’ha presa 42 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
SuperchupuDev/tinyglobby#187 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
SuperchupuDev/tinyglobby#186 · 3 commenti ·
-
Setting `onlyDirectories` to `true` results in a returned value with an additional trailing slash.Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
SuperchupuDev/tinyglobby#185 ·
-
upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
SuperchupuDev/tinyglobby#182 · 2 commenti · 2 reazioni ·
Tutte le issue di SuperchupuDev/tinyglobby
Issue simili
-
area:ui effort:S enhancement priority:P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
QuantumNous/new-api#7839 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue maintenance
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
dark-princezz/stellar-hooks#1010 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
interledger/rhyza#352 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno