0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00
astro/.changeset/blue-colts-film.md
Luiz Ferraz 2e70741362
feat: Refactor integration hooks type (#11304)
* feat: Refactor integration hooks type

* Revert formatting changes

* More detailed changelog

* Add changeset for Astro DB

* Apply suggestions from code review

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-07-17 11:58:57 -04:00

713 B

@astrojs/db
minor

Removes the AstroDbIntegration type

Astro integration hooks can now be extended and as such @astrojs/db no longer needs to declare it's own integration type. Using AstroIntegration will have the same type.

If you were using the AstroDbIntegration type, apply this change to your integration code:

- import { defineDbIntegration, type AstroDbIntegration } from '@astrojs/db/utils';
+ import { defineDbIntegration } from '@astrojs/db/utils';
import type { AstroIntegration } from 'astro';

- export default (): AstroDbIntegration => {
+ export default (): AstroIntegration => {
  return defineDbIntegration({
    name: 'your-integration',
    hooks: {},
  });
}