diff --git a/apps/docs/features/docs/MdxBase.shared.tsx b/apps/docs/features/docs/MdxBase.shared.tsx index 7c82b3a5d567c..3502b92392d98 100644 --- a/apps/docs/features/docs/MdxBase.shared.tsx +++ b/apps/docs/features/docs/MdxBase.shared.tsx @@ -96,6 +96,13 @@ const components = { ), pre: CodeBlock, + /** + * Force inline code tags to go sync, this prevents Heading anchor resolution fail due to + * our CodeBlock component being async. We need to find a better solution for more future + * proof MDX rendering. Definitely improving the anchors utility in the ui/Heading component + * plus having a more resilient highlighting strategy. + */ + code: (props: any) => {props.children}, Price, } diff --git a/apps/studio/.github/eslint-rule-baselines.json b/apps/studio/.github/eslint-rule-baselines.json index 5903ab1be2386..0dd5b3fe2f12b 100644 --- a/apps/studio/.github/eslint-rule-baselines.json +++ b/apps/studio/.github/eslint-rule-baselines.json @@ -3,9 +3,9 @@ "react-hooks/exhaustive-deps": 208, "import/no-anonymous-default-export": 57, "@tanstack/query/exhaustive-deps": 13, - "@typescript-eslint/no-explicit-any": 1214, + "@typescript-eslint/no-explicit-any": 1207, "no-restricted-imports": 59, - "no-restricted-exports": 297, + "no-restricted-exports": 296, "react/no-unstable-nested-components": 69 }, "ruleFiles": { @@ -636,7 +636,6 @@ "data/materialized-views/materialized-views-query.ts": 1, "data/network-restrictions/network-restrictions-query.ts": 3, "data/notifications/keys.ts": 1, - "data/notifications/notifications-v2-query.ts": 2, "data/oauth-secrets/client-secret-create-mutation.ts": 2, "data/open-api/api-spec-query.ts": 8, "data/organization-members/organization-roles-query.ts": 1, @@ -683,7 +682,7 @@ "hooks/ui/useClickedOutside.ts": 2, "hooks/ui/useFlag.ts": 1, "hooks/useStaticEffectEvent.ts": 1, - "instrumentation-client.ts": 2, + "instrumentation-client.ts": 3, "lib/ai/generate-assistant-response.ts": 2, "lib/ai/model.ts": 2, "lib/ai/model.utils.ts": 4, @@ -721,13 +720,11 @@ "pages/project/[ref]/settings/log-drains.tsx": 1, "pages/project/[ref]/storage/files/buckets/[bucketId].tsx": 1, "state/ai-assistant-state.tsx": 4, - "state/editor-panel-state.tsx": 4, "state/role-impersonation-state.tsx": 1, "state/sql-editor-v2.ts": 5, - "state/storage-explorer.tsx": 16, + "state/storage-explorer.tsx": 15, "state/table-editor-table.tsx": 9, "state/table-editor.tsx": 5, - "state/tabs.tsx": 1, "tests/lib/custom-render.tsx": 1, "tests/setup/polyfills.ts": 3, "tests/vitestSetup.ts": 1, @@ -975,7 +972,6 @@ "components/interfaces/Settings/Logs/RecentQueriesItem.tsx": 1, "components/interfaces/Settings/Logs/UpgradePrompt.tsx": 1, "components/interfaces/SignIn/PasswordConditionsHelper.tsx": 1, - "components/interfaces/SignIn/ResetPasswordForm.tsx": 1, "components/interfaces/Storage/StorageBucketsError.tsx": 1, "components/interfaces/Storage/StoragePolicies/StoragePoliciesEditPolicyModal.tsx": 1, "components/interfaces/Storage/StoragePolicies/StoragePoliciesEditor.tsx": 1, diff --git a/apps/studio/components/interfaces/Sidebar.tsx b/apps/studio/components/interfaces/Sidebar.tsx index 2df6201e6bcf6..d5686415597bc 100644 --- a/apps/studio/components/interfaces/Sidebar.tsx +++ b/apps/studio/components/interfaces/Sidebar.tsx @@ -81,6 +81,7 @@ export const Sidebar = ({ className, ...props }: SidebarProps) => { {!hideSideBar && ( - inline ? ( + code: ({ className, ...props }) => + className ? ( + + ) : ( - ) : ( - ), pre: ({ node, ...props }) => (
   ),
   p: ({ node, ...props }) => 

, - ul: ({ node, ordered, ...props }) =>

    , + ul: ({ node, ...props }) =>
      , ol: ({ node, ...props }) =>
        , } diff --git a/apps/www/components/Sections/FeaturesSection.tsx b/apps/www/components/Sections/FeaturesSection.tsx index 22d801188bc89..d4a515abdc385 100644 --- a/apps/www/components/Sections/FeaturesSection.tsx +++ b/apps/www/components/Sections/FeaturesSection.tsx @@ -2,7 +2,7 @@ import { LazyMotion, domAnimation, m, useInView } from 'framer-motion' import { ArrowUpRight } from 'lucide-react' import Link from 'next/link' import { ReactNode, useRef } from 'react' -import { ReactMarkdown } from 'react-markdown/lib/react-markdown' +import ReactMarkdown from 'react-markdown' import { Button, cn } from 'ui' import SectionContainer from '~/components/Layouts/SectionContainer' import { INITIAL_BOTTOM, getAnimation } from '~/lib/animations' diff --git a/apps/www/components/Sections/ParagraphSection.tsx b/apps/www/components/Sections/ParagraphSection.tsx index 067997fa61fa7..8e354846ab780 100644 --- a/apps/www/components/Sections/ParagraphSection.tsx +++ b/apps/www/components/Sections/ParagraphSection.tsx @@ -1,7 +1,7 @@ import { ArrowUpRight } from 'lucide-react' import Link from 'next/link' import { ReactNode } from 'react' -import { ReactMarkdown } from 'react-markdown/lib/react-markdown' +import ReactMarkdown from 'react-markdown' import { Button, cn } from 'ui' import SectionContainer from '~/components/Layouts/SectionContainer' diff --git a/apps/www/package.json b/apps/www/package.json index be6323d3a36ae..6df69f53cf071 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -54,8 +54,8 @@ "gsap": "^3.13.0", "icons": "workspace:*", "lucide-react": "*", - "marketing": "workspace:*", "markdown-toc": "^1.2.0", + "marketing": "workspace:*", "mdast-util-from-markdown": "^2.0.2", "mdast-util-gfm": "^2.0.2", "mdast-util-mdx": "^2.0.1", @@ -74,14 +74,14 @@ "react-copy-to-clipboard": "^5.1.0", "react-countdown": "^2.3.5", "react-dom": "catalog:", - "react-markdown": "^8.0.3", + "react-markdown": "^9.0.1", "react-syntax-highlighter": "^15.6.6", "react-transition-group": "^4.4.1", "react-use": "^17.4.0", "recharts": "catalog:", "rehype-slug": "^5.1.0", "remark": "^15.0.1", - "remark-gfm": "^4.0.0", + "remark-gfm": "^4.0.1", "shared-data": "workspace:*", "swiper": "^12.1.2", "typed.js": "^2.0.16", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c425f8e4bb805..627d2620ec919 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1725,8 +1725,8 @@ importers: specifier: 'catalog:' version: 18.3.1(react@18.3.1) react-markdown: - specifier: ^8.0.3 - version: 8.0.7(@types/react@18.3.3)(react@18.3.1)(supports-color@8.1.1) + specifier: ^9.0.1 + version: 9.0.1(@types/react@18.3.3)(react@18.3.1)(supports-color@8.1.1) react-syntax-highlighter: specifier: ^15.6.6 version: 15.6.6(react@18.3.1) @@ -1746,7 +1746,7 @@ importers: specifier: ^15.0.1 version: 15.0.1(supports-color@8.1.1) remark-gfm: - specifier: ^4.0.0 + specifier: ^4.0.1 version: 4.0.1(supports-color@8.1.1) shared-data: specifier: workspace:* @@ -17900,6 +17900,7 @@ packages: unplugin-vue-router@0.15.0: resolution: {integrity: sha512-PyGehCjd9Ny9h+Uer4McbBjjib3lHihcyUEILa7pHKl6+rh8N7sFyw4ZkV+N30Oq2zmIUG7iKs3qpL0r+gXAaQ==} + deprecated: 'Merged into vuejs/router. Migrate: https://router.vuejs.org/guide/migration/v4-to-v5.html' peerDependencies: '@vue/compiler-sfc': ^3.5.17 vue-router: ^4.5.1 @@ -35051,7 +35052,7 @@ snapshots: remark-parse: 11.0.0(supports-color@8.1.1) remark-rehype: 11.1.1 unified: 11.0.5 - unist-util-visit: 5.0.0 + unist-util-visit: 5.1.0 vfile: 6.0.3 transitivePeerDependencies: - supports-color