feat: use rehype-prism-plus; get rid of workaround for rehype-prism

This commit is contained in:
Thomas Allmer
2022-08-13 15:25:22 +02:00
parent 35ed64dca1
commit 6f88d8ef6f
19 changed files with 132 additions and 117 deletions

View File

@@ -1,5 +0,0 @@
---
'@rocket/engine': patch
---
Update es-module-lexer, small typecast fix because koa.context.body isn't always a string.

View File

@@ -2,4 +2,4 @@
'@mdjs/core': minor
---
BREAKING: Refactor @mdjs/core to ESM-only package, use latest rehype/remark/unified dependencies.
BREAKING: Refactor to ESM-only package, use latest rehype/remark/unified dependencies.

View File

@@ -0,0 +1,5 @@
---
'@rocket/engine': patch
---
Get rid of the `rehype-prism` workaround by using latest esm version of mdjs that uses `rehype-prism-plus`

View File

@@ -0,0 +1,5 @@
---
'@mdjs/core': minor
---
BREAKING: Replace `rehype-prism` with `rehype-prism-plus` as it does not get confused as running in the browser in the SSR context.

View File

@@ -7,5 +7,6 @@
"search.exclude": {
"**/*-mdjs-generated.js": true,
"**/dist-types": true,
}
},
"editor.experimental.stickyScroll.enabled": true
}

View File

@@ -35,9 +35,9 @@
"scripts": {
"debug": "DEBUG=engine:rendering yarn test",
"debug:integration": "PWDEBUG=1 yarn test:integration",
"test": "mocha --require ../../scripts/testMochaGlobalHooks.js --timeout 5000 test-node/**/*.test.{js,cjs} test-node/*.test.{js,cjs}",
"test": "mocha --require ../../scripts/testMochaGlobalHooks.js --timeout 5000 test-node/**/*.test.js test-node/*.test.js",
"test:integration": "playwright test test-node/*.spec.js",
"test:watch": "onchange 'src/**/*.{js,cjs}' 'test-node/**/*.{js,cjs}' -- npm test",
"test:watch": "onchange 'src/**/*.js' 'test-node/**/*.js' -- npm test",
"types:copy": "copyfiles \"./types/**/*.d.ts\" dist-types/"
},
"files": [

View File

@@ -1,6 +1,5 @@
// we load this before the global-dom-shim as otherwise prism thinks it's running in a browser 🙈
// we need to load the global-dom-shim as otherwise import { html } from 'lit'; breaks
import 'rehype-prism';
// https://github.com/lit/lit/issues/2524
import '@lit-labs/ssr/lib/install-global-dom-shim.js';
/* eslint-disable @typescript-eslint/ban-ts-comment */
@@ -23,7 +22,7 @@ function escapeRegExp(string) {
const REGEX_REPLACE_ESCAPES = new RegExp(
escapeRegExp(
'\\\\</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>',
'\\\\<span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>',
),
'g',
);
@@ -146,7 +145,7 @@ export async function mdInJsToMdHtmlInJs(toImportFilePath) {
// this corrects it - escaped
mdHTML = mdHTML.replace(
REGEX_REPLACE_ESCAPES,
'</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">\\\\${</span>',
'<span class="token interpolation"><span class="token interpolation-punctuation punctuation">\\\\${</span>',
);
return [mdHTML, ...mdjsScriptTag].join('\n');
}

View File

@@ -1,6 +1,5 @@
// we load this before the global-dom-shim as otherwise prism thinks it's running in a browser 🙈
// we need to load the global-dom-shim as otherwise import { html } from 'lit'; breaks
import 'rehype-prism';
// https://github.com/lit/lit/issues/2524
import '@lit-labs/ssr/lib/install-global-dom-shim.js';
export { renderJoiningGroup } from './helpers/renderJoiningGroup.js';

View File

@@ -1,6 +1,5 @@
// we load this before the global-dom-shim as otherwise prism thinks it's running in a browser 🙈
// we need to load the global-dom-shim as otherwise import { html } from 'lit'; breaks
import 'rehype-prism';
// https://github.com/lit/lit/issues/2524
import '@lit-labs/ssr/lib/install-global-dom-shim.js';
import { parentPort } from 'worker_threads';

View File

@@ -1,6 +1,5 @@
// we load this before the global-dom-shim as otherwise prism thinks it's running in a browser 🙈
// we need to load the global-dom-shim as otherwise import { html } from 'lit'; breaks
import 'rehype-prism';
// https://github.com/lit/lit/issues/2524
import '@lit-labs/ssr/lib/install-global-dom-shim.js';
import path from 'path';

View File

@@ -72,10 +72,10 @@ describe('Format Markdown', () => {
'<p>Escape JS</p>',
'<pre',
' class="language-js"',
'><code class="language-js"><span class="token keyword">const</span> foo <span class="token operator">=</span> <span class="token string">\'one\'</span><span class="token punctuation">;</span>',
'<span class="token keyword">const</span> bar <span class="token operator">=</span> html<span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">&#x3C;p>${foo}&#x3C;/p></span><span class="token template-punctuation string">`</span></span><span class="token punctuation">;</span>',
'<span class="token keyword">const</span> baz <span class="token operator">=</span> html<span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">&#x3C;span></span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">\\${</span>foo<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">&#x3C;/span></span><span class="token template-punctuation string">`</span></span><span class="token punctuation">;</span>',
'</code></pre>',
'><code class="language-js code-highlight"><span class="code-line"><span class="token keyword">const</span> foo <span class="token operator">=</span> <span class="token string">\'one\'</span><span class="token punctuation">;</span>',
'</span><span class="code-line"><span class="token keyword">const</span> bar <span class="token operator">=</span> html<span class="token template-string"><span class="token template-punctuation string">`</span><span class="token html language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&#x3C;</span>p</span><span class="token punctuation">></span></span>${foo}<span class="token tag"><span class="token tag"><span class="token punctuation">&#x3C;/</span>p</span><span class="token punctuation">></span></span></span><span class="token template-punctuation string">`</span></span><span class="token punctuation">;</span>',
'</span><span class="code-line"><span class="token keyword">const</span> baz <span class="token operator">=</span> html<span class="token template-string"><span class="token template-punctuation string">`</span><span class="token html language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&#x3C;</span>span</span><span class="token punctuation">></span></span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">\\${</span>foo<span class="token interpolation-punctuation punctuation">}</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&#x3C;/</span>span</span><span class="token punctuation">></span></span></span><span class="token template-punctuation string">`</span></span><span class="token punctuation">;</span>',
'</span></code></pre>',
].join('\n'),
);
});

