diff --git a/package.json b/package.json index 0c7deb0bb..05efdb2c7 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ }, "dependencies": { "@nuxt/kit": "^3.10.3", - "@nuxtjs/mdc": "^0.5.0", + "@nuxtjs/mdc": "^0.6.1", "@vueuse/core": "^10.9.0", "@vueuse/head": "^2.0.0", "@vueuse/nuxt": "^10.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4e30ae145..3e0277028 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ dependencies: specifier: ^3.10.3 version: 3.10.3(rollup@3.29.4) '@nuxtjs/mdc': - specifier: ^0.5.0 - version: 0.5.0(rollup@3.29.4) + specifier: ^0.6.1 + version: 0.6.1(rollup@3.29.4) '@vueuse/core': specifier: ^10.9.0 version: 10.9.0 @@ -90,13 +90,13 @@ dependencies: devDependencies: '@nuxt/module-builder': specifier: ^0.5.5 - version: 0.5.5(@nuxt/kit@3.10.3)(nuxi@3.10.0)(typescript@5.3.3) + version: 0.5.5(@nuxt/kit@3.10.3)(nuxi@3.10.1)(typescript@5.3.3) '@nuxt/schema': specifier: 3.10.3 version: 3.10.3(rollup@3.29.4) '@nuxt/test-utils': specifier: 3.11.0 - version: 3.11.0(h3@1.10.1)(rollup@3.29.4)(vite@5.0.12)(vitest@1.3.1)(vue-router@4.2.5) + version: 3.11.0(h3@1.11.1)(rollup@3.29.4)(vite@5.1.4)(vitest@1.3.1)(vue-router@4.3.0) '@nuxthq/studio': specifier: ^1.0.12 version: 1.0.12(rollup@3.29.4) @@ -132,7 +132,7 @@ devDependencies: version: 15.2.2 nuxt: specifier: 3.10.3 - version: 3.10.3(eslint@8.57.0)(rollup@3.29.4)(typescript@5.3.3)(vite@5.0.12) + version: 3.10.3(eslint@8.57.0)(rollup@3.29.4)(typescript@5.3.3)(vite@5.1.4) rehype-figure: specifier: ^1.0.1 version: 1.0.1 @@ -1161,7 +1161,7 @@ packages: /@nuxt/devalue@2.0.2: resolution: {integrity: sha512-GBzP8zOc7CGWyFQS6dv1lQz8VVpz5C2yRszbXufwG/9zhStTIH50EtD87NmWbTMwXDvZLNg8GIpb1UFdH93JCA==} - /@nuxt/devtools-kit@1.0.8(nuxt@3.10.3)(rollup@3.29.4)(vite@5.0.12): + /@nuxt/devtools-kit@1.0.8(nuxt@3.10.3)(rollup@3.29.4)(vite@5.1.4): resolution: {integrity: sha512-j7bNZmoAXQ1a8qv6j6zk4c/aekrxYqYVQM21o/Hy4XHCUq4fajSgpoc8mjyWJSTfpkOmuLyEzMexpDWiIVSr6A==} peerDependencies: nuxt: ^3.9.0 @@ -1170,8 +1170,8 @@ packages: '@nuxt/kit': 3.10.3(rollup@3.29.4) '@nuxt/schema': 3.10.3(rollup@3.29.4) execa: 7.2.0 - nuxt: 3.10.3(eslint@8.57.0)(rollup@3.29.4)(typescript@5.3.3)(vite@5.0.12) - vite: 5.0.12 + nuxt: 3.10.3(eslint@8.57.0)(rollup@3.29.4)(typescript@5.3.3)(vite@5.1.4) + vite: 5.1.4 transitivePeerDependencies: - rollup - supports-color @@ -1191,7 +1191,7 @@ packages: rc9: 2.1.1 semver: 7.6.0 - /@nuxt/devtools@1.0.8(nuxt@3.10.3)(rollup@3.29.4)(vite@5.0.12): + /@nuxt/devtools@1.0.8(nuxt@3.10.3)(rollup@3.29.4)(vite@5.1.4): resolution: {integrity: sha512-o6aBFEBxc8OgVHV4OPe2g0q9tFIe9HiTxRiJnlTJ+jHvOQsBLS651ArdVtwLChf9UdMouFlpLLJ1HteZqTbtsQ==} hasBin: true peerDependencies: @@ -1199,7 +1199,7 @@ packages: vite: '*' dependencies: '@antfu/utils': 0.7.7 - '@nuxt/devtools-kit': 1.0.8(nuxt@3.10.3)(rollup@3.29.4)(vite@5.0.12) + '@nuxt/devtools-kit': 1.0.8(nuxt@3.10.3)(rollup@3.29.4)(vite@5.1.4) '@nuxt/devtools-wizard': 1.0.8 '@nuxt/kit': 3.10.3(rollup@3.29.4) birpc: 0.2.15 @@ -1216,7 +1216,7 @@ packages: launch-editor: 2.6.1 local-pkg: 0.5.0 magicast: 0.3.3 - nuxt: 3.10.3(eslint@8.57.0)(rollup@3.29.4)(typescript@5.3.3)(vite@5.0.12) + nuxt: 3.10.3(eslint@8.57.0)(rollup@3.29.4)(typescript@5.3.3)(vite@5.1.4) nypm: 0.3.6 ohash: 1.1.3 pacote: 17.0.6 @@ -1229,9 +1229,9 @@ packages: simple-git: 3.22.0 sirv: 2.0.4 unimport: 3.7.1(rollup@3.29.4) - vite: 5.0.12 - vite-plugin-inspect: 0.8.3(@nuxt/kit@3.10.3)(rollup@3.29.4)(vite@5.0.12) - vite-plugin-vue-inspector: 4.0.2(vite@5.0.12) + vite: 5.1.4 + vite-plugin-inspect: 0.8.3(@nuxt/kit@3.10.3)(rollup@3.29.4)(vite@5.1.4) + vite-plugin-vue-inspector: 4.0.2(vite@5.1.4) which: 3.0.1 ws: 8.16.0 transitivePeerDependencies: @@ -1267,7 +1267,7 @@ packages: - rollup - supports-color - /@nuxt/module-builder@0.5.5(@nuxt/kit@3.10.3)(nuxi@3.10.0)(typescript@5.3.3): + /@nuxt/module-builder@0.5.5(@nuxt/kit@3.10.3)(nuxi@3.10.1)(typescript@5.3.3): resolution: {integrity: sha512-ifFfwA1rbSXSae25RmqA2kAbV3xoShZNrq1yK8VXB/EnIcDn4WiaYR1PytaSxIt5zsvWPn92BJXiIUBiMQZ0hw==} hasBin: true peerDependencies: @@ -1278,7 +1278,7 @@ packages: citty: 0.1.5 consola: 3.2.3 mlly: 1.5.0 - nuxi: 3.10.0 + nuxi: 3.10.1 pathe: 1.1.2 unbuild: 2.0.0(typescript@5.3.3) transitivePeerDependencies: @@ -1331,7 +1331,7 @@ packages: - rollup - supports-color - /@nuxt/test-utils@3.11.0(h3@1.10.1)(rollup@3.29.4)(vite@5.0.12)(vitest@1.3.1)(vue-router@4.2.5): + /@nuxt/test-utils@3.11.0(h3@1.11.1)(rollup@3.29.4)(vite@5.1.4)(vitest@1.3.1)(vue-router@4.3.0): resolution: {integrity: sha512-9ovgpQZkZpVg/MhYVVn2169WjH/IL0XUqwGryTa/lkx0/BCi1LMVEp3HTPkmt4qbRcxitO+kL4vFqqrFGVaSVg==} engines: {node: ^14.18.0 || >=16.10.0} peerDependencies: @@ -1380,7 +1380,7 @@ packages: execa: 8.0.1 fake-indexeddb: 5.0.2 get-port-please: 3.1.2 - h3: 1.10.1 + h3: 1.11.1 local-pkg: 0.5.0 magic-string: 0.30.7 node-fetch-native: 1.6.1 @@ -1393,10 +1393,10 @@ packages: ufo: 1.4.0 unenv: 1.9.0 unplugin: 1.7.1 - vite: 5.0.12 + vite: 5.1.4 vitest: 1.3.1 - vitest-environment-nuxt: 1.0.0(h3@1.10.1)(rollup@3.29.4)(vite@5.0.12)(vitest@1.3.1)(vue-router@4.2.5) - vue-router: 4.2.5 + vitest-environment-nuxt: 1.0.0(h3@1.11.1)(rollup@3.29.4)(vite@5.1.4)(vitest@1.3.1)(vue-router@4.3.0) + vue-router: 4.3.0(vue@3.4.20) transitivePeerDependencies: - rollup - supports-color @@ -1528,14 +1528,14 @@ packages: - supports-color dev: true - /@nuxtjs/mdc@0.5.0(rollup@3.29.4): - resolution: {integrity: sha512-480Ajc7o/YAl9b21btd0oRtVe/UjUWmVSEWauS+H+izwEGdGvJTVfZRdaiAXcXKl+UmUTpf+POel027sE9HAZQ==} + /@nuxtjs/mdc@0.6.1(rollup@3.29.4): + resolution: {integrity: sha512-zS5QK7DZ/SBrjqQX1DOy7GnxKy+wbj2+LvooefOWmQqHfLTAqJLVIjuv/BmKnQWiRCq19+uysys3iY42EoY5/A==} dependencies: '@nuxt/kit': 3.10.3(rollup@3.29.4) - '@shikijs/transformers': 1.0.0-beta.6 + '@shikijs/transformers': 1.1.7 '@types/hast': 3.0.4 '@types/mdast': 4.0.3 - '@vue/compiler-core': 3.4.15 + '@vue/compiler-core': 3.4.21 consola: 3.2.3 debug: 4.3.4 defu: 6.1.4 @@ -1556,7 +1556,7 @@ packages: rehype-sort-attributes: 5.0.0 remark-emoji: 4.0.1 remark-gfm: 4.0.0 - remark-mdc: 3.0.2 + remark-mdc: 3.1.0 remark-parse: 11.0.0 remark-rehype: 11.1.0 scule: 1.3.0 @@ -1776,6 +1776,7 @@ packages: dependencies: is-glob: 4.0.3 micromatch: 4.0.5 + napi-wasm: 1.1.0 bundledDependencies: - napi-wasm @@ -2167,18 +2168,14 @@ packages: requiresBuild: true optional: true - /@shikijs/core@1.0.0-beta.6: - resolution: {integrity: sha512-dHbpxvRz8G3NcEWLYh3TkVwqVswqDyHKHqWi+7c72hm+yIumYJwdDuQIEjT4z5qxNzyzKQGnEeb9b5jWPdy3vA==} - dev: false - /@shikijs/core@1.1.7: resolution: {integrity: sha512-gTYLUIuD1UbZp/11qozD3fWpUTuMqPSf3svDMMrL0UmlGU7D9dPw/V1FonwAorCUJBltaaESxq90jrSjQyGixg==} dev: false - /@shikijs/transformers@1.0.0-beta.6: - resolution: {integrity: sha512-VuZ+drxEUO67uEEkpy2RTODjuO3oI49JW5JlNeqR7dHACbaybxKMwuf3g0EqqQ9ZpJ40YhdXy3GjCsohs6dSDw==} + /@shikijs/transformers@1.1.7: + resolution: {integrity: sha512-lXz011ao4+rvweps/9h3CchBfzb1U5OtP5D51Tqc9lQYdLblWMIxQxH6Ybe1GeGINcEVM4goMyPrI0JvlIp4UQ==} dependencies: - shiki: 1.0.0-beta.6 + shiki: 1.1.7 dev: false /@sigstore/bundle@2.1.1: @@ -2738,6 +2735,16 @@ packages: estree-walker: 2.0.2 source-map-js: 1.0.2 + /@vue/compiler-core@3.4.21: + resolution: {integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==} + dependencies: + '@babel/parser': 7.23.9 + '@vue/shared': 3.4.21 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.0.2 + dev: false + /@vue/compiler-dom@3.4.15: resolution: {integrity: sha512-wox0aasVV74zoXyblarOM3AZQz/Z+OunYcIHe1OsGclCHt8RsRm04DObjefaI82u6XDzv+qGWZ24tIsRAIi5MQ==} dependencies: @@ -2847,6 +2854,10 @@ packages: /@vue/shared@3.4.20: resolution: {integrity: sha512-KTEngal0aiUvNJ6I1Chk5Ew5XqChsFsxP4GKAYXWb99zKJWjNU72p2FWEOmZWHxHcqtniOJsgnpd3zizdpfEag==} + /@vue/shared@3.4.21: + resolution: {integrity: sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==} + dev: false + /@vueuse/core@10.9.0: resolution: {integrity: sha512-/1vjTol8SXnx6xewDEKfS0Ra//ncg4Hb0DaZiwKf7drgfMsKFExQ+FnnENcN6efPen+1kIzhLQoGSy0eDUVOMg==} dependencies: @@ -2886,7 +2897,7 @@ packages: '@vueuse/core': 10.9.0 '@vueuse/metadata': 10.9.0 local-pkg: 0.5.0 - nuxt: 3.10.3(eslint@8.57.0)(rollup@3.29.4)(typescript@5.3.3)(vite@5.0.12) + nuxt: 3.10.3(eslint@8.57.0)(rollup@3.29.4)(typescript@5.3.3)(vite@5.1.4) vue-demi: 0.14.7 transitivePeerDependencies: - '@vue/composition-api' @@ -7758,6 +7769,9 @@ packages: engines: {node: ^14 || ^16 || >=18} hasBin: true + /napi-wasm@1.1.0: + resolution: {integrity: sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg==} + /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -8079,14 +8093,6 @@ packages: dependencies: boolbase: 1.0.0 - /nuxi@3.10.0: - resolution: {integrity: sha512-veZXw2NuaQ1PrpvHrnQ1dPgkAjv0WqPlvFReg5Iubum0QVGWdJJvGuNsltDQyPcZ7X7mhMXq9SLIpokK4kpvKA==} - engines: {node: ^14.18.0 || >=16.10.0} - hasBin: true - optionalDependencies: - fsevents: 2.3.3 - dev: true - /nuxi@3.10.1: resolution: {integrity: sha512-ZNt858+FOZDIiKKFJkXO7uJAnALytDdn1XbLgtZAqbtWNMayHbOnWcnxh+WSOE4H9uOi2+loWXEqKElmNWLgcQ==} engines: {node: ^14.18.0 || >=16.10.0} @@ -8108,7 +8114,7 @@ packages: - supports-color dev: true - /nuxt@3.10.3(eslint@8.57.0)(rollup@3.29.4)(typescript@5.3.3)(vite@5.0.12): + /nuxt@3.10.3(eslint@8.57.0)(rollup@3.29.4)(typescript@5.3.3)(vite@5.1.4): resolution: {integrity: sha512-NchGNiiz9g/ErJAb462W/lpX2NqcXYb9hugySKWvLXNdrjeAPiJ2/7mhgwUSiZA9MpjuQg3saiEajr1zlRIOCg==} engines: {node: ^14.18.0 || >=16.10.0} hasBin: true @@ -8122,7 +8128,7 @@ packages: optional: true dependencies: '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 1.0.8(nuxt@3.10.3)(rollup@3.29.4)(vite@5.0.12) + '@nuxt/devtools': 1.0.8(nuxt@3.10.3)(rollup@3.29.4)(vite@5.1.4) '@nuxt/kit': 3.10.3(rollup@3.29.4) '@nuxt/schema': 3.10.3(rollup@3.29.4) '@nuxt/telemetry': 2.5.3(rollup@3.29.4) @@ -9843,8 +9849,8 @@ packages: - supports-color dev: false - /remark-mdc@3.0.2: - resolution: {integrity: sha512-HoCaTwIkvYp1Kj9EiKMNpfAjLO53PwiaeA5J2o+uIBfCHjcOWai3oDmCkEZVCIHbHgU/qSZ8JeiQftksnVKTeQ==} + /remark-mdc@3.1.0: + resolution: {integrity: sha512-5Hf5w2u59AgzclopOPwMUW4FgEWW6s7AVJf1yRIRIIfydBGrq7sW1rhnwMxsswt9bbMPxiuDwImh8DXPfyA85Q==} dependencies: '@types/mdast': 4.0.3 '@types/unist': 3.0.2 @@ -10257,12 +10263,6 @@ packages: rechoir: 0.6.2 dev: true - /shiki@1.0.0-beta.6: - resolution: {integrity: sha512-lS60hZmzma3ZDVVjk0k33zwUgsB/12QfWNAsKy1gsGpG211JNfAdMN+FBGs4qTTxUNLqfS7nxmpckqDadIwiWQ==} - dependencies: - '@shikijs/core': 1.0.0-beta.6 - dev: false - /shiki@1.1.7: resolution: {integrity: sha512-9kUTMjZtcPH3i7vHunA6EraTPpPOITYTdA5uMrvsJRexktqP0s7P3s9HVK80b4pP42FRVe03D7fT3NmJv2yYhw==} dependencies: @@ -11376,7 +11376,7 @@ packages: resolution: {integrity: sha512-+s4iWvHHYnLuwNo+9mqVFLBmBzGc3gIuzkVZ8fdMN9K/kWopCnfaUVnDagd2OX3It5nRR5EenI5nSQb8FOd0fA==} dependencies: magic-string: 0.30.7 - mlly: 1.5.0 + mlly: 1.6.1 pathe: 1.1.2 pkg-types: 1.0.3 unplugin: 1.7.1 @@ -11557,7 +11557,7 @@ packages: vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - /vite-plugin-inspect@0.8.3(@nuxt/kit@3.10.3)(rollup@3.29.4)(vite@5.0.12): + /vite-plugin-inspect@0.8.3(@nuxt/kit@3.10.3)(rollup@3.29.4)(vite@5.1.4): resolution: {integrity: sha512-SBVzOIdP/kwe6hjkt7LSW4D0+REqqe58AumcnCfRNw4Kt3mbS9pEBkch+nupu2PBxv2tQi69EQHQ1ZA1vgB/Og==} engines: {node: '>=14'} peerDependencies: @@ -11577,12 +11577,12 @@ packages: perfect-debounce: 1.0.0 picocolors: 1.0.0 sirv: 2.0.4 - vite: 5.0.12 + vite: 5.1.4 transitivePeerDependencies: - rollup - supports-color - /vite-plugin-vue-inspector@4.0.2(vite@5.0.12): + /vite-plugin-vue-inspector@4.0.2(vite@5.1.4): resolution: {integrity: sha512-KPvLEuafPG13T7JJuQbSm5PwSxKFnVS965+MP1we2xGw9BPkkc/+LPix5MMWenpKWqtjr0ws8THrR+KuoDC8hg==} peerDependencies: vite: ^3.0.0-0 || ^4.0.0-0 || ^5.0.0-0 @@ -11596,7 +11596,7 @@ packages: '@vue/compiler-dom': 3.4.15 kolorist: 1.8.0 magic-string: 0.30.7 - vite: 5.0.12 + vite: 5.1.4 transitivePeerDependencies: - supports-color @@ -11668,10 +11668,10 @@ packages: optionalDependencies: fsevents: 2.3.3 - /vitest-environment-nuxt@1.0.0(h3@1.10.1)(rollup@3.29.4)(vite@5.0.12)(vitest@1.3.1)(vue-router@4.2.5): + /vitest-environment-nuxt@1.0.0(h3@1.11.1)(rollup@3.29.4)(vite@5.1.4)(vitest@1.3.1)(vue-router@4.3.0): resolution: {integrity: sha512-AWMO9h4HdbaFdPWZw34gALFI8gbBiOpvfbyeZwHIPfh4kWg/TwElYHvYMQ61WPUlCGaS5LebfHkaI0WPyb//Iw==} dependencies: - '@nuxt/test-utils': 3.11.0(h3@1.10.1)(rollup@3.29.4)(vite@5.0.12)(vitest@1.3.1)(vue-router@4.2.5) + '@nuxt/test-utils': 3.11.0(h3@1.11.1)(rollup@3.29.4)(vite@5.1.4)(vitest@1.3.1)(vue-router@4.3.0) transitivePeerDependencies: - '@cucumber/cucumber' - '@jest/globals' @@ -11889,17 +11889,6 @@ packages: optional: true dev: true - /vue-router@4.2.5: - resolution: {integrity: sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==} - peerDependencies: - vue: ^3.2.0 || ^3.2.45 - peerDependenciesMeta: - vue: - optional: true - dependencies: - '@vue/devtools-api': 6.5.1 - dev: true - /vue-router@4.3.0(vue@3.4.20): resolution: {integrity: sha512-dqUcs8tUeG+ssgWhcPbjHvazML16Oga5w34uCUmsk7i0BcnskoLGwjpa15fqMr2Fa5JgVBrdL2MEgqz6XZ/6IQ==} peerDependencies: diff --git a/src/runtime/transformers/markdown.ts b/src/runtime/transformers/markdown.ts index 3031b1bb9..70c939ccf 100644 --- a/src/runtime/transformers/markdown.ts +++ b/src/runtime/transformers/markdown.ts @@ -1,4 +1,4 @@ -import { parseMarkdown } from '@nuxtjs/mdc/dist/runtime' +import { parseMarkdown } from '@nuxtjs/mdc/runtime' import { type State } from 'mdast-util-to-hast' import { normalizeUri } from 'micromark-util-sanitize-uri' import { type Properties, type Element } from 'hast' @@ -27,6 +27,7 @@ export default defineTransformer({ : undefined const parsed = await parseMarkdown(content as string, { + ...config, highlight: highlightOptions, remark: { plugins: config.remarkPlugins