Skip to content

Releases: aboviq/emigrate

Release 2025-11-20T10:37:44.421Z

20 Nov 10:37

Choose a tag to compare

@emigrate/cli@1.0.0

Major Changes

  • 4e181d9: Remove the directory property from the ReporterInitParameters. This is to make it easier to adapt Emigrate to do migrations that are not file based. It also makes Emigrate more flexible in case future versions will allow running migrations from different locations at the same time.
  • a9cd349: With the introduction of the new "prefix" option the short CLI option alias for the "--extension" option has been renamed from "-x" to "-e", and the new "--prefix" CLI option now has "-x" as its alias.
  • 768a752: The "new" command is now smarter and more beginner friendly and have overall better UX by prompting for information about the migration file to create, like its name, file extension and template. In non-interactive mode, i.e. where Emigrate can't prompt, it will now fail instead of creating an empty migration file when not all information is provided, unless the --yes/-y CLI flag is provided that is. So for users using Emigrate's "new" command in non-interactive mode this is a breaking change.
  • d49da0c: Generator plugins are no more. Template plugins is the new thing. A generator plugin was responsible both for generating the contents of new migration files and their filenames, a template plugin only generates the contents of new files. A template plugin can provide multiple templates where each template have a corresponding file extension. Multiple template plugins can have templates with the same extension and in a coming change the user will be able to chose which template to use when that's the case. This new type of plugin opens up new potential use cases like automatically generating migration files based on diffing two database schemas for instance. A template plugin can provide templates as either strings, or sync or async functions returning strings.
  • 5175beb: Use styleText from the native node:util instead of 3rd party modules for CLI colors. With this the minimum NodeJS version for Emigrate has been bumped to v22.
  • dafde8c: Remove the "reporter" option from the "new" command. It now has its own custom default reporter. This makes more sense as you usually don't want to change the reporter for the "new" command, but only for the other commands (e.g. to the "pino" reporter in a production environment). With this change the "EmigrateConfig" type has been changed to reflect this, so that the "new" command has a different type than the other commands.

Minor Changes

  • a9cd349: Add support for a "prefix" option. With the prefix option it's possible to customize the prefix of new migration files. Emigrate comes with a set of built-in prefixes and it can also be customized using any function as the prefix option in the configuration file.
  • f70dd70: Specify a description for each migration template and sort them in priority order
  • a9cd349: Add support for a "joiner" option. The specified joiner is used as a separator between the migration file's prefix and its name, and it is also used as a replacement for illegal filename characters if any. The default joiner is "_".
  • d49da0c: Loader plugins are now allowed to return undefined to signal to Emigrate to skip to the next loader plugin. This way multiple loader plugins are able to load migration files with the same file extension and it is up to the loader plugins themselves to figure out if they are able to load a certain migration file or not.

Patch Changes

  • d49da0c: The built-in JavaScript and TypeScript migration file loader plugin now avoids anonymous functions for easier debugging
  • b270555: Prioritize plugins provided via CLI flags over those in the config file
  • Updated dependencies [c3c4fb2]
  • Updated dependencies [4e181d9]
  • Updated dependencies [db6c356]
  • Updated dependencies [d49da0c]
  • Updated dependencies [d49da0c]
  • Updated dependencies [d49da0c]
  • Updated dependencies [a9cd349]
    • @emigrate/plugin-tools@1.0.0
    • @emigrate/types@1.0.0

@emigrate/mysql@1.0.0

Major Changes

  • d49da0c: Generator plugins are no more. Template plugins is the new thing. A generator plugin was responsible both for generating the contents of new migration files and their filenames, a template plugin only generates the contents of new files. A template plugin can provide multiple templates where each template have a corresponding file extension. Multiple template plugins can have templates with the same extension and in a coming change the user will be able to chose which template to use when that's the case. This new type of plugin opens up new potential use cases like automatically generating migration files based on diffing two database schemas for instance. A template plugin can provide templates as either strings, or sync or async functions returning strings.

Minor Changes

  • f70dd70: Specify a description for each migration template and sort them in priority order

Patch Changes

  • Updated dependencies [4e181d9]
  • Updated dependencies [d49da0c]
    • @emigrate/types@1.0.0

@emigrate/plugin-tools@1.0.0

Major Changes

  • db6c356: Remove the sanitizeMigrationName utility from the plugin-tools. It's now part of the core of Emigrate
  • d49da0c: Generator plugins are no more. Template plugins is the new thing. A generator plugin was responsible both for generating the contents of new migration files and their filenames, a template plugin only generates the contents of new files. A template plugin can provide multiple templates where each template have a corresponding file extension. Multiple template plugins can have templates with the same extension and in a coming change the user will be able to chose which template to use when that's the case. This new type of plugin opens up new potential use cases like automatically generating migration files based on diffing two database schemas for instance. A template plugin can provide templates as either strings, or sync or async functions returning strings.
  • d49da0c: The plugin utility functions getOrLoadPlugins and getOrLoad no longer reverses the input array. This makes it easier to reason about the loading order as the first specified plugin has the highest priority and any default plugin should always be put last in the array.
  • a9cd349: The prefix generation is now part of Emigrate's core (i.e. the @emigrate/cli package). Because of this the getTimestampPrefix is no longer part of @emigrate/plugin-tools

Minor Changes

  • c3c4fb2: Add getOrLoadPluginsWithNames utility function for better traceability when loading plugins
  • d49da0c: Loader plugins are now allowed to return undefined to signal to Emigrate to skip to the next loader plugin. This way multiple loader plugins are able to load migration files with the same file extension and it is up to the loader plugins themselves to figure out if they are able to load a certain migration file or not.

