Skip to content

Feat: export migrate method#21

Merged
AxiosLeo merged 6 commits into
mainfrom
feat/export-migrate-method
Feb 6, 2026
Merged

Feat: export migrate method#21
AxiosLeo merged 6 commits into
mainfrom
feat/export-migrate-method

Conversation

@AxiosLeo

@AxiosLeo AxiosLeo commented Feb 6, 2026

Copy link
Copy Markdown
Owner

Note

Medium Risk
Touches migration execution and error handling (replacing process.exit with thrown errors), which can change failure behavior for automation/CI and consumers relying on prior exit semantics.

Overview
Exports a new programmatic migrate(action, dir, options) API from index.js (typed in index.d.ts) so consumers can run DB migrations without invoking the CLI.

Refactors commands/migrate.js to call the exported migrate function, normalizes action to lowercase, adjusts port parsing defaults, and simplifies error reporting.

Updates migration failure handling in src/migration.js to throw errors instead of calling process.exit, and adds workspace/build config (build script, pnpm-workspace.yaml) plus devDependency cleanup.

Written by Cursor Bugbot for commit 5b3457c. This will update automatically on new commits. Configure here.

…s with improved options and refactor migration command to utilize new utility
…ed migration function clarity and documentation
Comment thread index.js Outdated
Comment thread index.d.ts
Comment thread index.js Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread index.js
@AxiosLeo AxiosLeo merged commit bca5390 into main Feb 6, 2026
13 checks passed
@AxiosLeo AxiosLeo deleted the feat/export-migrate-method branch February 6, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant