From ae59c994a4d20c99f1890cbde6eda54ad9509222 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Tue, 21 Jul 2026 10:53:05 -0300 Subject: [PATCH] chore: type shim for csv-parse/lib/sync (TS7 compat) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Meteor bundler resolves npm requires by physical path and doesn't support package exports subpaths — switching the imports to 'csv-parse/sync' crashes the production bundle at boot (MODULE_NOT_FOUND). Keep the runtime specifier 'csv-parse/lib/sync' and bridge only the types: an ambient declaration re-exporting from the exports-declared 'csv-parse/sync' entry, which TS7's resolution accepts. Verified on TS5 and TS7; zero runtime changes. --- apps/meteor/definition/externals/csv-parse.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 apps/meteor/definition/externals/csv-parse.d.ts diff --git a/apps/meteor/definition/externals/csv-parse.d.ts b/apps/meteor/definition/externals/csv-parse.d.ts new file mode 100644 index 0000000000000..9efe517ebf5c5 --- /dev/null +++ b/apps/meteor/definition/externals/csv-parse.d.ts @@ -0,0 +1,8 @@ +// The Meteor bundler resolves npm requires by physical path and doesn't support +// package `exports` subpaths, so runtime code must keep importing the real file +// 'csv-parse/lib/sync'. That path isn't in csv-parse's exports map, which newer +// TypeScript resolution modes enforce — bridge the types to the exports-declared +// entry point. +declare module 'csv-parse/lib/sync' { + export * from 'csv-parse/sync'; +}