generated from florian-lefebvre/astro-integration-template
-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: fix and deprecate addDts (#118)
- Loading branch information
1 parent
38be4e8
commit e2f85b5
Showing
6 changed files
with
96 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
"astro-integration-kit": patch | ||
--- | ||
|
||
Deprecates the `addDts` utility, it will be removed in a future minor release. You can anticipate this change by bumping your Astro peer dependency to ^4.14.0 and using [injectTypes](https://docs.astro.build/en/reference/integrations-reference/#injecttypes-options): | ||
|
||
```diff | ||
"astro:config:setup": (params) => { | ||
- addDts(params, { | ||
- name: "my-integration", | ||
- content: `declare module "virtual:my-integration" {}` | ||
- }) | ||
}, | ||
"astro:config:done": (params) => { | ||
+ params.injectTypes({ | ||
+ filename: "types.d.ts", | ||
+ content: `declare module "virtual:my-integration" {}` | ||
+ }) | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"astro-integration-kit": patch | ||
--- | ||
|
||
Fixes an `addDts` incompatibility with Astro >=4.14.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
/// <reference path="../.astro/types.d.ts" /> | ||
/// <reference types="astro/client" /> | ||
/// <reference types="../.astro/test-format.d.ts" /> | ||
/// <reference types="../.astro/test-integration.d.ts" /> | ||
|
||
/// <reference path='../.astro/types.d.ts' /> | ||
/// <reference types='../.astro/test-format.d.ts' /> | ||
/// <reference types='../.astro/test-integration.d.ts' /> |