From 49704653641065d1c9c5c58aaec95f2e55d55514 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Fri, 17 Jul 2026 18:21:02 -0700 Subject: [PATCH] fix(cli): ship PostgreSQL migrations in the published npm package The files globs (dist/**/*.js, *.d.ts, maps, named dirs) matched no .sql file, so npm pack stripped dist/migrations from every published tarball. npm-installed CLIs crashed schema init (ENOENT dist/migrations/ 0000_initial.sql) and the dashboard supervisor crash-looped on boot. Add dist/migrations/** to files; npm pack --dry-run now lists all 21 migration files. Sibling of the desktop staging fix 6e5bb5d3d. Co-Authored-By: Claude Fable 5 --- .changeset/cli-pg-migrations-in-npm-tarball.md | 7 +++++++ packages/cli/package.json | 1 + 2 files changed, 8 insertions(+) create mode 100644 .changeset/cli-pg-migrations-in-npm-tarball.md diff --git a/.changeset/cli-pg-migrations-in-npm-tarball.md b/.changeset/cli-pg-migrations-in-npm-tarball.md new file mode 100644 index 0000000000..3507139700 --- /dev/null +++ b/.changeset/cli-pg-migrations-in-npm-tarball.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Fix npm-installed CLI crashing at startup because PostgreSQL migrations were missing from the published package. +category: fix +dev: "tsup stages packages/core/src/postgres/migrations into dist/migrations, but the package files globs (dist/**/*.js, *.d.ts, maps, named dirs) matched no .sql file, so npm pack stripped every migration from the tarball. Installed CLIs failed schema init with ENOENT dist/migrations/0000_initial.sql and the dashboard supervisor crash-looped. Added dist/migrations/** to files; npm pack --dry-run now lists all 21 migration files. Sibling of the desktop staging fix 6e5bb5d3d." diff --git a/packages/cli/package.json b/packages/cli/package.json index 5032977bb0..9f4ea172af 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -33,6 +33,7 @@ "dist/**/*.d.ts", "dist/**/*.d.ts.map", "dist/**/*.js.map", + "dist/migrations/**", "dist/client/**", "dist/desktop/**", "dist/pi-claude-cli/**",