ember-learn / ember-learn/ember-cli-addon-docs
Path searching for type has incorrect regex
- Vorherrschende Sprache
- JavaScript
- Sterne
- 172
- Forks
- 142
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
The code at https://github.com/ember-learn/ember-cli-addon-docs/blob/master/addon/routes/docs/api/item.js#L21 is looking for a type to use when looking for a matching module. However when I have a path that has a directory ending in "s", it fails to find the correct module because the type is incorrect.
Given the path "components/yeti-table/header/filters/column/input" the type on the line above will be "components/yeti-table/header/filter" when it should be "component". If you use the regex /^(.*?)s\// it will find the correct type
Looks like this was introduced with https://github.com/ember-learn/ember-cli-addon-docs/pull/167
It seems pretty straightforward and I would submit a pull request, except looking at the tests I have no idea where I would supply a test for this. It looks like you might have to create an addon that had component ending in "s" with sub components somewhere in your test apps.
Beitragsleitfaden
Rechercherichtung
Beginne in addon/routes/docs/api/item.js in Zeile 21 und verfolge, wie der Typ für components/yeti-table/header/filters/column/input abgeleitet wird. Reproduziere den fehlerhaften Typ und füge anschließend einen Regressionstest hinzu, der einen Komponentenpfad mit einem Verzeichnis verwendet, das auf „s“ endet, und verifiziere, dass das passende Modul gefunden wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- documentation
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100