Commit graph

52 commits

Author SHA1 Message Date
db656c2310 chore: enable NPM provenance 2024-02-05 15:08:47 +01:00
github-actions[bot]
ff89dd4f86 chore(release): version packages 2024-02-05 14:54:05 +01:00
github-actions[bot]
bddb2d6b14 chore(release): version packages 2024-01-22 11:32:48 +01:00
github-actions[bot]
59eb90b8cb chore(release): version packages 2023-12-20 11:24:17 +01:00
github-actions[bot]
e8e35215be chore(release): version packages 2023-12-19 14:51:40 +01:00
github-actions[bot]
e67ce0de1e chore(release): version packages 2023-12-19 14:41:04 +01:00
3a8b06b3b1 fix: revert usage of bun key in package.json exports 2023-12-19 14:29:42 +01:00
github-actions[bot]
747f9dbddb chore(release): version packages 2023-12-19 14:09:15 +01:00
ce6946cac4 feat: support for Bun 2023-12-19 14:06:00 +01:00
987374dbd5
chore(release): version packages (#43)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-15 14:43:10 +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
480796e95b
chore(release): version packages (#36)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-14 13:29:02 +01:00
bad4e252f3
feat(reporters): pass the CLI's version number to reporters (#38) 2023-12-14 13:11:55 +01:00
af360ca6a4
chore(release): version packages (#31)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-12 16:06:44 +01:00
8cc43a8f83 refactor(cli): introduce the migration-runner helper for less code duplication and fewer return paths
Thanks to the migration-runner the "up" and "list" commands are now very similar code wise
2023-12-12 15:47:37 +01:00
a79f8e8e37 feat(plugin-tools): improve error serialization and let each storage plugin serialize errors themselves 2023-12-12 15:32:58 +01:00
8f7f9a71d0 chore(deps): upgrade import-from-esm 2023-12-08 13:14:56 +01:00
3db7e995d7
chore(release): version packages (#30)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-08 13:10:41 +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
c1d55978d7 feat(up): serialize errors before passing them to storage plugins 2023-12-08 13:01:45 +01:00
3b2b21f729
chore(release): version packages (#28)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-08 11:14:45 +01:00
d916043061 fix(plugin-tools): load plugins correctly when specified as strings 2023-12-07 14:34:47 +01:00
20ed2e8a50 fix(plugin-tools): prioritize prefixed plugin names over non-prefixed names when importing plugins
This is to not accidentally importing for instance the "pino" package if reporter is set to just "pino" and instead import the "@emigrate/reporter-pino" package if that's the case.
2023-12-07 14:33:01 +01:00
871fb47aac
chore(release): version packages (#19)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-24 16:04:55 +01:00
672fae1729 feat(plugins): include "@emigrate/" in the plugin search prefix list 2023-11-24 16:01:45 +01:00
acb0b4f195 fix(new): keep upper cased letters in migration file names by default 2023-11-24 15:55:32 +01:00
d8a6a2428a feat(remove): implement the "remove" command for removing migrations from the history 2023-11-24 15:45:17 +01:00
60ae3b8c82 fix(plugin-tools): load lazy plugins with default exports correctly 2023-11-22 15:35:30 +01:00
53cdb23237 feat(cli): implement the "list" command for listing migration history and pending migrations 2023-11-22 14:35:37 +01:00
5e8572b67f feat(plugin-tools): pass the current command to the reporter 2023-11-22 14:35:35 +01:00
8e87ade5c0 feat(cli): storage and reporter are now their own options
Instead of mixing storages and reporters with other plugins in the plugin option they now have their own separate options.
This is for increased future flexibility and to be more similar to other CLI tools.

BREAKING CHANGE: the storage to use must now be specified using the "storage" configuration option or the "--storage" CLI option instead of having it among other plugins.
2023-11-22 14:35:35 +01:00
5b00fd4fdb chore(lint): configure project wide linting to make use of Turborepo again
Don't know why I didn't get this to work before with the cwd workaround...
2023-11-17 14:20:06 +01:00
a51192f730
chore(release): version packages (#13)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-17 12:58:19 +01:00
59ec16b87b feat(cli): improve "up" command output and flow a lot 2023-11-17 12:50:35 +01:00
8f35812fed feat(cli): add support for "reporter" plugins and include a default reporter 2023-11-17 12:50:33 +01:00
b61072a3b6
chore(release): version packages (#12)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-16 12:59:28 +01:00
62bd5a45e5 feat(plugin-tools): add more properties to the MigrationMetadata type 2023-11-16 10:54:34 +01:00
1799b6e399 fix(plugin-tools): add missing types and utils for the "loader" plugins 2023-11-16 10:53:09 +01:00
23a323c675 feat(plugin-tools): add convenience functions getOrLoadPlugin and getOrLoadPlugins 2023-11-15 16:02:57 +01:00
81fde2ebd3 feat(plugin-tools): add types for "loader" plugins 2023-11-15 16:00:21 +01:00
0b78d5cf32 refactor(cli): rename the emigrate package to @emigrate/cli to be more in line with other tools 2023-11-15 14:42:10 +01:00
9f5abf727d refactor: simplify plugin interfaces by getting rid of the "type" property
This is to prepare for having packages that contains multiple different plugins in the same file.
2023-11-15 14:11:06 +01:00
3e0ff07a64 chore: specify which files to include in published packages 2023-11-15 13:54:06 +01:00
github-actions[bot]
72df2385a0
chore(release): version packages (#11)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-15 12:25:48 +01:00
50fce0a5ed chore: add some basic README files 2023-11-15 10:32:47 +01:00
e159cd17bd test(plugin-tools): add some tests for the sanitizeMigrationName function 2023-11-10 14:49:27 +01:00
4e2a27ffeb fix(plugin-tools): trim leading underscores from filenames 2023-11-10 14:47:44 +01:00
23d390e602 chore: configure Volta correctly for a monorepo 2023-11-10 14:46:51 +01:00
9880778650 chore(release): bump versions 2023-11-10 10:55:42 +01:00
9c239e0ae5 feat(plugins): automatically prefix plugins when loading if necessary
I.e. when specifying only "--plugin generate-js" Emigrate will load the @emigrate/plugin-generate-js plugin.
2023-11-10 10:45:15 +01:00