Commit graph

12 commits

Author SHA1 Message Date
d779286084 chore(deps): upgrade TypeScript to v5.5 and enable isolatedDeclarations 2024-06-27 15:38:50 +02:00
1f139fd975 feat(remove): rework the "remove" command to be more similar to "up" and "list"
The old reporter methods related to the "remove" command is not used anymore and instead the shared `onMigrationStart`, `onMigrationSuccess` and `onMigrationError` methods are used.
Some preparation has also been made to support for removing multiple migrations at once in the future, similar to how the `--from` and `--to` CLI options work for the "up" command.
2024-01-26 16:09:49 +01:00
f2d4bb346e fix(cli): make sure errors passed to the storage are serialized correctly 2024-01-26 16:09:49 +01:00
a4da353d5a feat(cli): add graceful process abort
Using an AbortSignal and Promise.race we abandon running migrations that take longer to complete after the process is aborted than the given abortRespite period
2024-01-22 11:30:06 +01:00
cae6d11d53
feat(types): move Emigrate types to separate package and improve types (#41)
* feat(types): move Emigrate types to separate package

Also refactor the types to use discriminating unions for easier error handling and such.
Errors passed to storage plugins should now be serialized and storage plugins are expected to return already serialized errors on failed history entries.

* fix(mysql): handle the new type changes

* fix(storage-fs): handle the new type changes

* feat(cli): better error handling and types

Adapt to the new types from the @emigrate/types package, like discriminating union types and serializing and deserializing errors
2023-12-15 13:03:35 +01:00
bc33e63e3e feat(reporter-default): improve error logging by logging all own properties of the errors 2023-12-12 15:36:30 +01:00
703e6f028a feat(storage): add "end" method to storage for cleaning up resources when commands are finished 2023-12-08 13:01:46 +01:00
a8db22680e feat(up): handle storage initialization errors and present missing loader errors in a better way 2023-12-08 13:01:45 +01:00
d8a6a2428a feat(remove): implement the "remove" command for removing migrations from the history 2023-11-24 15:45:17 +01:00
c68c6f0490 feat(cli): include Emigrate error codes in error names 2023-11-22 15:34:05 +01:00
53cdb23237 feat(cli): implement the "list" command for listing migration history and pending migrations 2023-11-22 14:35:37 +01:00
30a448b4cf feat(cli): improve error handling with more custom Error instances 2023-11-16 12:01:32 +01:00