Skip to content

Commit 65e214b

Browse files
fix: Correctly mark Astro.glob as deprecated (#14866)
Co-authored-by: Florian Lefebvre <[email protected]>
1 parent 3897b9e commit 65e214b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Fixes `Astro.glob` to be correctly marked as deprecated

packages/astro/src/types/public/context.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,22 @@ export interface AstroGlobalPartial {
217217
* ```
218218
*
219219
* [Astro reference](https://docs.astro.build/en/reference/api-reference/#astroglob)
220-
* @deprecated Astro.glob is deprecated and will be removed in the next major version of Astro. Use `import.meta.glob` instead: https://vitejs.dev/guide/features.html#glob-import
220+
* @deprecated `Astro.glob` is deprecated and will be removed in the next major version of Astro. Use `import.meta.glob` instead: https://vitejs.dev/guide/features.html#glob-import
221221
*/
222222
glob(globStr: `${any}.astro`): Promise<AstroInstance[]>;
223+
/**
224+
* @deprecated `Astro.glob` is deprecated and will be removed in the next major version of Astro. Use `import.meta.glob` instead: https://vitejs.dev/guide/features.html#glob-import
225+
*/
223226
glob<T extends Record<string, any>>(
224227
globStr: `${any}${MarkdownFileExtension}`,
225228
): Promise<MarkdownInstance<T>[]>;
229+
/**
230+
* @deprecated `Astro.glob` is deprecated and will be removed in the next major version of Astro. Use `import.meta.glob` instead: https://vitejs.dev/guide/features.html#glob-import
231+
*/
226232
glob<T extends Record<string, any>>(globStr: `${any}.mdx`): Promise<MDXInstance<T>[]>;
233+
/**
234+
* @deprecated `Astro.glob` is deprecated and will be removed in the next major version of Astro. Use `import.meta.glob` instead: https://vitejs.dev/guide/features.html#glob-import
235+
*/
227236
glob<T extends Record<string, any>>(globStr: string): Promise<T[]>;
228237
/**
229238
* Returns a [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) object built from the [site](https://docs.astro.build/en/reference/configuration-reference/#site) config option

0 commit comments

Comments
 (0)