[p5.js 2.0+ Bug Report]: FES omits parameter position for any parameter after the first
Los mantenedores suelen responder en 2 días
@Shruti2110-coder ya está trabajando en esto.
Desde el 8/9/2026.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript
Línea de trabajo
Comienza con src/friendly_errors/fes.js:134 y las ramas invalid_type y custom de param_validator.js en las líneas 539 y 553. Ejecuta el comando de Vitest indicado para reproducir los ordinales faltantes y, a continuación, verifica que los parámetros posteriores reciban la posición localizada adecuada y que los mensajes de validación afectados estén cubiertos por pruebas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- WebGPU
- p5.strands
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
p5.js version
current main (2.x dev)
Web browser and version
Chrome for Testing (Chromium, via Vitest browser runner)
Operating system
macOS
Steps to reproduce this
Any function whose parameter validation fails on the second or later
parameter produces a message with the position word missing and a doubled
space:
Expected string at the parameter in loadModel().
Failures on the first parameter are correct:
Expected Color at the first parameter in background().
Reproduction
npx vitest run test/unit/visual/cases/webgl.js 2>&1 | grep "Expected"
Eight instances from loadModel(), all missing the ordinal, alongside a
correct background() message in the same run.
Cause
src/friendly_errors/fes.js:134 holds a single-entry lookup:
ordinals: [TL.tl`first`],
param_validator.js reads it in the invalid_type (line 539) and custom
(line 553) branches:
const position = FES.premade.ordinals[currentError.path.join('.')];
Any Zod error path other than [0] returns undefined. Line 542 interpolates
it with no guard, so undefined renders as an empty string between two
spaces.
Confirmed by adding a temporary log in the invalid_type branch:
PATH: [1] ORDINAL: undefined (loadModel — broken)
PATH: [0] ORDINAL: first (texture — correct)
Origin
Commit f5b75951b ("Work in progress proof of concept FES revamp using new
translation utility", Apr 2026) introduced FES.premade.ordinals with the
single placeholder entry and pointed these two branches at it.
param_validator.js:107 still holds the complete list — 'first' through
'tenth' — from the earlier implementation, but only buildTypeMismatchMessage
uses it. So the file has two ordinal lists and the branches that matter use
the incomplete one.
Related prior work: #4626 / PR #4629 added localised ordinals in v1.1.3. The
proposal there was "a list of ordinal full forms (first, second, third, ...)
for numbers 1 to 10 for all languages in the translation files", which is
presumably what FES.premade.ordinals was intended to become.
Scope
Affects every p5 function whose validation fails after the first parameter,
not just loadModel.
I'd like to work on this if approved, but since the fix touches translation
strings I'd want a steward's view on the right approach first.
Node v22.22.2, Vitest 4.1.10.
- Lenguaje dominante
- JavaScript
- Estrellas
- 24.1k
- Forks
- 3.9k
- Merge medio
- 3 d 10 h
- PR fusionados (30 d)
- 30
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de processing/p5.js
-
[p5.js 2.0+ Bug Report]: SVG importer does not respect preserveAspectRatio="none" for <symbol>/<use>Posiblemente ocupada @Danyccsf la tomó hace 3 días. AbiertoArea:Core p5.js 2.0+
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
processing/p5.js#9257 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
Add unit tests for noiseDetail()Posiblemente ocupada @Pcmhacker-piro la tomó hace 4 días. AbiertoArea:Math Enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
processing/p5.js#9253 ·
Los mantenedores suelen responder en 2 días
-
[p5.js 2.0+ Bug Report]: storeItem() validation branches are missing `return`, so bad input throws a TypeError or is stored anywayPosiblemente ocupada @iUjjwalRaj la tomó hace 5 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
processing/p5.js#9242 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
processing/p5.js#9241 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[p5.js 2.0+ Bug Report]: Typo in Spanish reference documentation for ellipseMode()Quizá libre de nuevo @cgutierrezval la tomó hace 8 días y no hay ningún pull request abierto. AbiertoInternationalization p5.js 2.0+
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
processing/p5.js#9231 · 3 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de processing/p5.js
Issues similares
-
[dsh-plugin.org | dsh-plugin-hub] plugin distribution incomplete: yjh051108/dsh-routing-suiteAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 71/100
yjh051108/dsh-routing-suite#227 ·
-
needs-triage release-watch
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dusk-network/exu#17 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
jspreadsheet/ce#1809 ·
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
githubnext/gh-aw-workshop#4458 ·
Los mantenedores suelen responder en 1 día