Skip to content

Commit 01018b1

Browse files
committed
fixup!
1 parent 5d511df commit 01018b1

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

apps/site/components/Downloads/Release/ReleaseCodeBox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ import {
1818
import type { DownloadSnippet } from '#site/types/download';
1919
import type { ReleaseContextType } from '#site/types/release';
2020
import { INSTALL_METHODS } from '#site/util/download';
21-
import { createEvaluator } from '#site/util/evaluator';
21+
import createInterpreter from '#site/util/interpreter';
2222

2323
// Creates a minimal JavaScript interpreter for parsing the JavaScript code from the snippets
2424
// Note: that the code runs inside a sandboxed environment and cannot interact with any code outside of the sandbox
2525
// It also does not have access to any Global or Window objects, nor it can execute code on the end-user's browser
2626
// It also only allows a return statement for a string and it forces the return value to also be a string and only be used
2727
// by Shiki to render the highlighted syntax. Hence XSS attacks or JavaScript injections are not possible.
28-
const interpreter = createEvaluator({}, 'script');
28+
const interpreter = createInterpreter({}, 'script');
2929

3030
/**
3131
* Parses a snippet string using the interpreter with the given release context

apps/site/mdx/compiler.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { Fragment, jsx, jsxs } from 'react/jsx-runtime';
55
import { matter } from 'vfile-matter';
66

77
import { rehypePlugins, remarkPlugins } from './plugins.mjs';
8-
import { createEvaluator } from '../util/evaluator';
98
import { createGitHubSlugger } from '../util/github';
9+
import createInterpreter from '../util/interpreter';
1010

1111
// Defines a JSX Fragment and JSX Runtime for the MDX Compiler
1212
const reactRuntime = { Fragment, jsx, jsxs };
@@ -47,7 +47,7 @@ export default async function compile(
4747
format: fileExtension,
4848
});
4949

50-
const interpreter = createEvaluator({
50+
const interpreter = createInterpreter({
5151
...components,
5252
'react/jsx-runtime': reactRuntime,
5353
});

apps/site/mdx/plugins.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import rehypeSlug from 'rehype-slug';
77
import remarkGfm from 'remark-gfm';
88
import readingTime from 'remark-reading-time';
99

10-
import remarkTableTitles from './util/table';
10+
import remarkTableTitles from '../util/table';
1111

1212
/**
1313
* Provides all our Rehype Plugins that are used within MDX
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import Sval from 'sval';
44

5-
export const createEvaluator = (
5+
export default (
66
dependencies: Record<string, unknown> = {},
77
mode: 'module' | 'script' = 'module'
88
) => {

0 commit comments

Comments
 (0)