@astrojs/mdx 0.17.0 → 0.17.2
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/.turbo/turbo-build.log +2 -2
- package/CHANGELOG.md +10 -0
- package/dist/index.js +3 -3
- package/package.json +5 -5
- package/src/index.ts +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
[34m@astrojs/mdx:build: [0mcache hit, replaying output [
|
|
1
|
+
[34m@astrojs/mdx:build: [0mcache hit, replaying output [2mb5a6d4a613b226a3[0m
|
|
2
2
|
[34m@astrojs/mdx:build: [0m
|
|
3
|
-
[34m@astrojs/mdx:build: [0m> @astrojs/mdx@0.17.
|
|
3
|
+
[34m@astrojs/mdx:build: [0m> @astrojs/mdx@0.17.2 build /home/runner/work/astro/astro/packages/integrations/mdx
|
|
4
4
|
[34m@astrojs/mdx:build: [0m> astro-scripts build "src/**/*.ts" && tsc
|
|
5
5
|
[34m@astrojs/mdx:build: [0m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @astrojs/mdx
|
|
2
2
|
|
|
3
|
+
## 0.17.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#6296](https://github.com/withastro/astro/pull/6296) [`075b87e8b`](https://github.com/withastro/astro/commit/075b87e8b72a69a608cd2ff1196dc0989e2cf1e1) Thanks [@RaphaelBossek](https://github.com/RaphaelBossek)! - Update to `es-module-lexer@1.1.1`
|
|
8
|
+
|
|
9
|
+
## 0.17.1
|
|
10
|
+
|
|
11
|
+
- Updated to es-module-lexer@1.1.1
|
|
12
|
+
|
|
3
13
|
## 0.17.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -78,15 +78,15 @@ function mdx(partialMdxOptions = {}) {
|
|
|
78
78
|
code = 'import { Fragment } from "astro/jsx-runtime"\n' + code;
|
|
79
79
|
}
|
|
80
80
|
const { fileUrl, fileId } = getFileInfo(id, config);
|
|
81
|
-
if (!moduleExports.
|
|
81
|
+
if (!moduleExports.find(({ n }) => n === "url")) {
|
|
82
82
|
code += `
|
|
83
83
|
export const url = ${JSON.stringify(fileUrl)};`;
|
|
84
84
|
}
|
|
85
|
-
if (!moduleExports.
|
|
85
|
+
if (!moduleExports.find(({ n }) => n === "file")) {
|
|
86
86
|
code += `
|
|
87
87
|
export const file = ${JSON.stringify(fileId)};`;
|
|
88
88
|
}
|
|
89
|
-
if (!moduleExports.
|
|
89
|
+
if (!moduleExports.find(({ n }) => n === "Content")) {
|
|
90
90
|
code = code.replace("export default MDXContent;", "");
|
|
91
91
|
code += `
|
|
92
92
|
export const Content = (props = {}) => MDXContent({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/mdx",
|
|
3
3
|
"description": "Use MDX within Astro",
|
|
4
|
-
"version": "0.17.
|
|
4
|
+
"version": "0.17.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@mdx-js/mdx": "^2.3.0",
|
|
29
29
|
"@mdx-js/rollup": "^2.3.0",
|
|
30
30
|
"acorn": "^8.8.0",
|
|
31
|
-
"es-module-lexer": "^
|
|
31
|
+
"es-module-lexer": "^1.1.1",
|
|
32
32
|
"estree-util-visit": "^1.2.0",
|
|
33
33
|
"github-slugger": "^1.4.0",
|
|
34
34
|
"gray-matter": "^4.0.3",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"@types/mdast": "^3.0.10",
|
|
49
49
|
"@types/mocha": "^9.1.1",
|
|
50
50
|
"@types/yargs-parser": "^21.0.0",
|
|
51
|
-
"astro": "2.0.
|
|
52
|
-
"astro-scripts": "0.0.
|
|
51
|
+
"astro": "2.0.15",
|
|
52
|
+
"astro-scripts": "0.0.11",
|
|
53
53
|
"chai": "^4.3.6",
|
|
54
54
|
"cheerio": "^1.0.0-rc.11",
|
|
55
55
|
"linkedom": "^0.14.12",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"remark-rehype": "^10.1.0",
|
|
62
62
|
"remark-shiki-twoslash": "^3.1.0",
|
|
63
63
|
"remark-toc": "^8.0.1",
|
|
64
|
-
"vite": "^4.
|
|
64
|
+
"vite": "^4.1.2"
|
|
65
65
|
},
|
|
66
66
|
"engines": {
|
|
67
67
|
"node": ">=16.12.0"
|
package/src/index.ts
CHANGED
|
@@ -112,13 +112,13 @@ export default function mdx(partialMdxOptions: Partial<MdxOptions> = {}): AstroI
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
const { fileUrl, fileId } = getFileInfo(id, config);
|
|
115
|
-
if (!moduleExports.
|
|
115
|
+
if (!moduleExports.find(({ n }) => n === 'url')) {
|
|
116
116
|
code += `\nexport const url = ${JSON.stringify(fileUrl)};`;
|
|
117
117
|
}
|
|
118
|
-
if (!moduleExports.
|
|
118
|
+
if (!moduleExports.find(({ n }) => n === 'file')) {
|
|
119
119
|
code += `\nexport const file = ${JSON.stringify(fileId)};`;
|
|
120
120
|
}
|
|
121
|
-
if (!moduleExports.
|
|
121
|
+
if (!moduleExports.find(({ n }) => n === 'Content')) {
|
|
122
122
|
// Make `Content` the default export so we can wrap `MDXContent` and pass in `Fragment`
|
|
123
123
|
code = code.replace('export default MDXContent;', '');
|
|
124
124
|
code += `\nexport const Content = (props = {}) => MDXContent({
|