[FEATURE] Configurable output folder

Abierto
#569 4 comentarios 1 reacción 0 asignados Ver en GitHub

@huytdps13400 ya está trabajando en esto.

Desde el 22/8/2026.

  • #592 de @huytdps13400 — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
65/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Comienza con packages/cli/src/constants.ts y packages/measure/src/config.ts; después, sigue cómo se consumen RESULTS_DIRECTORY, RESULTS_FILE, BASELINE_FILE y REASSURE_OUTPUT_FILE. Revisa las pruebas o los puntos de entrada existentes de CLI y measure para comprobar la configuración del entorno. Se considera terminado cuando se pueden configurar carpetas de salida separadas por paquete y ambos comandos conservan el comportamiento predeterminado de .reassure.

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

Descripción

Is your feature request related to a problem? Please describe.

We are configuring reassure in a monorepo containing many packages. We configured it in multiple packages. Each package has its own particularities and jest configuration, meaning they each have their respective reassure command.

We run these commands from the root of our monorepo. The problem is that since there's no way to configure an output folder, each package competes with the same .reassure/ folder at the root, making it difficult to run reassure across packages.

Let's say we change a shared util and want to measure its impact across the monorepo. We can't run the baseline, make the change, and then compare because the files in the .reassure/ folder get overridden after each reassure run in the different packages.

Describe the solution you'd like

Adding an environment variable called REASSURE_OUTPUT_FOLDER that works on the cli command and the measure packages.

The cli change might be as simple as changing a few lines here:

https://github.com/callstack/reassure/blob/672af33b6e7da17735979154bb57d556d73a47a9/packages/cli/src/constants.ts#L1-L3

to something like

 export const RESULTS_DIRECTORY = process.env.REASSURE_OUTPUT_FOLDER || '.reassure'; 
 export const RESULTS_FILE = `${RESULTS_DIRECTORY}/current.perf`; 
 export const BASELINE_FILE = `${RESULTS_DIRECTORY}/baseline.perf`;

For the measure package, it might conflict with the REASSURE_OUTPUT_FILE environment variable, requiring more refactoring.

https://github.com/callstack/reassure/blob/672af33b6e7da17735979154bb57d556d73a47a9/packages/measure/src/config.ts#L18

Describe alternatives you've considered

We could also double down on the REASSURE_OUTPUT_FILE environment variable and make it work with the cli package.

Additional context

Such a configuration would allow us to set up a different output folder per package in our monorepo.


There might already be a way of doing this, but I couldn't find it. Let me know what you think and how I can help. I can even make a pull request if needed.

Lenguaje dominante
TypeScript
Estrellas
1.5k
Forks
39
Merge medio
3 h 48 min
PR fusionados (30 d)
2

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de callstack/reassure

Todos los issues de callstack/reassure

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.