@astrojs/mdx 4.3.10 → 5.0.0-alpha.0

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.
package/dist/index.js CHANGED
@@ -58,8 +58,7 @@ function mdx(partialMdxOptions = {}) {
58
58
  });
59
59
  Object.assign(vitePluginMdxOptions, {
60
60
  mdxOptions: resolvedMdxOptions,
61
- srcDir: config.srcDir,
62
- experimentalHeadingIdCompat: config.experimental.headingIdCompat
61
+ srcDir: config.srcDir
63
62
  });
64
63
  vitePluginMdxOptions = {};
65
64
  }
package/dist/plugins.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import type { MdxOptions } from './index.js';
2
2
  interface MdxProcessorExtraOptions {
3
3
  sourcemap: boolean;
4
- experimentalHeadingIdCompat: boolean;
5
4
  }
6
5
  export declare function createMdxProcessor(mdxOptions: MdxOptions, extraOptions: MdxProcessorExtraOptions): import("unified").Processor<import("mdast").Root, import("estree").Program, import("estree").Program, import("estree").Program, string>;
7
6
  export {};
package/dist/plugins.js CHANGED
@@ -19,7 +19,7 @@ const isPerformanceBenchmark = Boolean(process.env.ASTRO_PERFORMANCE_BENCHMARK);
19
19
  function createMdxProcessor(mdxOptions, extraOptions) {
20
20
  return createProcessor({
21
21
  remarkPlugins: getRemarkPlugins(mdxOptions),
22
- rehypePlugins: getRehypePlugins(mdxOptions, extraOptions),
22
+ rehypePlugins: getRehypePlugins(mdxOptions),
23
23
  recmaPlugins: mdxOptions.recmaPlugins,
24
24
  remarkRehypeOptions: mdxOptions.remarkRehype,
25
25
  jsxImportSource: "astro",
@@ -43,7 +43,7 @@ function getRemarkPlugins(mdxOptions) {
43
43
  remarkPlugins.push(...mdxOptions.remarkPlugins, remarkCollectImages);
44
44
  return remarkPlugins;
45
45
  }
46
- function getRehypePlugins(mdxOptions, { experimentalHeadingIdCompat }) {
46
+ function getRehypePlugins(mdxOptions) {
47
47
  let rehypePlugins = [
48
48
  // ensure `data.meta` is preserved in `properties.metastring` for rehype syntax highlighters
49
49
  rehypeMetaString,
@@ -62,10 +62,7 @@ function getRehypePlugins(mdxOptions, { experimentalHeadingIdCompat }) {
62
62
  }
63
63
  rehypePlugins.push(...mdxOptions.rehypePlugins, rehypeImageToComponent);
64
64
  if (!isPerformanceBenchmark) {
65
- rehypePlugins.push(
66
- [rehypeHeadingIds, { experimentalHeadingIdCompat }],
67
- rehypeInjectHeadingsExport
68
- );
65
+ rehypePlugins.push([rehypeHeadingIds], rehypeInjectHeadingsExport);
69
66
  }
70
67
  rehypePlugins.push(
71
68
  // Render info from `vfile.data.astro.frontmatter` as JS
@@ -3,6 +3,5 @@ import type { MdxOptions } from './index.js';
3
3
  export interface VitePluginMdxOptions {
4
4
  mdxOptions: MdxOptions;
5
5
  srcDir: URL;
6
- experimentalHeadingIdCompat: boolean;
7
6
  }
8
7
  export declare function vitePluginMdx(opts: VitePluginMdxOptions): Plugin;
@@ -44,8 +44,7 @@ function vitePluginMdx(opts) {
44
44
  });
45
45
  if (!processor) {
46
46
  processor = createMdxProcessor(opts.mdxOptions, {
47
- sourcemap: sourcemapEnabled,
48
- experimentalHeadingIdCompat: opts.experimentalHeadingIdCompat
47
+ sourcemap: sourcemapEnabled
49
48
  });
50
49
  }
51
50
  try {
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": "4.3.10",
4
+ "version": "5.0.0-alpha.0",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "author": "withastro",
@@ -40,10 +40,10 @@
40
40
  "source-map": "^0.7.6",
41
41
  "unist-util-visit": "^5.0.0",
42
42
  "vfile": "^6.0.3",
43
- "@astrojs/markdown-remark": "6.3.8"
43
+ "@astrojs/markdown-remark": "7.0.0-alpha.0"
44
44
  },
45
45
  "peerDependencies": {
46
- "astro": "^5.0.0"
46
+ "astro": "^6.0.0-alpha.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/estree": "^1.0.8",
@@ -61,12 +61,12 @@
61
61
  "remark-toc": "^9.0.0",
62
62
  "shiki": "^3.12.0",
63
63
  "unified": "^11.0.5",
64
- "vite": "^6.4.1",
65
- "astro": "5.15.4",
64
+ "vite": "^7.1.7",
65
+ "astro": "6.0.0-alpha.0",
66
66
  "astro-scripts": "0.0.14"
67
67
  },
68
68
  "engines": {
69
- "node": "18.20.8 || ^20.3.0 || >=22.0.0"
69
+ "node": "^20.19.5 || >=22.12.0"
70
70
  },
71
71
  "publishConfig": {
72
72
  "provenance": true