Patch Changes

  • Updated dependencies [4e181d9]
  • Updated dependencies [d49da0c]
    • @emigrate/types@1.0.0

@emigrate/postgres@1.0.0

Major Changes

  • d49da0c: Generator plugins are no more. Template plugins is the new thing. A generator plugin was responsible both for generating the contents of new migration files and their filenames, a template plugin only generates the contents of new files. A template plugin can provide multiple templates where each template have a corresponding file extension. Multiple template plugins can have templates with the same extension and in a coming change the user will be able to chose which template to use when that's the case. This new type of plugin opens up new potential use cases like automatically generating migration files based on diffing two database schemas for instance. A template plugin can provide templates as either strings, or sync or async functions returning strings.

Minor Changes

  • f70dd70: Specify a description for each migration template and sort them in priority order
  • d49da0c: @emigrate/postgres is now able to both generate and load migration files written in JavaScript or TypeScript. The package exports a type that is used in JS and TS migration files generated by its template plugin, and the loader plugin then figures out if a migration file can be loaded by the plugin by looking for "@emigrate/postgres" inside such migration files. A JavaScript or TypeScript migration generated by the template plugin accepts a single function parameter which is the sql tagged template literal from a connection pool created by the postgres package. @emigrate/postgres automatically handles closing/releasing of the database connections.

Patch Changes

  • Updated dependencies [4e181d9]
  • Updated dependencies [d49da0c]
    • @emigrate/types@1.0.0

@emigrate/reporter-pino@0.6.6

Patch Changes

  • Updated dependencies [4e181d9]
  • Updated dependencies [d49da0c]
    • @emigrate/types@1.0.0

@emigrate/storage-fs@0.4.8

Patch Changes

  • Updated dependencies [4e181d9]
  • Updated dependencies [d49da0c]
    • @emigrate/types@1.0.0

@emigrate/types@1.0.0

Major Changes

  • 4e181d9: Remove the directory property from the ReporterInitParameters. This is to make it easier to adapt Emigrate to do migrations that are not file based. It also makes Emigrate more flexible in case future versions will allow running migrations from different locations at the same time.
  • d49da0c: Generator plugins are no more. Template plugins is the new thing. A generator plugin was responsible both for generating the contents of new migration files and their filenames, a template plugin only generates the contents of new files. A template plugin can provide multiple templates where each template have a corresponding file extension. Multiple template plugins can have templates with the same extension and in a coming change the user will be able to chose which template to use when that's the case. This new ty...
Read more

Release 2025-04-24T14:07:35.591Z

24 Apr 14:07

Choose a tag to compare

@emigrate/cli@0.18.4

Patch Changes

@emigrate/mysql@0.3.3

Patch Changes

  • 26240f4: Make sure we can initialize multiple running instances of Emigrate using @emigrate/mysql concurrently without issues with creating the history table (for instance in a Kubernetes environment and/or with a Percona cluster).
  • d779286: Upgrade TypeScript to v5.5 and enable isolatedDeclarations
  • 26240f4: Either lock all or none of the migrations to run to make sure they run in order when multiple instances of Emigrate runs concurrently (for instance in a Kubernetes environment)
  • Updated dependencies [d779286]
    • @emigrate/plugin-tools@0.9.8
    • @emigrate/types@0.12.2

@emigrate/plugin-generate-js@0.3.8

Patch Changes

  • Updated dependencies [d779286]
    • @emigrate/plugin-tools@0.9.8
    • @emigrate/types@0.12.2

@emigrate/plugin-tools@0.9.8

Patch Changes

@emigrate/postgres@0.3.2

Patch Changes

@emigrate/reporter-pino@0.6.5

Patch Changes

@emigrate/tsconfig@1.0.3

Patch Changes

@emigrate/mysql@0.3.2

25 Jun 07:22

Choose a tag to compare

Patch Changes

  • 57498db: Unreference all connections when run using Bun, to not keep the process open unnecessarily long

@emigrate/types@0.12.2

30 May 08:17

Choose a tag to compare

Patch Changes

  • ca154fa: Minimize package size by excluding *.tsbuildinfo files

@emigrate/storage-fs@0.4.7

30 May 08:17

Choose a tag to compare

Patch Changes

  • ca154fa: Minimize package size by excluding *.tsbuildinfo files
  • Updated dependencies [ca154fa]
    • @emigrate/types@0.12.2

@emigrate/reporter-pino@0.6.4

30 May 08:17

Choose a tag to compare

Patch Changes

  • ca154fa: Minimize package size by excluding *.tsbuildinfo files
  • Updated dependencies [ca154fa]
    • @emigrate/types@0.12.2

@emigrate/postgres@0.3.1

30 May 08:17

Choose a tag to compare

Patch Changes

  • ca154fa: Minimize package size by excluding *.tsbuildinfo files
  • Updated dependencies [ca154fa]
    • @emigrate/plugin-tools@0.9.7
    • @emigrate/types@0.12.2

@emigrate/plugin-tools@0.9.7

30 May 08:17

Choose a tag to compare

Patch Changes

  • ca154fa: Minimize package size by excluding *.tsbuildinfo files
  • Updated dependencies [ca154fa]
    • @emigrate/types@0.12.2

@emigrate/plugin-generate-js@0.3.7

30 May 08:17

Choose a tag to compare

Patch Changes

  • Updated dependencies [ca154fa]
    • @emigrate/plugin-tools@0.9.7
    • @emigrate/types@0.12.2

@emigrate/mysql@0.3.1

30 May 08:17

Choose a tag to compare

Patch Changes

  • ca154fa: Minimize package size by excluding *.tsbuildinfo files
  • Updated dependencies [ca154fa]
    • @emigrate/plugin-tools@0.9.7
    • @emigrate/types@0.12.2