fix(central): no-issue: fix ESM build reference data export regression#10145
fix(central): no-issue: fix ESM build reference data export regression#10145tcaiger wants to merge 2 commits into
Conversation
…export/import works After the build-less switch (#10097) the central server runs xlsx's ESM build directly, which does not bind Node's fs automatically. readFile/writeFile then throw "cannot save file", breaking reference-data export (and disk-backed imports). Call XLSX.set_fs(fs) once at process start, plus in the export writer util for direct/test use. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🦸 Review Hero Summary No issues found. Looks good! |
|
🦸 Review Hero Summary Local fix prompt (copy to your coding agent)Fix these issues identified on the pull request. One commit per issue fixed.
|
The jest-resolved xlsx build auto-binds fs and does not expose set_fs, so the unconditional call threw "set_fs is not a function" at module load and failed the suites. Guard the call so it binds fs on the ESM build (which needs it) and is a no-op elsewhere. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Temporary copy of the xlsx ESM fs-binding fix so reference-data export/import works locally on this branch. The real fix is in its own PR (#10145); drop this commit once that merges to main and reaches this branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
E2E failure report E2E failed for run 21597. The report artifact contains the merged Playwright HTML report with failure videos, screenshots, and traces where available. |
Changes
After the build-less switch (#10097), the central server runs xlsx's ESM build directly. xlsx's ESM build does not bind Node's
fsautomatically, soreadFile/writeFilethrowcannot save file— breaking reference-data export (and any disk-backed import).Fix: call
XLSX.set_fs(fs)once at process start (app/index.js, the universal entrypoint for the server and all subcommands), plus in the export writer util (excelUtils.js) as a safety net for direct/test use. No behaviour change beyond enabling file IO.Reproduced via
GET /api/admin/export/referenceDatareturning a 500 (cannot save file ./export-*.xlsx); fixed after restart.Auto-Deploy
Options
Tests
Review Hero
.github/review-hero/suppressions.yml. Also runs automatically at the end of any auto-fix run.Remember to...