Merge branch 'main' into redirects-ssg
This commit is contained in:
commit
af2ceea276
25 changed files with 60 additions and 55 deletions
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
fix a bug when Fragment is as a slot
|
6
.changeset/lazy-zebras-invent.md
Normal file
6
.changeset/lazy-zebras-invent.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
'@astrojs/mdx': patch
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Detect `mdx` files using their full extension
|
5
.changeset/spotty-glasses-return.md
Normal file
5
.changeset/spotty-glasses-return.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/mdx': patch
|
||||
---
|
||||
|
||||
Remove `@mdx-js/rollup` dependency
|
5
.changeset/static-slot-css.md
Normal file
5
.changeset/static-slot-css.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
fix: add astro-static-slot to the list of inert tags in astro css
|
|
@ -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.
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import type { SSRResult } from '../../@types/astro';
|
||||
import islandScript from './astro-island.prebuilt.js';
|
||||
|
||||
const ISLAND_STYLES = `<style>astro-island,astro-slot{display:contents}</style>`;
|
||||
const ISLAND_STYLES = `<style>astro-island,astro-slot,astro-static-slot{display:contents}</style>`;
|
||||
|
||||
export function determineIfNeedsHydrationScript(result: SSRResult): boolean {
|
||||
if (result._metadata.hasHydrationScript) {
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
"tiny-glob": "^0.2.9"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"astro": "workspace:^2.5.4"
|
||||
"astro": "workspace:^2.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"astro": "workspace:*",
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"esbuild": "^0.15.18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"astro": "workspace:^2.5.4"
|
||||
"astro": "workspace:^2.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"astro": "workspace:*",
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
"vite": "^4.3.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"astro": "workspace:^2.5.4",
|
||||
"astro": "workspace:^2.5.5",
|
||||
"sharp": ">=0.31.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
@ -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",
|
||||
|
|
|
@ -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<MdxOptions> = {}): AstroI
|
|||
),
|
||||
});
|
||||
|
||||
const mdxPluginOpts: MdxRollupPluginOptions = {
|
||||
const mdxPluginOpts: CompileOptions = {
|
||||
remarkPlugins: await getRemarkPlugins(mdxOptions, config),
|
||||
rehypePlugins: getRehypePlugins(mdxOptions),
|
||||
recmaPlugins: mdxOptions.recmaPlugins,
|
||||
|
@ -87,15 +86,15 @@ export default function mdx(partialMdxOptions: Partial<MdxOptions> = {}): AstroI
|
|||
vite: {
|
||||
plugins: [
|
||||
{
|
||||
name: '@mdx-js/rollup',
|
||||
enforce: 'pre',
|
||||
...mdxPlugin(mdxPluginOpts),
|
||||
configResolved(resolved) {
|
||||
importMetaEnv = { ...importMetaEnv, ...resolved.env };
|
||||
},
|
||||
// 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);
|
||||
|
|
|
@ -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<MdxRollupPluginOptions['remarkPlugins']> {
|
||||
): Promise<PluggableList> {
|
||||
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,
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
"vite": "^4.3.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"astro": "workspace:^2.5.4",
|
||||
"astro": "workspace:^2.5.5",
|
||||
"svelte": "^3.54.0"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
"vite": "^4.3.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"astro": "workspace:^2.5.4",
|
||||
"astro": "workspace:^2.5.5",
|
||||
"tailwindcss": "^3.0.24"
|
||||
},
|
||||
"pnpm": {
|
||||
|
|
|
@ -60,7 +60,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",
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
"vue": "^3.2.37"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"astro": "workspace:^2.5.4",
|
||||
"astro": "workspace:^2.5.5",
|
||||
"vue": "^3.2.30"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -4128,9 +4128,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
|
||||
|
@ -8110,22 +8107,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'}
|
||||
|
|
Loading…
Reference in a new issue