From a12d1ee567e47ae288ea3bfaf66eb8c179ffc795 Mon Sep 17 00:00:00 2001 From: Gwendal Leclerc Date: Sat, 13 Dec 2025 00:52:18 +0100 Subject: [PATCH 1/3] fix: make v1 UI working on node 25 --- .github/workflows/main.yml | 4 +- .nvmrc | 2 +- client/components/History.scss | 2 +- client/components/Mermaid.tsx | 3 +- .../components/MockEditor/KeyValueEditor.tsx | 12 +- .../MockEditor/MockStaticResponseEditor.tsx | 23 +- client/components/Mocks.scss | 2 +- client/components/Navbar.scss | 3 + client/components/Navbar.tsx | 4 +- client/components/Sidebar.scss | 1 + client/components/Visualize.scss | 2 +- client/globals.d.ts | 5 +- client/modules/epics.ts | 2 +- client/modules/utils.ts | 23 +- client/use-lodash-debounce.d.ts | 1 + package.json | 20 +- tsconfig.json | 4 +- yarn.lock | 10281 +++++++--------- 18 files changed, 4418 insertions(+), 5976 deletions(-) create mode 100644 client/use-lodash-debounce.d.ts diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 05861f4..7c25ebf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -76,7 +76,7 @@ jobs: - uses: actions/checkout@v4 - id: extract_ref - run: echo ::set-output name=GIT_REF::$(echo ${GITHUB_REF##*/}) + run: echo "GIT_REF=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT - uses: actions/setup-node@v4 with: @@ -111,7 +111,7 @@ jobs: - uses: actions/checkout@v4 - id: extract_ref - run: echo ::set-output name=GIT_REF::$(echo ${GITHUB_REF##*/}) + run: echo "GIT_REF=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT - uses: actions/download-artifact@v4 with: diff --git a/.nvmrc b/.nvmrc index b6a7d89..7273c0f 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 +25 diff --git a/client/components/History.scss b/client/components/History.scss index e904d9f..dbaa4de 100644 --- a/client/components/History.scss +++ b/client/components/History.scss @@ -1,4 +1,4 @@ -@import "../variables.scss"; +@use "../variables.scss" as *; #root .history { padding: 1em 5% 0; diff --git a/client/components/Mermaid.tsx b/client/components/Mermaid.tsx index 53a1481..d03636b 100644 --- a/client/components/Mermaid.tsx +++ b/client/components/Mermaid.tsx @@ -34,7 +34,8 @@ export const Mermaid = ({ } catch (e) { setDiagram(""); console.error(e); - setError(e.str || `${e}`); + const error = e as { str?: string }; + setError(error.str || `${e}`); } }, 1); }, [name, chart]); diff --git a/client/components/MockEditor/KeyValueEditor.tsx b/client/components/MockEditor/KeyValueEditor.tsx index 9c61e3d..ea04f3c 100644 --- a/client/components/MockEditor/KeyValueEditor.tsx +++ b/client/components/MockEditor/KeyValueEditor.tsx @@ -1,9 +1,9 @@ -import * as React from "react"; import { MinusCircleOutlined, PlusOutlined } from "@ant-design/icons"; import { Button, Form, Input, Select, Space } from "antd"; -import { defaultMatcher } from "../../modules/types"; -import { positiveMatchers, negativeMatchers, unaryMatchers } from "./utils"; import { FormListFieldData, FormListOperation } from "antd/lib/form/FormList"; +import * as React from "react"; +import { defaultMatcher } from "../../modules/types"; +import { negativeMatchers, positiveMatchers, unaryMatchers } from "./utils"; export interface KeyValueEditorProps { name: string[]; @@ -49,7 +49,7 @@ export const KeyValueEditorEngine = ({ @@ -58,7 +58,7 @@ export const KeyValueEditorEngine = ({