Files
worldmonitor/scripts/backfill-fuel-prices-prev.mjs
Elie Habib 9a0f265db3 chore(scripts): replace xlsx with exceljs (#2575)
* chore(scripts): replace xlsx with exceljs

xlsx has known vulnerabilities with no patched version available.
exceljs is actively maintained (~6M weekly downloads) and covers
the same read-only parsing needs in seed-fuel-prices.mjs and
backfill-fuel-prices-prev.mjs.

* fix(scripts): handle ExcelJS Date cells and add Czechia mapping

ExcelJS returns Date objects for date cells (unlike xlsx which returned
raw strings). Convert to DD/MM/YYYY format to preserve downstream regex
parsing. Also add 'Czechia' alias to EU country map since the EU XLSX
now uses the short form instead of 'Czech Republic' (27/27 countries).

* fix(scripts): handle ExcelJS rich-text cell values

ExcelJS returns {richText: [{text: '...'}]} for formatted cells.
String() on these produces '[object Object]', breaking header
detection regex. Extract plain text from rich-text arrays.
2026-03-31 13:09:21 +04:00

18 KiB