You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Post-merge fix-ups for drizzle-kit local verification
Production changes
- validations/common.ts: pre-merge import path lost its src/ alias; switch back to relative ../../utils/schemaValidator so jiti resolves at test time.
- utils-node.ts loadModule: jiti.import branch was missing the mod.default ?? mod unwrap that the Bun/Deno and ESM branches both perform. Without it drizzleConfigFromFile receives a namespace object with default-forwarding proxy fields that zod's safeParse drops, so config.schema / config.sql / config.tablesFilter become undefined and the prepare* helpers throw RequiredParamsCliError on otherwise valid configs.
- commands/utils.ts prepareExportConfig: take sql from the CLI options first, then from the config file, then default true; previously the CLI --sql=false flag was ignored when the rest of the command came from a config file. Also re-export the CheckConfig type the dispatch needs.
Test adaptations
- 8 cli-*.test.ts files: replaced vi.spyOn(console, 'log') + 'process.exit unexpectedly called with "1"' assertions with res.error.message checks built from the same error() / wrapParam() helpers the runtime uses, so the captured CliError message matches byte-for-byte (including ANSI). Three GenerateConfig / push expected fixtures gained the missing explain + hints fields. cli-check.test.ts, cli-pull.test.ts, cli-studio.test.ts now self-set TEST_CONFIG_PATH_PREFIX so they work under test:other (which doesn't set it).
- conformance-live-db.test.ts push mysql describe gained a beforeAll that drops every table in the active mysql database. Without it, leftover tables from earlier mysql test files in the same run made the diff engine treat new tables as rename_or_create candidates and emit missing_hints instead of the expected ok / no_changes envelopes.
0 commit comments