From 55a0439e00f57ac219f8f315ab934f98047e36ed Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Tue, 23 May 2023 13:24:16 -0700 Subject: [PATCH 1/4] [ci] release (#7181) Co-authored-by: github-actions[bot] --- .changeset/good-parrots-work.md | 5 ----- .changeset/tiny-phones-reply.md | 7 ------- packages/astro/CHANGELOG.md | 8 ++++++++ packages/astro/package.json | 2 +- packages/integrations/cloudflare/package.json | 2 +- packages/integrations/deno/package.json | 2 +- packages/integrations/image/package.json | 2 +- packages/integrations/markdoc/CHANGELOG.md | 9 +++++++++ packages/integrations/markdoc/package.json | 4 ++-- packages/integrations/mdx/CHANGELOG.md | 6 ++++++ packages/integrations/mdx/package.json | 2 +- packages/integrations/netlify/package.json | 2 +- packages/integrations/node/package.json | 2 +- packages/integrations/svelte/package.json | 2 +- packages/integrations/tailwind/package.json | 2 +- packages/integrations/vercel/package.json | 2 +- packages/integrations/vue/package.json | 2 +- 17 files changed, 36 insertions(+), 25 deletions(-) delete mode 100644 .changeset/good-parrots-work.md delete mode 100644 .changeset/tiny-phones-reply.md diff --git a/.changeset/good-parrots-work.md b/.changeset/good-parrots-work.md deleted file mode 100644 index 7a58bac96..000000000 --- a/.changeset/good-parrots-work.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -fix a bug when Fragment is as a slot diff --git a/.changeset/tiny-phones-reply.md b/.changeset/tiny-phones-reply.md deleted file mode 100644 index c2e237914..000000000 --- a/.changeset/tiny-phones-reply.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@astrojs/markdoc': patch -'@astrojs/mdx': patch -'astro': patch ---- - -Fix: revert Markdoc asset bleed changes. Production build issues were discovered that deserve a different fix. diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index f441601af..9710862db 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,13 @@ # astro +## 2.5.5 + +### Patch Changes + +- [#6832](https://github.com/withastro/astro/pull/6832) [`904131aec`](https://github.com/withastro/astro/commit/904131aec3bacb2824ad60457a45772eba27b5ab) Thanks [@wulinsheng123](https://github.com/wulinsheng123)! - fix a bug when Fragment is as a slot + +- [#7178](https://github.com/withastro/astro/pull/7178) [`57e65d247`](https://github.com/withastro/astro/commit/57e65d247f67de61bcc3a585c2254feb61ed2e74) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix: revert Markdoc asset bleed changes. Production build issues were discovered that deserve a different fix. + ## 2.5.4 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 636328c0d..40020f303 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "2.5.4", + "version": "2.5.5", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json index b5ce85abb..2c298a270 100644 --- a/packages/integrations/cloudflare/package.json +++ b/packages/integrations/cloudflare/package.json @@ -42,7 +42,7 @@ "tiny-glob": "^0.2.9" }, "peerDependencies": { - "astro": "workspace:^2.5.4" + "astro": "workspace:^2.5.5" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/deno/package.json b/packages/integrations/deno/package.json index 1774352cf..fc0402570 100644 --- a/packages/integrations/deno/package.json +++ b/packages/integrations/deno/package.json @@ -36,7 +36,7 @@ "esbuild": "^0.15.18" }, "peerDependencies": { - "astro": "workspace:^2.5.4" + "astro": "workspace:^2.5.5" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/image/package.json b/packages/integrations/image/package.json index e9d7abefd..76fd1b633 100644 --- a/packages/integrations/image/package.json +++ b/packages/integrations/image/package.json @@ -62,7 +62,7 @@ "vite": "^4.3.1" }, "peerDependencies": { - "astro": "workspace:^2.5.4", + "astro": "workspace:^2.5.5", "sharp": ">=0.31.0" }, "peerDependenciesMeta": { diff --git a/packages/integrations/markdoc/CHANGELOG.md b/packages/integrations/markdoc/CHANGELOG.md index ad8b7fb57..d2233ff60 100644 --- a/packages/integrations/markdoc/CHANGELOG.md +++ b/packages/integrations/markdoc/CHANGELOG.md @@ -1,5 +1,14 @@ # @astrojs/markdoc +## 0.2.3 + +### Patch Changes + +- [#7178](https://github.com/withastro/astro/pull/7178) [`57e65d247`](https://github.com/withastro/astro/commit/57e65d247f67de61bcc3a585c2254feb61ed2e74) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix: revert Markdoc asset bleed changes. Production build issues were discovered that deserve a different fix. + +- Updated dependencies [[`904131aec`](https://github.com/withastro/astro/commit/904131aec3bacb2824ad60457a45772eba27b5ab), [`57e65d247`](https://github.com/withastro/astro/commit/57e65d247f67de61bcc3a585c2254feb61ed2e74)]: + - astro@2.5.5 + ## 0.2.2 ### Patch Changes diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index 38a584cc5..f031c8f6c 100644 --- a/packages/integrations/markdoc/package.json +++ b/packages/integrations/markdoc/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/markdoc", "description": "Add support for Markdoc pages in your Astro site", - "version": "0.2.2", + "version": "0.2.3", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -47,7 +47,7 @@ "zod": "^3.17.3" }, "peerDependencies": { - "astro": "workspace:^2.5.4" + "astro": "workspace:^2.5.5" }, "devDependencies": { "@astrojs/markdown-remark": "^2.2.1", diff --git a/packages/integrations/mdx/CHANGELOG.md b/packages/integrations/mdx/CHANGELOG.md index 7f7ff251b..72df6c84b 100644 --- a/packages/integrations/mdx/CHANGELOG.md +++ b/packages/integrations/mdx/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/mdx +## 0.19.4 + +### Patch Changes + +- [#7178](https://github.com/withastro/astro/pull/7178) [`57e65d247`](https://github.com/withastro/astro/commit/57e65d247f67de61bcc3a585c2254feb61ed2e74) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix: revert Markdoc asset bleed changes. Production build issues were discovered that deserve a different fix. + ## 0.19.3 ### Patch Changes diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index a3308dc55..4e06bea89 100644 --- a/packages/integrations/mdx/package.json +++ b/packages/integrations/mdx/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/mdx", "description": "Add support for MDX pages in your Astro site", - "version": "0.19.3", + "version": "0.19.4", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json index 259f20d0f..c2d908812 100644 --- a/packages/integrations/netlify/package.json +++ b/packages/integrations/netlify/package.json @@ -42,7 +42,7 @@ "esbuild": "^0.15.18" }, "peerDependencies": { - "astro": "workspace:^2.5.4" + "astro": "workspace:^2.5.5" }, "devDependencies": { "@netlify/edge-functions": "^2.0.0", diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index f77b2f923..dc06d92d0 100644 --- a/packages/integrations/node/package.json +++ b/packages/integrations/node/package.json @@ -38,7 +38,7 @@ "server-destroy": "^1.0.1" }, "peerDependencies": { - "astro": "workspace:^2.5.4" + "astro": "workspace:^2.5.5" }, "devDependencies": { "@types/send": "^0.17.1", diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index aeea203f4..9c1ff3efa 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -48,7 +48,7 @@ "vite": "^4.3.1" }, "peerDependencies": { - "astro": "workspace:^2.5.4", + "astro": "workspace:^2.5.5", "svelte": "^3.54.0" }, "engines": { diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index 7ba0a1acb..7290a24f0 100644 --- a/packages/integrations/tailwind/package.json +++ b/packages/integrations/tailwind/package.json @@ -44,7 +44,7 @@ "vite": "^4.3.1" }, "peerDependencies": { - "astro": "workspace:^2.5.4", + "astro": "workspace:^2.5.5", "tailwindcss": "^3.0.24" }, "pnpm": { diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index 9c2fc6eb1..56265f199 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -59,7 +59,7 @@ "web-vitals": "^3.1.1" }, "peerDependencies": { - "astro": "workspace:^2.5.4" + "astro": "workspace:^2.5.5" }, "devDependencies": { "@types/set-cookie-parser": "^2.4.2", diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index 790b46fc2..1c077b117 100644 --- a/packages/integrations/vue/package.json +++ b/packages/integrations/vue/package.json @@ -56,7 +56,7 @@ "vue": "^3.2.37" }, "peerDependencies": { - "astro": "workspace:^2.5.4", + "astro": "workspace:^2.5.5", "vue": "^3.2.30" }, "engines": { From 2bda7fb0bce346f7725086980e1648e2636bbefb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barth=C3=A9l=C3=A9my=20Ledoux?= Date: Wed, 24 May 2023 02:10:10 -0500 Subject: [PATCH 2/4] fix: add astro-static-slot to the list of inert tags in astro css (#7189) --- .changeset/static-slot-css.md | 5 +++++ packages/astro/src/runtime/server/scripts.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/static-slot-css.md diff --git a/.changeset/static-slot-css.md b/.changeset/static-slot-css.md new file mode 100644 index 000000000..a3f1c2475 --- /dev/null +++ b/.changeset/static-slot-css.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +fix: add astro-static-slot to the list of inert tags in astro css diff --git a/packages/astro/src/runtime/server/scripts.ts b/packages/astro/src/runtime/server/scripts.ts index b466d1df3..4ba12d1ab 100644 --- a/packages/astro/src/runtime/server/scripts.ts +++ b/packages/astro/src/runtime/server/scripts.ts @@ -1,7 +1,7 @@ import type { SSRResult } from '../../@types/astro'; import islandScript from './astro-island.prebuilt.js'; -const ISLAND_STYLES = ``; +const ISLAND_STYLES = ``; export function determineIfNeedsHydrationScript(result: SSRResult): boolean { if (result._metadata.hasHydrationScript) { From 27c6e01826a6da525f1f811d97784accd1ebbd96 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Wed, 24 May 2023 17:02:04 +0800 Subject: [PATCH 3/4] Remove `@mdx-js/rollup` dependency (#7191) --- .changeset/spotty-glasses-return.md | 5 +++++ packages/integrations/mdx/package.json | 1 - packages/integrations/mdx/src/index.ts | 7 +++---- packages/integrations/mdx/src/plugins.ts | 5 ++--- pnpm-lock.yaml | 19 ------------------- 5 files changed, 10 insertions(+), 27 deletions(-) create mode 100644 .changeset/spotty-glasses-return.md diff --git a/.changeset/spotty-glasses-return.md b/.changeset/spotty-glasses-return.md new file mode 100644 index 000000000..6786f77eb --- /dev/null +++ b/.changeset/spotty-glasses-return.md @@ -0,0 +1,5 @@ +--- +'@astrojs/mdx': patch +--- + +Remove `@mdx-js/rollup` dependency diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index 4e06bea89..63d520cb1 100644 --- a/packages/integrations/mdx/package.json +++ b/packages/integrations/mdx/package.json @@ -37,7 +37,6 @@ "@astrojs/markdown-remark": "^2.2.1", "@astrojs/prism": "^2.1.2", "@mdx-js/mdx": "^2.3.0", - "@mdx-js/rollup": "^2.3.0", "acorn": "^8.8.0", "es-module-lexer": "^1.1.1", "estree-util-visit": "^1.2.0", diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts index 2ccf66266..3e1f84c0a 100644 --- a/packages/integrations/mdx/src/index.ts +++ b/packages/integrations/mdx/src/index.ts @@ -1,8 +1,7 @@ import { markdownConfigDefaults } from '@astrojs/markdown-remark'; import { toRemarkInitializeAstroData } from '@astrojs/markdown-remark/dist/internal.js'; -import { compile as mdxCompile } from '@mdx-js/mdx'; +import { compile as mdxCompile, type CompileOptions } from '@mdx-js/mdx'; import type { PluggableList } from '@mdx-js/mdx/lib/core.js'; -import mdxPlugin, { type Options as MdxRollupPluginOptions } from '@mdx-js/rollup'; import type { AstroIntegration, ContentEntryType, HookParameters } from 'astro'; import { parse as parseESM } from 'es-module-lexer'; import fs from 'node:fs/promises'; @@ -67,7 +66,7 @@ export default function mdx(partialMdxOptions: Partial = {}): AstroI ), }); - const mdxPluginOpts: MdxRollupPluginOptions = { + const mdxPluginOpts: CompileOptions = { remarkPlugins: await getRemarkPlugins(mdxOptions, config), rehypePlugins: getRehypePlugins(mdxOptions), recmaPlugins: mdxOptions.recmaPlugins, @@ -87,8 +86,8 @@ export default function mdx(partialMdxOptions: Partial = {}): AstroI vite: { plugins: [ { + name: '@mdx-js/rollup', enforce: 'pre', - ...mdxPlugin(mdxPluginOpts), configResolved(resolved) { importMetaEnv = { ...importMetaEnv, ...resolved.env }; }, diff --git a/packages/integrations/mdx/src/plugins.ts b/packages/integrations/mdx/src/plugins.ts index 859cf3bbe..af9950451 100644 --- a/packages/integrations/mdx/src/plugins.ts +++ b/packages/integrations/mdx/src/plugins.ts @@ -5,7 +5,6 @@ import { } from '@astrojs/markdown-remark/dist/internal.js'; import { nodeTypes } from '@mdx-js/mdx'; import type { PluggableList } from '@mdx-js/mdx/lib/core.js'; -import type { Options as MdxRollupPluginOptions } from '@mdx-js/rollup'; import type { AstroConfig } from 'astro'; import type { Literal, MemberExpression } from 'estree'; import { visit as estreeVisit } from 'estree-util-visit'; @@ -99,7 +98,7 @@ export function rehypeApplyFrontmatterExport() { export async function getRemarkPlugins( mdxOptions: MdxOptions, config: AstroConfig -): Promise { +): Promise { let remarkPlugins: PluggableList = [ ...(config.experimental.assets ? [remarkCollectImages, remarkImageToComponent] : []), ]; @@ -128,7 +127,7 @@ export async function getRemarkPlugins( return remarkPlugins; } -export function getRehypePlugins(mdxOptions: MdxOptions): MdxRollupPluginOptions['rehypePlugins'] { +export function getRehypePlugins(mdxOptions: MdxOptions): PluggableList { let rehypePlugins: PluggableList = [ // ensure `data.meta` is preserved in `properties.metastring` for rehype syntax highlighters rehypeMetaString, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index df4ad8e2b..f91304cf4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4125,9 +4125,6 @@ importers: '@mdx-js/mdx': specifier: ^2.3.0 version: 2.3.0 - '@mdx-js/rollup': - specifier: ^2.3.0 - version: 2.3.0 acorn: specifier: ^8.8.0 version: 8.8.2 @@ -8089,22 +8086,6 @@ packages: - supports-color dev: false - /@mdx-js/rollup@2.3.0: - resolution: {integrity: sha512-wLvRfJS/M4UmdqTd+WoaySEE7q4BIejYf1xAHXYvtT1du/1Tl/z2450Gg2+Hu7fh05KwRRiehiTP9Yc/Dtn0fA==} - peerDependencies: - rollup: '>=2' - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@mdx-js/mdx': 2.3.0 - '@rollup/pluginutils': 5.0.2(rollup@3.20.1) - source-map: 0.7.4 - vfile: 5.3.2 - transitivePeerDependencies: - - supports-color - dev: false - /@miniflare/cache@2.14.0: resolution: {integrity: sha512-0mz0OCzTegiX75uMURLJpDo3DaOCSx9M0gv7NMFWDbK/XrvjoENiBZiKu98UBM5fts0qtK19a+MfB4aT0uBCFg==} engines: {node: '>=16.13'} From 7851f9258fae2f54795470253df9ce4bcd5f9cb0 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Wed, 24 May 2023 10:20:06 +0100 Subject: [PATCH 4/4] fix: detect `mdx` files using full extension (#7192) --- .changeset/lazy-zebras-invent.md | 6 ++++++ packages/astro/src/content/runtime.ts | 2 +- packages/integrations/mdx/src/index.ts | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changeset/lazy-zebras-invent.md diff --git a/.changeset/lazy-zebras-invent.md b/.changeset/lazy-zebras-invent.md new file mode 100644 index 000000000..1c2abb981 --- /dev/null +++ b/.changeset/lazy-zebras-invent.md @@ -0,0 +1,6 @@ +--- +'@astrojs/mdx': patch +'astro': patch +--- + +Detect `mdx` files using their full extension diff --git a/packages/astro/src/content/runtime.ts b/packages/astro/src/content/runtime.ts index f38d9192a..9187c4fce 100644 --- a/packages/astro/src/content/runtime.ts +++ b/packages/astro/src/content/runtime.ts @@ -306,7 +306,7 @@ async function render({ let props = baseProps; // Auto-apply MDX components export - if (id.endsWith('mdx')) { + if (id.endsWith('.mdx')) { props = { components: mod.components ?? {}, ...baseProps, diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts index 3e1f84c0a..0d1ff9d13 100644 --- a/packages/integrations/mdx/src/index.ts +++ b/packages/integrations/mdx/src/index.ts @@ -94,7 +94,7 @@ export default function mdx(partialMdxOptions: Partial = {}): AstroI // Override transform to alter code before MDX compilation // ex. inject layouts async transform(_, id) { - if (!id.endsWith('mdx')) return; + if (!id.endsWith('.mdx')) return; // Read code from file manually to prevent Vite from parsing `import.meta.env` expressions const { fileId } = getFileInfo(id, config);