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
This commit is contained in:
parent
afe56594c5
commit
cae6d11d53
38 changed files with 630 additions and 259 deletions
5
.changeset/early-hornets-marry.md
Normal file
5
.changeset/early-hornets-marry.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@emigrate/cli': minor
|
||||
---
|
||||
|
||||
Make Emigrate Error instances deserializable using the serialize-error package, and also switch to its serializeError method
|
||||
5
.changeset/eleven-sheep-think.md
Normal file
5
.changeset/eleven-sheep-think.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@emigrate/cli': patch
|
||||
---
|
||||
|
||||
Shutdown the storage correctly in case of directory or file reading errors
|
||||
5
.changeset/healthy-monkeys-tan.md
Normal file
5
.changeset/healthy-monkeys-tan.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@emigrate/types': minor
|
||||
---
|
||||
|
||||
Use discriminating union types for migration types for easier error handling and such
|
||||
6
.changeset/hip-mayflies-provide.md
Normal file
6
.changeset/hip-mayflies-provide.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
'@emigrate/plugin-tools': minor
|
||||
'@emigrate/types': minor
|
||||
---
|
||||
|
||||
Move the Emigrate plugin types to a separate package for fewer version bumps in plugins hopefully
|
||||
5
.changeset/moody-penguins-repair.md
Normal file
5
.changeset/moody-penguins-repair.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@emigrate/cli': minor
|
||||
---
|
||||
|
||||
Adapt to the new discriminating union types in @emigrate/types
|
||||
5
.changeset/spotty-otters-attack.md
Normal file
5
.changeset/spotty-otters-attack.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@emigrate/types': minor
|
||||
---
|
||||
|
||||
Make it easier for storage plugins by serializing errors passed to the onError method and let it respond with serialized errors in the getHistory method
|
||||
Loading…
Add table
Add a link
Reference in a new issue