@astrojs/mdx 5.0.0-beta.5 → 5.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -122,11 +122,17 @@ function isMdxComponentNode(node) {
|
|
|
122
122
|
return node.type === "mdxJsxFlowElement" || node.type === "mdxJsxTextElement";
|
|
123
123
|
}
|
|
124
124
|
function getExportConstComponentObjectKeys(node) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
125
|
+
let variableInit;
|
|
126
|
+
for (const part of node.data?.estree?.body || []) {
|
|
127
|
+
if (part.type !== "ExportNamedDeclaration" || part.declaration?.type !== "VariableDeclaration") {
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
const declarator = part.declaration.declarations.find(({ id }) => id.name === "components");
|
|
131
|
+
if (declarator) {
|
|
132
|
+
variableInit = declarator.init;
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
130
136
|
if (variableInit?.type !== "ObjectExpression") return;
|
|
131
137
|
const keys = [];
|
|
132
138
|
for (const propertyNode of variableInit.properties) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/mdx",
|
|
3
3
|
"description": "Add support for MDX pages in your Astro site",
|
|
4
|
-
"version": "5.0.0-beta.
|
|
4
|
+
"version": "5.0.0-beta.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"source-map": "^0.7.6",
|
|
41
41
|
"unist-util-visit": "^5.1.0",
|
|
42
42
|
"vfile": "^6.0.3",
|
|
43
|
-
"@astrojs/markdown-remark": "7.0.0-beta.
|
|
43
|
+
"@astrojs/markdown-remark": "7.0.0-beta.6"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"astro": "^6.0.0-alpha.0"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"shiki": "^3.22.0",
|
|
63
63
|
"unified": "^11.0.5",
|
|
64
64
|
"vite": "^7.3.1",
|
|
65
|
-
"astro": "6.0.0-beta.
|
|
65
|
+
"astro": "6.0.0-beta.11",
|
|
66
66
|
"astro-scripts": "0.0.14"
|
|
67
67
|
},
|
|
68
68
|
"engines": {
|