docs: update documentation websites (#5882)
* docs: update next.js to 14.0.4 * update docusaurus to v3.0.1 * update packages dependencies * added engines * update lock
This commit is contained in:
1 parent
2d127a4c67
commit
761d2e7a69
10 files changed
+394
-847
No files matched your search
@@ -3,9 +3,6 @@ import bundleAnalyzer from "@next/bundle-analyzer"
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
experimental: {
|
||||
serverActions: true,
|
||||
},
|
||||
async rewrites() {
|
||||
return {
|
||||
fallback: [
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"jsdom": "^22.1.0",
|
||||
"json-schema": "^0.4.0",
|
||||
"json-stringify-pretty-compact": "^4.0.0",
|
||||
"next": "13.4.19",
|
||||
"next": "^14",
|
||||
"next-mdx-remote": "^4.4.1",
|
||||
"openapi-sampler": "^1.3.1",
|
||||
"openapi-types": "^12.1.3",
|
||||
@@ -39,7 +39,7 @@
|
||||
"react": "latest",
|
||||
"react-dom": "latest",
|
||||
"react-instantsearch": "^7.0.1",
|
||||
"react-intersection-observer": "^9.5.2",
|
||||
"react-intersection-observer": "^9.5.3",
|
||||
"react-tooltip": "^5.19.0",
|
||||
"react-transition-group": "^4.4.5",
|
||||
"slugify": "^1.6.6",
|
||||
@@ -52,5 +52,8 @@
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "^13.4.19",
|
||||
"@types/jsdom": "^21.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.17.0"
|
||||
}
|
||||
}
|
||||
@@ -22,10 +22,11 @@
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@cloudinary/react": "^1.11.2",
|
||||
"@cloudinary/url-gen": "^1.9.2",
|
||||
"@docusaurus/core": "3.0.0",
|
||||
"@docusaurus/preset-classic": "3.0.0",
|
||||
"@docusaurus/remark-plugin-npm2yarn": "3.0.0",
|
||||
"@docusaurus/theme-mermaid": "^3.0.0",
|
||||
"@docusaurus/core": "3.0.1",
|
||||
"@docusaurus/preset-classic": "3.0.1",
|
||||
"@docusaurus/remark-plugin-npm2yarn": "3.0.1",
|
||||
"@docusaurus/theme-mermaid": "3.0.1",
|
||||
"@mdx-js/mdx": "3.0.0",
|
||||
"@mdx-js/react": "3",
|
||||
"@medusajs/icons": "^1.0.0",
|
||||
"@svgr/webpack": "6.2.1",
|
||||
@@ -64,9 +65,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-proposal-decorators": "^7.22.15",
|
||||
"@docusaurus/module-type-aliases": "3.0.0",
|
||||
"@docusaurus/tsconfig": "3.0.0",
|
||||
"@docusaurus/types": "3.0.0",
|
||||
"@docusaurus/module-type-aliases": "3.0.1",
|
||||
"@docusaurus/tsconfig": "3.0.1",
|
||||
"@docusaurus/types": "3.0.1",
|
||||
"@types/react": "^18.2.0",
|
||||
"@types/react-dom": "^18.2.0",
|
||||
"@types/react-transition-group": "^4.4.6",
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
import React, { memo, useMemo } from "react"
|
||||
import {
|
||||
DocSidebarItemsExpandedStateProvider,
|
||||
isActiveSidebarItem,
|
||||
} from "@docusaurus/theme-common/internal"
|
||||
import DocSidebarItem from "@theme/DocSidebarItem"
|
||||
import type { PropSidebarItem } from "@docusaurus/plugin-content-docs"
|
||||
|
||||
import type { Props } from "@theme/DocSidebarItems"
|
||||
|
||||
function DocSidebarItems({ items, ...props }: Props): JSX.Element {
|
||||
// This acts as a fix to a bug in docusaurus which should be part
|
||||
// of an upcoming release.
|
||||
function isVisibleSidebarItem(
|
||||
item: PropSidebarItem,
|
||||
activePath: string
|
||||
): boolean {
|
||||
switch (item.type) {
|
||||
case "category":
|
||||
return (
|
||||
isActiveSidebarItem(item, activePath) ||
|
||||
item.items.some((subItem) =>
|
||||
isVisibleSidebarItem(subItem, activePath)
|
||||
)
|
||||
)
|
||||
case "link":
|
||||
// An unlisted item remains visible if it is active
|
||||
return !item.unlisted || isActiveSidebarItem(item, activePath)
|
||||
default:
|
||||
return true
|
||||
}
|
||||
}
|
||||
function useVisibleSidebarItems(
|
||||
items: readonly PropSidebarItem[],
|
||||
activePath: string
|
||||
): PropSidebarItem[] {
|
||||
return useMemo(
|
||||
() => items.filter((item) => isVisibleSidebarItem(item, activePath)),
|
||||
[items, activePath]
|
||||
)
|
||||
}
|
||||
|
||||
const visibleItems = useVisibleSidebarItems(items, props.activePath)
|
||||
return (
|
||||
<DocSidebarItemsExpandedStateProvider>
|
||||
{visibleItems.map((item, index) => (
|
||||
<DocSidebarItem key={index} item={item} index={index} {...props} />
|
||||
))}
|
||||
</DocSidebarItemsExpandedStateProvider>
|
||||
)
|
||||
}
|
||||
|
||||
// Optimize sidebar at each "level"
|
||||
export default memo(DocSidebarItems)
|
||||
@@ -30,7 +30,7 @@
|
||||
"docs-ui": "*",
|
||||
"eslint-config-docs": "*",
|
||||
"mdast-util-toc": "^7.0.0",
|
||||
"next": "13.4.13",
|
||||
"next": "^14",
|
||||
"next-contentlayer": "^0.3.4",
|
||||
"next-themes": "^0.2.1",
|
||||
"postcss": "8.4.27",
|
||||
@@ -47,5 +47,8 @@
|
||||
"eslint": "^8.49.0",
|
||||
"react-docgen": "^7.0.1",
|
||||
"ts-node": "^10.9.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.17.0"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user