@astrojs/markdoc 2.0.0-beta.1 → 2.0.1

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.
@@ -131,7 +131,11 @@ export async function createTreeNode(node: RenderableTreeNodes): Promise<TreeNod
131
131
  return { type: 'text', content: '' };
132
132
  }
133
133
 
134
- const children = await Promise.all(node.children.map((child) => createTreeNode(child)));
134
+ // `node.children` may be a Promise instead of an array when a Markdoc built-in node
135
+ // transform (e.g. `list`) passes async `transformChildren()` results directly to `new Tag()`.
136
+ // Await it defensively before mapping.
137
+ const resolvedChildren = await Promise.resolve(node.children);
138
+ const children = await Promise.all(resolvedChildren.map((child) => createTreeNode(child)));
135
139
 
136
140
  if (typeof node.name === 'function') {
137
141
  const component = node.name;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@astrojs/markdoc",
3
3
  "description": "Add support for Markdoc in your Astro site",
4
- "version": "2.0.0-beta.1",
4
+ "version": "2.0.1",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "author": "withastro",
@@ -71,7 +71,7 @@
71
71
  "devalue": "^5.8.1",
72
72
  "linkedom": "^0.18.12",
73
73
  "vite": "^8.0.13",
74
- "astro": "7.0.0-beta.3",
74
+ "astro": "7.0.3",
75
75
  "astro-scripts": "0.0.14"
76
76
  },
77
77
  "engines": {