From f8de90d1c89d06ad21f183b4224b837128f839d6 Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 21 Nov 2025 22:57:59 +0000 Subject: [PATCH 1/3] fix: fix Astro.glob deprecated mark in overloads When using overloads, each overload has to be marked as deprecated separately, to be correctly identified by editors, such as VS Code --- packages/astro/src/types/public/context.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/astro/src/types/public/context.ts b/packages/astro/src/types/public/context.ts index 0df49543b0dd..1f17f67e06ad 100644 --- a/packages/astro/src/types/public/context.ts +++ b/packages/astro/src/types/public/context.ts @@ -217,13 +217,22 @@ export interface AstroGlobalPartial { * ``` * * [Astro reference](https://docs.astro.build/en/reference/api-reference/#astroglob) - * @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 + * @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 */ glob(globStr: `${any}.astro`): Promise; + /** + * @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 + */ glob>( globStr: `${any}${MarkdownFileExtension}`, ): Promise[]>; + /** + * @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 + */ glob>(globStr: `${any}.mdx`): Promise[]>; + /** + * @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 + */ glob>(globStr: string): Promise; /** * 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 From 36a9b430924c7002650e7af6961ce43bc295e023 Mon Sep 17 00:00:00 2001 From: Roman Date: Sat, 22 Nov 2025 10:32:17 +0000 Subject: [PATCH 2/3] changeset --- .changeset/fix-astro-glob-deprecated.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-astro-glob-deprecated.md diff --git a/.changeset/fix-astro-glob-deprecated.md b/.changeset/fix-astro-glob-deprecated.md new file mode 100644 index 000000000000..7eb1a8096154 --- /dev/null +++ b/.changeset/fix-astro-glob-deprecated.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +fix: Correctly mark `Astro.glob` as deprecated in JSDoc From 18b8b86bc196c060ccbb8e4d962d43ac4436e39f Mon Sep 17 00:00:00 2001 From: Roman Date: Sun, 23 Nov 2025 13:11:07 +0000 Subject: [PATCH 3/3] Update .changeset/fix-astro-glob-deprecated.md Co-authored-by: Florian Lefebvre --- .changeset/fix-astro-glob-deprecated.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/fix-astro-glob-deprecated.md b/.changeset/fix-astro-glob-deprecated.md index 7eb1a8096154..3bc3d2d851ab 100644 --- a/.changeset/fix-astro-glob-deprecated.md +++ b/.changeset/fix-astro-glob-deprecated.md @@ -2,4 +2,4 @@ 'astro': patch --- -fix: Correctly mark `Astro.glob` as deprecated in JSDoc +Fixes `Astro.glob` to be correctly marked as deprecated