Features get added and removed, and breaking changes are introduced! This documents how to migrate.
0.11.0
defineIntegrationsetup return type updated
Previously the return of the setup function passed to defineIntegration was the Astro hooks defined by the integration, and would be set as the hooks property in the final integration object.
Now, the expected return of setup is the properties of the integration object itself:
0.10.0
watchIntegration renamed to watchDirectory
Since watchIntegration is not recommended for dev HMR anymore, it has been renamed according to what it
really does, watching a directory:
0.9.0
New withPlugins utility, plugins removed from defineIntegration
Plugins are no longer passed to defineIntegration. Instead, there’s a new withPlugins utility.
New Plugin signature (and definePlugin)
You should not use the Plugin type manually but if you do, you’ll need to update it:
The definePlugin signature has been updated as well:
0.8.0
Removed plugins
The following plugins have been removed in favor of their standalone utility version:
addDevToolbarFrameworkAppPlugin
addDtsPlugin
addIntegrationPlugin
addVirtualImportsPlugin
addVitePluginPlugin
hasIntegrationPlugin
injectDevRoutePlugin
watchIntegrationPlugin
Only hasVitePluginPlugin remains.
corePlugins removed
corePlugins is no longer exported from astro-integration-kit. Import the plugin you want directly:
Updated utilities
addDevToolbarFrameworkApp
addDts
addIntegration
addVirtualImports
addVitePlugin
hasVitePlugin
hasIntegration
injectDevRoute
watchIntegration
0.7.0
Updated options and optionsSchema
They’re not optional by default, you need to manually add .optional() at the end of your zod schema.
If it’s optional, users can still pass nothing or undefined.
Plugins types
Plugin generics have been simplified, allowing simpler plugin builds. This should be non-breaking for plugin
relying on type inference, plugins with explicitly declared signature should update the following:
0.6.0
Updated addVitePlugin
The addVitePlugin utility now requires a config and logger parameter to log warnings for duplicate plugins
Or you can turn off warnings for duplicate plugins using warnDuplicate: false
Updated addVirtualImports
The addVirtualImports utility now requires a config parameter
Updated addDevToolbarFrameworkApp
The addDevToolbarFrameworkApp utility now requires a config parameter
0.5.0
Updated addVirtualImport
addVirtualImport was removed in 0.5.0. Here is how to migrate: