Commit graph

155 commits

Author SHA1 Message Date
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
5307e87242 fix(list): don't log info about locked migrations as it doesn't happen in this command 2023-12-12 15:38:24 +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
a79f8e8e37 feat(plugin-tools): improve error serialization and let each storage plugin serialize errors themselves 2023-12-12 15:32:58 +01:00
09181f284d feat(reporter-pino): don't log the full metadata object for each migration 2023-12-12 15:25:22 +01:00
e7288fcbfb test(up): add more tests for the "up" command 2023-12-08 13:47:36 +01:00
8f7f9a71d0 chore(deps): upgrade import-from-esm 2023-12-08 13:14:56 +01:00
bc85211009 chore: remove dependencies from "build:watch" task as it can make the process halt/exit 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
334e2099bb feat(mysql): implement the first version of the MySQL plugin package 2023-12-08 13:01:45 +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
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
3619d86750 feat(reporter-pino): first version of the package 2023-12-07 14:36:30 +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
43a220d633 test(up): start writing some tests for the "up" command 2023-12-07 10:48:02 +01:00
de5fccfa52 chore(deps): remove unused Vitest dependency 2023-12-06 08:40:16 +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
59a013b0d8 refactor(storage-fs): yield one migration entry at a time 2023-11-24 15:47:47 +01:00
d8a6a2428a feat(remove): implement the "remove" command for removing migrations from the history 2023-11-24 15:45:17 +01:00
9447d28ad8 fix(history): don't let different migration directories interfere with each other even though they share storage 2023-11-24 11:10:01 +01:00
cf17e48f25 feat(cli): enable source maps 2023-11-24 10:55:58 +01:00
8347fc1fa4 feat(up): improve error handling and presentation 2023-11-22 15:47:17 +01:00
b57c86eaab fix(up): only load the JavaScript loader plugin if necessary 2023-11-22 15:40:53 +01:00
60ae3b8c82 fix(plugin-tools): load lazy plugins with default exports correctly 2023-11-22 15:35:30 +01:00
c68c6f0490 feat(cli): include Emigrate error codes in error names 2023-11-22 15:34:05 +01:00
570bd1fa2b feat(cli): make the default reporter print the full command output when done
In interactive mode the output is normally clipped to the number of lines that the current terminal window can show without scrolling
so to remedy that the full command output is now printed to the console when done
2023-11-22 14:35:38 +01:00
8f623efd45 feat(cli): ignore letter casing of commands 2023-11-22 14:35:37 +01:00
53cdb23237 feat(cli): implement the "list" command for listing migration history and pending migrations 2023-11-22 14:35:37 +01:00
e79dd4bca9 feat(storage-fs): serialize errors recursively if "cause" is an Error instance 2023-11-22 14:35:37 +01:00
d4d87036df refactor(cli): move commands to a separate folder 2023-11-22 14:35:36 +01:00
4f8fb441f8 refactor(cli): move the default reporter into a separate "reporters" folder 2023-11-22 14:35:35 +01:00
da1eee3c75 feat(cli): add "reporter" option for the "new" command for improved logging 2023-11-22 14:35:35 +01:00
5e8572b67f feat(plugin-tools): pass the current command to the reporter 2023-11-22 14:35:35 +01:00
1940885134 fix(cli): remove the double period before file extension in new migration files 2023-11-22 14:35:35 +01:00
7d8ac9b185 feat(storage-fs): adapt to the new storage option and rename the package 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
dependabot[bot]
509cd41663
chore(deps): bump @types/node from 20.9.0 to 20.9.2 (#16)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.9.0 to 20.9.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-22 09:36:18 +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
d5fe58c0db chore: upgrade commitlint to fix commit message linting 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
e5eec7cdf1 fix(plugin-storage-fs): throw a more descriptive error when a lock couldn't be acquired 2023-11-17 12:50:33 +01:00
552e784fc9 fix(plugin-storage-fs): adapt to the new migration metadata format 2023-11-17 12:50:33 +01:00
8f35812fed feat(cli): add support for "reporter" plugins and include a default reporter 2023-11-17 12:50:33 +01:00