summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/src/utils.ts
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@skypack.dev> 2023-11-30 10:03:51 -0500
committerGravatar GitHub <noreply@github.com> 2023-11-30 10:03:51 -0500
commitfbf145af8a792ee7334be577fbdf0bba9782b4e7 (patch)
treea5212b8b8f12d734579db8a2bb90dd4c772cba44 /packages/integrations/mdx/src/utils.ts
parentff8eadb95d34833baaf3ec7575bf4f293eae97da (diff)
parent05628aaa3c9a3702b59cbf3d0e99abf66df651df (diff)
downloadastro-fbf145af8a792ee7334be577fbdf0bba9782b4e7.tar.gz
astro-fbf145af8a792ee7334be577fbdf0bba9782b4e7.tar.zst
astro-fbf145af8a792ee7334be577fbdf0bba9782b4e7.zip
Merge pull request #9247 from withastro/next
Merge the `next` branch into `main` for the 4.0 release
Diffstat (limited to 'packages/integrations/mdx/src/utils.ts')
-rw-r--r--packages/integrations/mdx/src/utils.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/integrations/mdx/src/utils.ts b/packages/integrations/mdx/src/utils.ts
index 3425c50e3..a5b198116 100644
--- a/packages/integrations/mdx/src/utils.ts
+++ b/packages/integrations/mdx/src/utils.ts
@@ -1,10 +1,10 @@
-import type { PluggableList } from '@mdx-js/mdx/lib/core.js';
import type { Options as AcornOpts } from 'acorn';
import { parse } from 'acorn';
import type { AstroConfig, SSRError } from 'astro';
import matter from 'gray-matter';
import { bold, yellow } from 'kleur/colors';
import type { MdxjsEsm } from 'mdast-util-mdx';
+import type { PluggableList } from 'unified';
function appendForwardSlash(path: string) {
return path.endsWith('/') ? path : path + '/';
@@ -75,8 +75,8 @@ export function jsToTreeNode(
type: 'mdxjsEsm',
value: '',
data: {
+ // @ts-expect-error `parse` return types is incompatible but it should work in runtime
estree: {
- body: [],
...parse(jsString, acornOpts),
type: 'Program',
sourceType: 'module',