@astrojs/mdx 0.15.0-beta.1 → 1.0.0-beta.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 +26 -0
- package/dist/plugins.js +1 -3
- package/dist/remark-shiki.js +1 -1
- package/package.json +6 -6
- package/src/plugins.ts +2 -3
- package/src/remark-shiki.ts +1 -1
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 [2me3662492a73790a4[0m
|
|
2
2
|
[34m@astrojs/mdx:build: [0m
|
|
3
|
-
[34m@astrojs/mdx:build: [0m> @astrojs/mdx@0.
|
|
3
|
+
[34m@astrojs/mdx:build: [0m> @astrojs/mdx@1.0.0-beta.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,31 @@
|
|
|
1
1
|
# @astrojs/mdx
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.2
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#5825](https://github.com/withastro/astro/pull/5825) [`52209ca2a`](https://github.com/withastro/astro/commit/52209ca2ad72a30854947dcb3a90ab4db0ac0a6f) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Baseline the experimental `contentCollections` flag. You're free to remove this from your astro config!
|
|
8
|
+
|
|
9
|
+
```diff
|
|
10
|
+
import { defineConfig } from 'astro/config';
|
|
11
|
+
|
|
12
|
+
export default defineConfig({
|
|
13
|
+
- experimental: { contentCollections: true }
|
|
14
|
+
})
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [#5782](https://github.com/withastro/astro/pull/5782) [`1f92d64ea`](https://github.com/withastro/astro/commit/1f92d64ea35c03fec43aff64eaf704dc5a9eb30a) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Remove support for Node 14. Minimum supported Node version is now >=16.12.0
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [#5837](https://github.com/withastro/astro/pull/5837) [`12f65a4d5`](https://github.com/withastro/astro/commit/12f65a4d55e3fd2993c2f67b18794dd536280c69) Thanks [@giuseppelt](https://github.com/giuseppelt)! - fix shiki css class replace logic
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [[`1f92d64ea`](https://github.com/withastro/astro/commit/1f92d64ea35c03fec43aff64eaf704dc5a9eb30a), [`12f65a4d5`](https://github.com/withastro/astro/commit/12f65a4d55e3fd2993c2f67b18794dd536280c69), [`16107b6a1`](https://github.com/withastro/astro/commit/16107b6a10514ef1b563e585ec9add4b14f42b94), [`52209ca2a`](https://github.com/withastro/astro/commit/52209ca2ad72a30854947dcb3a90ab4db0ac0a6f), [`7572f7402`](https://github.com/withastro/astro/commit/7572f7402238da37de748be58d678fedaf863b53)]:
|
|
26
|
+
- @astrojs/prism@2.0.0-beta.0
|
|
27
|
+
- @astrojs/markdown-remark@2.0.0-beta.2
|
|
28
|
+
|
|
3
29
|
## 0.15.0-beta.1
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
package/dist/plugins.js
CHANGED
|
@@ -127,9 +127,7 @@ async function getRemarkPlugins(mdxOptions, config) {
|
|
|
127
127
|
remarkPlugins.push(remarkSmartypants);
|
|
128
128
|
}
|
|
129
129
|
remarkPlugins = [...remarkPlugins, ...ignoreStringPlugins(mdxOptions.remarkPlugins)];
|
|
130
|
-
|
|
131
|
-
remarkPlugins.push(toRemarkContentRelImageError(config));
|
|
132
|
-
}
|
|
130
|
+
remarkPlugins.push(toRemarkContentRelImageError(config));
|
|
133
131
|
return remarkPlugins;
|
|
134
132
|
}
|
|
135
133
|
function getRehypePlugins(mdxOptions) {
|
package/dist/remark-shiki.js
CHANGED
|
@@ -42,7 +42,7 @@ const remarkShiki = async ({ langs = [], theme = "github-dark", wrap = false })
|
|
|
42
42
|
lang = "plaintext";
|
|
43
43
|
}
|
|
44
44
|
let html = highlighter.codeToHtml(node.value, { lang });
|
|
45
|
-
html = html.replace(
|
|
45
|
+
html = html.replace(/<pre class="(.*?)shiki(.*?)"/, `<pre class="$1astro-code$2"`);
|
|
46
46
|
if (node.lang === "diff") {
|
|
47
47
|
html = html.replace(
|
|
48
48
|
/<span class="line"><span style="(.*?)">([\+|\-])/g,
|
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.
|
|
4
|
+
"version": "1.0.0-beta.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"./package.json": "./package.json"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@astrojs/markdown-remark": "^2.0.0-beta.
|
|
27
|
-
"@astrojs/prism": "^
|
|
26
|
+
"@astrojs/markdown-remark": "^2.0.0-beta.2",
|
|
27
|
+
"@astrojs/prism": "^2.0.0-beta.0",
|
|
28
28
|
"@mdx-js/mdx": "^2.1.2",
|
|
29
29
|
"@mdx-js/rollup": "^2.1.1",
|
|
30
30
|
"acorn": "^8.8.0",
|
|
@@ -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.0-beta.
|
|
52
|
-
"astro-scripts": "0.0.
|
|
51
|
+
"astro": "2.0.0-beta.2",
|
|
52
|
+
"astro-scripts": "0.0.10-beta.0",
|
|
53
53
|
"chai": "^4.3.6",
|
|
54
54
|
"cheerio": "^1.0.0-rc.11",
|
|
55
55
|
"linkedom": "^0.14.12",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"vite": "^4.0.3"
|
|
65
65
|
},
|
|
66
66
|
"engines": {
|
|
67
|
-
"node": "
|
|
67
|
+
"node": ">=16.12.0"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"build": "astro-scripts build \"src/**/*.ts\" && tsc",
|
package/src/plugins.ts
CHANGED
|
@@ -161,9 +161,8 @@ export async function getRemarkPlugins(
|
|
|
161
161
|
remarkPlugins = [...remarkPlugins, ...ignoreStringPlugins(mdxOptions.remarkPlugins)];
|
|
162
162
|
|
|
163
163
|
// Apply last in case user plugins resolve relative image paths
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
164
|
+
remarkPlugins.push(toRemarkContentRelImageError(config));
|
|
165
|
+
|
|
167
166
|
return remarkPlugins;
|
|
168
167
|
}
|
|
169
168
|
|
package/src/remark-shiki.ts
CHANGED
|
@@ -66,7 +66,7 @@ const remarkShiki = async ({ langs = [], theme = 'github-dark', wrap = false }:
|
|
|
66
66
|
// <span class="line"
|
|
67
67
|
|
|
68
68
|
// Replace "shiki" class naming with "astro".
|
|
69
|
-
html = html.replace(
|
|
69
|
+
html = html.replace(/<pre class="(.*?)shiki(.*?)"/, `<pre class="$1astro-code$2"`);
|
|
70
70
|
// Add "user-select: none;" for "+"/"-" diff symbols
|
|
71
71
|
if (node.lang === 'diff') {
|
|
72
72
|
html = html.replace(
|