chore: misc cleanup and low-hanging optimizations #9

Merged
jperera merged 1 commit from chore/misc-cleanup into main 2026-04-02 20:38:22 +02:00
Owner

Summary

  • Remove chart.js from package.json dependencies — it's loaded via CDN, not bundled
  • Cache the API response key (ListaEESSPrecio) after first resolution instead of scanning Object.keys() on every fetch call
  • Replace Math.min(...spread) / Math.max(...spread) in chart rendering with reduce() to avoid call stack overflow with large datasets
  • Add missing filterByPostalCodePrefix export (fixes test import error)

Impact

Smaller node_modules, slightly faster API fetches, and robustness against large price datasets.

## Summary - Remove `chart.js` from `package.json` dependencies — it's loaded via CDN, not bundled - Cache the API response key (`ListaEESSPrecio`) after first resolution instead of scanning `Object.keys()` on every fetch call - Replace `Math.min(...spread)` / `Math.max(...spread)` in chart rendering with `reduce()` to avoid call stack overflow with large datasets - Add missing `filterByPostalCodePrefix` export (fixes test import error) ## Impact Smaller `node_modules`, slightly faster API fetches, and robustness against large price datasets.
- Remove chart.js from package.json dependencies (loaded via CDN)
- Cache the API response key after first resolution instead of
  searching Object.keys() on every fetch
- Replace Math.min(...spread)/Math.max(...spread) in chart rendering
  with reduce() to avoid call stack overflow with large datasets
- Add missing filterByPostalCodePrefix export to fix test import
jperera force-pushed chore/misc-cleanup from 3f66bf4339 to cc03adee7e 2026-04-02 20:37:56 +02:00 Compare
jperera force-pushed chore/misc-cleanup from cc03adee7e to b7f0b32530 2026-04-02 20:38:16 +02:00 Compare
jperera deleted branch chore/misc-cleanup 2026-04-02 20:38:22 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jperera/gasolineras!9
No description provided.