ember-learn / ember-learn/ember-cli-addon-docs

Path searching for type has incorrect regex

Abierto
#292 5 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
172
Forks
142
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza en addon/routes/docs/api/item.js en la línea 21 y sigue cómo se deriva el tipo para components/yeti-table/header/filters/column/input. Reproduce el tipo incorrecto y añade después una prueba de regresión que use una ruta de componente que contenga un directorio terminado en “s” y verifica que se encuentre el módulo correspondiente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
documentation
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.