Skip to content

Commit

Permalink
chore(website): Update to Docusaurus 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy351 committed Dec 7, 2024
1 parent 63e2af5 commit f1e46f8
Show file tree
Hide file tree
Showing 9 changed files with 2,969 additions and 1,641 deletions.
4,533 changes: 2,941 additions & 1,592 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions website/babel.config.js

This file was deleted.

6 changes: 4 additions & 2 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ export default {
gitRefName: commitRef
}
],
"./plugins/lodash-webpack-plugin",
"./plugins/lint-rules-metadata-plugin"
]
],
future: {
experimental_faster: true
}
} satisfies Config;
30 changes: 13 additions & 17 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@
"@algolia/client-search": "^5.12.0",
"@babel/core": "^7.24.3",
"@babel/traverse": "^7.24.1",
"@docusaurus/core": "3.5.2",
"@docusaurus/plugin-content-docs": "3.5.2",
"@docusaurus/plugin-ideal-image": "3.5.2",
"@docusaurus/preset-classic": "3.5.2",
"@docusaurus/theme-classic": "3.5.2",
"@docusaurus/theme-common": "3.5.2",
"@docusaurus/core": "3.6.3",
"@docusaurus/faster": "^3.6.3",
"@docusaurus/plugin-content-docs": "3.6.3",
"@docusaurus/plugin-ideal-image": "3.6.3",
"@docusaurus/preset-classic": "3.6.3",
"@docusaurus/theme-classic": "3.6.3",
"@docusaurus/theme-common": "3.6.3",
"@mdx-js/react": "^3.0.1",
"clsx": "^2.1.0",
"codemirror": "^5.64.0",
"comlink": "^4.3.1",
"docusaurus-plugin-sass": "^0.2.5",
"docusaurus-plugin-sass": "^0.2.6",
"globby": "^11.0.2",
"immer": "^9.0.15",
"lodash": "^4.17.21",
"magic-string": "^0.30.8",
"prism-react-renderer": "^2.3.1",
"prop-types": "^15.8.1",
Expand All @@ -63,13 +63,12 @@
"use-immer": "^0.7.0"
},
"devDependencies": {
"@docusaurus/mdx-loader": "^3.5.2",
"@docusaurus/module-type-aliases": "3.5.2",
"@docusaurus/tsconfig": "^3.5.2",
"@docusaurus/types": "^3.5.2",
"@docusaurus/mdx-loader": "^3.6.3",
"@docusaurus/module-type-aliases": "3.6.3",
"@docusaurus/tsconfig": "^3.6.3",
"@docusaurus/types": "^3.6.3",
"@types/codemirror": "^5.60.5",
"@types/js-yaml": "^4.0.5",
"@types/lodash": "^4.14.185",
"@types/mdast": "^4.0.3",
"@types/node": "^18.7.18",
"@types/react": "^18.0.20",
Expand All @@ -78,10 +77,8 @@
"@types/systemjs": "^6.1.1",
"@types/unist": "^3.0.2",
"@types/webpack-env": "^1.18.0",
"babel-plugin-lodash": "^3.3.4",
"docusaurus-plugin-typedoc-api": "^4.4.0",
"js-yaml": "^4.1.0",
"lodash-webpack-plugin": "^0.11.6",
"raw-loader": "^4.0.2",
"read-pkg": "^5.2.0",
"resolve-pkg": "^2.0.0",
Expand All @@ -90,7 +87,6 @@
"sass-loader": "^14.1.1",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"unified": "^11.0.4",
"webpack": "^5.76.0"
"unified": "^11.0.4"
}
}
15 changes: 0 additions & 15 deletions website/plugins/lodash-webpack-plugin/index.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import EnvironmentSelect from "./EnvironmentSelect";
import ProgressBar from "./ProgressBar";
import styles from "./styles.module.scss";
import CodeMirrorEditor from "../CodeMirrorEditor";
import { noop } from "lodash";
import { EditorConfiguration } from "codemirror";

try {
Expand Down Expand Up @@ -36,7 +35,7 @@ export default function PreviewPane() {
className={styles.previewPaneEditor}
value={content}
options={EDITOR_OPTIONS}
onBeforeChange={noop}
onBeforeChange={() => {}}
/>
{updating && (
<div className={styles.previewPaneProgressBar}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Draft } from "immer";
import { noop } from "lodash";
import React, { createContext, ReactNode, useContext, useMemo } from "react";
import { useImmer } from "use-immer";

Expand All @@ -20,7 +19,7 @@ export const PreviewContext = createContext<{
warnings: [],
errors: []
},
updateValue: noop
updateValue() {}
});

export function usePreviewContext() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { groupBy } from "lodash";
import { sep } from "@site/src/utils/path";
import { Entry, EntryType, File, Directory } from "./types";
import { DIRECTORY_PLACEHOLDER } from "../../constants";

function doGenerateEntries(paths: readonly string[], prefix: string): Entry[] {
const { "": files = [], ...dirs } = groupBy(paths, (path) => {
const index = path.indexOf(sep);
return index === -1 ? "" : path.substring(0, index);
});
const { "": files = [], ...dirs } = paths.reduce(
(acc, path) => {
const index = path.indexOf(sep);
const key = index === -1 ? "" : path.substring(0, index);
return { ...acc, [key]: [...(acc[key] || []), path] };
},
{} as Record<string, string[]>
);

return [
...Object.entries(dirs).map(([name, children]): Directory => {
Expand Down
3 changes: 1 addition & 2 deletions website/src/modules/playground/context.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Draft } from "immer";
import { createContext } from "react";
import { noop } from "lodash";

export interface PlaygroundContextValue {
activePath?: string;
Expand All @@ -18,5 +17,5 @@ export const PlaygroundContext = createContext<{
component: "",
environment: ""
},
updateValue: noop
updateValue() {}
});

0 comments on commit f1e46f8

Please sign in to comment.