View File

@@ -53,7 +53,7 @@
"github-markdown-css": "^5.1.0",
"plugins-manager": "^0.3.1",
"rehype-autolink-headings": "^6.1.1",
"rehype-prism": "^2.1.3",
"rehype-prism-plus": "^1.4.2",
"rehype-raw": "^6.1.1",
"rehype-slug": "^5.0.1",
"rehype-stringify": "^9.0.3",

View File

@@ -11,19 +11,13 @@ import remark2rehype from 'remark-rehype';
import raw from 'rehype-raw';
import htmlSlug from 'rehype-slug';
import htmlHeading from 'rehype-autolink-headings';
import rehypePrism from 'rehype-prism-plus';
import htmlStringify from 'rehype-stringify';
// @ts-ignore
import { executeSetupFunctions } from 'plugins-manager';
import { mdjsParse } from './mdjsParse.js';
import { mdjsStoryParse } from './mdjsStoryParse.js';
import { mdjsSetupCode } from './mdjsSetupCode.js';
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const loadLanguages = require('prismjs/components/');
let prismLoaded = false;
/** @type {MdjsProcessPlugin[]} */
const defaultMetaPlugins = [
{ plugin: markdown, options: {} },
@@ -39,6 +33,7 @@ const defaultMetaPlugins = [
{ plugin: htmlSlug, options: {} },
// @ts-ignore
{ plugin: htmlHeading, options: {} },
{ plugin: rehypePrism, options: {} },
// @ts-ignore
{ plugin: htmlStringify, options: {} },
];
@@ -56,13 +51,6 @@ const defaultMetaPlugins = [
*/
export async function mdjsProcess(mdjs, { setupUnifiedPlugins = [] } = {}) {
const parser = unified();
if (!prismLoaded) {
prismLoaded = true;
const rehypePrism = (await import('rehype-prism/lib/src/index.js')).default;
loadLanguages(['md', 'shell', 'yml', 'diff']);
defaultMetaPlugins.splice(6, 0, { plugin: rehypePrism, options: {} });
}
const metaPlugins = executeSetupFunctions(setupUnifiedPlugins, defaultMetaPlugins);
for (const pluginObj of metaPlugins) {

View File

@@ -26,15 +26,15 @@ describe('mdjsProcess', () => {
it('extracts code blocks with "js story" and "js preview-story" and places marker tags', async () => {
const expected = [
'<p>Intro</p>',
'<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> foo <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">;</span>',
'</code></pre>',
'<pre class="language-js"><code class="language-js code-highlight"><span class="code-line"><span class="token keyword">const</span> foo <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">;</span>',
'</span></code></pre>',
'<mdjs-story mdjs-story-name="fooStory"></mdjs-story>',
'<mdjs-preview mdjs-story-name="fooPreviewStory">',
'',
'',
'',
'<pre class="language-js"><code class="language-js"><span class="token keyword">export</span> <span class="token keyword">const</span> <span class="token function-variable function">fooPreviewStory</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span><span class="token punctuation">}</span>',
'</code></pre>',
'<pre class="language-js"><code class="language-js code-highlight"><span class="code-line"><span class="token keyword module">export</span> <span class="token keyword">const</span> <span class="token function-variable function">fooPreviewStory</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span><span class="token punctuation">}</span>',
'</span></code></pre>',
'',
'',
'',
@@ -97,8 +97,8 @@ describe('mdjsProcess', () => {
it('can setup all unified plugins via "setupUnifiedPlugins" which accepts a single function or an array of functions', async () => {
const expected = [
'<p>Intro</p>',
'<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> foo <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">;</span>',
'</code></pre>',
'<pre class="language-js"><code class="language-js code-highlight"><span class="code-line"><span class="token keyword">const</span> foo <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">;</span>',
'</span></code></pre>',
'<my-story mdjs-story-name="fooStory"></my-story>',
'<my-preview mdjs-story-name="fooPreviewStory"></my-preview>',
].join('\n');
@@ -127,8 +127,8 @@ describe('mdjsProcess', () => {
const expectedForArray = [
'<p>Intro</p>',
'<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> foo <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">;</span>',
'</code></pre>',
'<pre class="language-js"><code class="language-js code-highlight"><span class="code-line"><span class="token keyword">const</span> foo <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">;</span>',
'</span></code></pre>',
'<my-story2 mdjs-story-name="fooStory"></my-story2>',
'<my-preview2 mdjs-story-name="fooPreviewStory"></my-preview2>',
].join('\n');

View File

@@ -332,7 +332,3 @@ export function myPreset() {
```
</inline-notification>
```js script
```

View File

@@ -26,7 +26,7 @@ export const needsLoader = true;
# Overview
```js script
```js client
import '@mdjs/mdjs-story/define';
import '@mdjs/mdjs-preview/define';
import { html } from '@mdjs/mdjs-story';
@@ -34,10 +34,10 @@ import { html } from '@mdjs/mdjs-story';
Markdown JavaScript (mdjs) is a format that allows you to use JavaScript with Markdown, to create interactive demos. It does so by "annotating" JavaScript that should be executed in Markdown.
To annotate we use a code block with `js script`.
To annotate we use a code block with `js client`.
````md
```js script
```js client
// execute me
```
````
@@ -69,7 +69,7 @@ You can even execute some JavaScript:
<my-el></my-el>
```js script
```js client
import { LitElement, html } from 'https://unpkg.com/lit-element?module';
class MyEl extends LitElement {
@@ -87,7 +87,7 @@ customElements.define('my-el', MyEl);
mdjs comes with some additional helpers you can choose to import:
````md
```js script
```js client
import '@mdjs/mdjs-story/define';
import '@mdjs/mdjs-preview/define';
```

View File

@@ -44,7 +44,7 @@ You can showcase live running code by annotating a code block with `js preview-s
- Settings are ”global” for all Simulators (e.g. changing one will change all)
- Settings can be remembered for other pages / return visits
```js script
```js client
import { html } from '@mdjs/mdjs-preview';
import './assets/demo-element.js';
```
@@ -52,7 +52,7 @@ import './assets/demo-element.js';
## JavaScript Story
````md
```js script
```js client
import { html } from '@mdjs/mdjs-preview';
import './assets/demo-element.js';
```

View File

@@ -28,12 +28,12 @@ export const needsLoader = true;
You can showcase live running code by annotating a code block with `js story`.
```js script
```js client
import { html } from '@mdjs/mdjs-story';
```
````md
```js script
```js client
import { html } from '@mdjs/mdjs-story';
```

145
yarn.lock
View File

@@ -1653,7 +1653,7 @@
"@types/minimatch" "*"
"@types/node" "*"
"@types/hast@*", "@types/hast@^2.0.0", "@types/hast@^2.3.2":
"@types/hast@^2.0.0", "@types/hast@^2.3.2":
version "2.3.4"
resolved "https://registry.yarnpkg.com/@types/hast/-/hast-2.3.4.tgz#8aa5ef92c117d20d974a82bdfb6a648b08c0bafc"
integrity sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==
@@ -1727,7 +1727,7 @@
"@types/koa-compose" "*"
"@types/node" "*"
"@types/mdast@*", "@types/mdast@^3.0.0":
"@types/mdast@^3.0.0":
version "3.0.10"
resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.10.tgz#4724244a82a4598884cbbe9bcfd73dff927ee8af"
integrity sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==
@@ -1769,7 +1769,7 @@
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197"
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
"@types/node@*", "@types/node@>12":
"@types/node@*":
version "18.7.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.1.tgz#352bee64f93117d867d05f7406642a52685cbca6"
integrity sha512-GKX1Qnqxo4S+Z/+Z8KKPLpH282LD7jLHWJcVryOflnsnH+BtSDfieR6ObwBMwpnNws0bUK8GI7z0unQf9bARNQ==
@@ -1804,7 +1804,7 @@
resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-6.0.3.tgz#705bb349e789efa06f43f128cef51240753424cb"
integrity sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==
"@types/prismjs@^1.16.6":
"@types/prismjs@^1.0.0":
version "1.26.0"
resolved "https://registry.yarnpkg.com/@types/prismjs/-/prismjs-1.26.0.tgz#a1c3809b0ad61c62cac6d4e0c56d610c910b7654"
integrity sha512-ZTaqn/qSqUuAq1YwvOFQfVW1AR/oQJlLSZVustdjwI+GZ8kr0MSHBj0tsXPW1EqHubx50gtBEjbPGsdZwQwCjQ==
@@ -2533,11 +2533,6 @@ bluebird@~3.4.1:
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3"
integrity sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==
boolbase@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
@@ -2762,6 +2757,11 @@ character-reference-invalid@^1.0.0:
resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560"
integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==
character-reference-invalid@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz#85c66b041e43b47210faf401278abf808ac45cb9"
integrity sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==
chardet@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
@@ -3127,11 +3127,6 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2:
shebang-command "^2.0.0"
which "^2.0.1"
css-selector-parser@^1.0.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/css-selector-parser/-/css-selector-parser-1.4.1.tgz#03f9cb8a81c3e5ab2c51684557d5aaf6d2569759"
integrity sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g==
csv-generate@^3.4.3:
version "3.4.3"
resolved "https://registry.yarnpkg.com/csv-generate/-/csv-generate-3.4.3.tgz#bc42d943b45aea52afa896874291da4b9108ffff"
@@ -4549,6 +4544,11 @@ is-alphabetical@^1.0.0:
resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d"
integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==
is-alphabetical@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-2.0.1.tgz#01072053ea7c1036df3c7d19a6daaec7f19e789b"
integrity sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==
is-alphanumerical@^1.0.0:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz#7eb9a2431f855f6b1ef1a78e326df515696c4dbf"
@@ -4557,6 +4557,14 @@ is-alphanumerical@^1.0.0:
is-alphabetical "^1.0.0"
is-decimal "^1.0.0"
is-alphanumerical@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz#7c03fbe96e3e931113e57f964b0a368cc2dfd875"
integrity sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==
dependencies:
is-alphabetical "^2.0.0"
is-decimal "^2.0.0"
is-arrayish@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
@@ -4627,6 +4635,11 @@ is-decimal@^1.0.0:
resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5"
integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==
is-decimal@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-2.0.1.tgz#9469d2dc190d0214fd87d78b78caecc0cc14eef7"
integrity sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==
is-docker@^2.0.0, is-docker@^2.1.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa"
@@ -4671,6 +4684,11 @@ is-hexadecimal@^1.0.0:
resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7"
integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==
is-hexadecimal@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz#86b5bf668fca307498d319dfc03289d781a90027"
integrity sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==
is-module@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591"
@@ -6176,13 +6194,6 @@ npm-run-path@^4.0.0:
dependencies:
path-key "^3.0.0"
nth-check@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d"
integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==
dependencies:
boolbase "^1.0.0"
oauth-sign@~0.9.0:
version "0.9.0"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
@@ -6369,6 +6380,20 @@ parse-entities@^2.0.0:
is-decimal "^1.0.0"
is-hexadecimal "^1.0.0"
parse-entities@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-4.0.0.tgz#f67c856d4e3fe19b1a445c3fabe78dcdc1053eeb"
integrity sha512-5nk9Fn03x3rEhGaX1FU6IDwG/k+GxLXlFAkgrbM1asuAFl3BhdQWvASaIsmwWypRNcZKHPYnIuOSfIWEyEQnPQ==
dependencies:
"@types/unist" "^2.0.0"
character-entities "^2.0.0"
character-entities-legacy "^3.0.0"
character-reference-invalid "^2.0.0"
decode-named-character-reference "^1.0.0"
is-alphanumerical "^2.0.0"
is-decimal "^2.0.0"
is-hexadecimal "^2.0.0"
parse-json@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
@@ -6387,6 +6412,11 @@ parse-json@^5.0.0:
json-parse-even-better-errors "^2.3.0"
lines-and-columns "^1.1.6"
parse-numeric-range@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz#7c63b61190d61e4d53a1197f0c83c47bb670ffa3"
integrity sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ==
parse5@^6.0.0, parse5@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b"
@@ -6573,11 +6603,6 @@ prettier@^2.5.1:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==
prismjs@^1.24.1:
version "1.28.0"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.28.0.tgz#0d8f561fa0f7cf6ebca901747828b149147044b6"
integrity sha512-8aaXdYvl1F7iC7Xm1spqSaY/OJBpYW3v+KJ+F17iYxvdc8sfjW194COK5wVhMZX45tGteiBQgdvD/nhxcRwylw==
process-nextick-args@~2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
@@ -6812,6 +6837,16 @@ reduce-flatten@^2.0.0:
resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27"
integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==
refractor@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/refractor/-/refractor-4.7.0.tgz#aad649d7857acdc0d5792f1a7900867256941ac0"
integrity sha512-X3JUDE7nq1csWs7Etg5v7hW10RzF4lYesEn/KDbllocj0itZrs3paO2ZEgYUXrlgXzY3IN+eDRByyIvzcfF9Tg==
dependencies:
"@types/hast" "^2.0.0"
"@types/prismjs" "^1.0.0"
hastscript "^7.0.0"
parse-entities "^4.0.0"
regenerate-unicode-properties@^10.0.1:
version "10.0.1"
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz#7f442732aa7934a3740c779bb9b3340dccc1fb56"
@@ -6887,7 +6922,7 @@ rehype-autolink-headings@^6.1.1:
unified "^10.0.0"
unist-util-visit "^4.0.0"
"rehype-parse@^7 || ^ 8":
rehype-parse@^8.0.2:
version "8.0.4"
resolved "https://registry.yarnpkg.com/rehype-parse/-/rehype-parse-8.0.4.tgz#3d17c9ff16ddfef6bbcc8e6a25a99467b482d688"
integrity sha512-MJJKONunHjoTh4kc3dsM1v3C9kGrrxvA3U8PxZlP2SjH8RNUSrb+lF7Y0KVaUDnGH2QZ5vAn7ulkiajM9ifuqg==
@@ -6897,21 +6932,17 @@ rehype-autolink-headings@^6.1.1:
parse5 "^6.0.0"
unified "^10.0.0"
rehype-prism@^2.1.3:
version "2.1.3"
resolved "https://registry.yarnpkg.com/rehype-prism/-/rehype-prism-2.1.3.tgz#1930234c89b48da6c63728fda7ab2458f763211d"
integrity sha512-s75NcA63NgkiiWeoCnT9sIdBkXtNY4Zyn7AScsVCi0EA6/qPLH5Waqj229bHARDzyZ4s4yFezO6h6LV7G/lQsg==
rehype-prism-plus@^1.4.2:
version "1.4.2"
resolved "https://registry.yarnpkg.com/rehype-prism-plus/-/rehype-prism-plus-1.4.2.tgz#418e3c04811c70c3c2457eda12fb75bb27319443"
integrity sha512-RQNQJIRiejJ6lUh8nm04jEoR0bSsWl2i4R0MXpJtvlRzwTU1D7qdHGT0veCIvuhXPRP4G7Obo4VGwOVAfOtXZw==
dependencies:
"@types/hast" "*"
"@types/mdast" "*"
"@types/node" ">12"
"@types/prismjs" "^1.16.6"
"@types/unist" "*"
prismjs "^1.24.1"
rehype-parse "^7 || ^ 8"
unist-util-is "^4 || ^5"
unist-util-select "^4"
unist-util-visit "^3 || ^4"
hast-util-to-string "^2.0.0"
parse-numeric-range "^1.3.0"
refractor "^4.7.0"
rehype-parse "^8.0.2"
unist-util-filter "^4.0.0"
unist-util-visit "^4.0.0"
rehype-raw@^6.1.1:
version "6.1.1"
@@ -8036,21 +8067,30 @@ unist-builder@^3.0.0:
dependencies:
"@types/unist" "^2.0.0"
unist-util-filter@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/unist-util-filter/-/unist-util-filter-4.0.0.tgz#59bc7960bb2cfd34cc086301090540bdb5580a86"
integrity sha512-H4iTOv2p+n83xjhx7eGFA3zSx7Xcv3Iv9lNQRpXiR8dmm9LtslhyjVlQrZLbkk4jwUrJgc8PPGkOOrfhb76s4Q==
dependencies:
"@types/unist" "^2.0.0"
unist-util-is "^5.0.0"
unist-util-visit-parents "^5.0.0"
unist-util-generated@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-2.0.0.tgz#86fafb77eb6ce9bfa6b663c3f5ad4f8e56a60113"
integrity sha512-TiWE6DVtVe7Ye2QxOVW9kqybs6cZexNwTwSMVgkfjEReqy/xwGpAXb99OxktoWwmL+Z+Epb0Dn8/GNDYP1wnUw==
"unist-util-is@^4 || ^5", unist-util-is@^5.0.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-5.1.1.tgz#e8aece0b102fa9bc097b0fef8f870c496d4a6236"
integrity sha512-F5CZ68eYzuSvJjGhCLPL3cYx45IxkqXSetCcRgUXtbcm50X2L9oOWQlfUfDdAf+6Pd27YDblBfdtmsThXmwpbQ==
unist-util-is@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-4.1.0.tgz#976e5f462a7a5de73d94b706bac1b90671b57797"
integrity sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==
unist-util-is@^5.0.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-5.1.1.tgz#e8aece0b102fa9bc097b0fef8f870c496d4a6236"
integrity sha512-F5CZ68eYzuSvJjGhCLPL3cYx45IxkqXSetCcRgUXtbcm50X2L9oOWQlfUfDdAf+6Pd27YDblBfdtmsThXmwpbQ==
unist-util-position@^4.0.0:
version "4.0.3"
resolved "https://registry.yarnpkg.com/unist-util-position/-/unist-util-position-4.0.3.tgz#5290547b014f6222dff95c48d5c3c13a88fadd07"
@@ -8067,17 +8107,6 @@ unist-util-remove@^3.1.0:
unist-util-is "^5.0.0"
unist-util-visit-parents "^5.0.0"
unist-util-select@^4:
version "4.0.1"
resolved "https://registry.yarnpkg.com/unist-util-select/-/unist-util-select-4.0.1.tgz#d1913d7a0ab4e5d4b6dd1b33b3ea79b9f9645b0b"
integrity sha512-zPozyEo5vr1csbHf1TqlQrnuLVJ0tNMo63og3HrnINh2+OIDAgQpqHVr+0BMw1DIVHJV8ft/e6BZqtvD1Y5enw==
dependencies:
"@types/unist" "^2.0.0"
css-selector-parser "^1.0.0"
nth-check "^2.0.0"
unist-util-is "^5.0.0"
zwitch "^2.0.0"
unist-util-stringify-position@^2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz#cce3bfa1cdf85ba7375d1d5b17bdc4cada9bd9da"
@@ -8117,7 +8146,7 @@ unist-util-visit@^2.0.3:
unist-util-is "^4.0.0"
unist-util-visit-parents "^3.0.0"
"unist-util-visit@^3 || ^4", unist-util-visit@^4.0.0, unist-util-visit@^4.1.0:
unist-util-visit@^4.0.0, unist-util-visit@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-4.1.0.tgz#f41e407a9e94da31594e6b1c9811c51ab0b3d8f5"
integrity sha512-n7lyhFKJfVZ9MnKtqbsqkQEk5P1KShj0+//V7mAcoI6bpbUjh3C/OG8HVD+pBihfh6Ovl01m8dkcv9HNqYajmQ==