[Schematics CLI] Numeric strings in schematics options
- Lenguaje dominante
- TypeScript
- Estrellas
- 27k
- Forks
- 11.8k
- Merge medio
- 14 h 23 min
- PR fusionados (30 d)
- 162
Descripción
### Command
generate
### Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
_No response_
### Description
From http://b/196605664.
Apparently you can't pass in a numeric value into a string argument in schematics. This appears to be interpreted as number and leads to a validation error.
### Minimal Reproduction
```
$ schematics run test --stringValue "1234"
Schematic input does not validate against the Schema: {"stringValue":1234}
Errors:
Data path ".stringValue" should be string.
```
Minimist seems to interpret "1234" as a number instead of a string, and schematics treats that as a type mismatch.
### Exception or Error
_No response_
### Your Environment
```text
See http://b/196605664.
```
### Anything else relevant?
_No response_
Guía de contribución
Línea de trabajo
Comienza por el análisis de opciones del comando generate y el procesamiento de minimist descrito en el informe; después, reproduce el comando con --stringValue "1234". Sigue el punto en el que el valor entre comillas se convierte en un número y verifica que los valores con apariencia numérica pasados a opciones de tipo string lleguen a la validación del esquema como strings.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- cli
- 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