Upgrade frontend toolchain to latest majors
Bump React 19.2, Relay 21, React Router 8, Vite 8 with @vitejs/plugin-react 6, ESLint 10, GraphQL 17, TypeScript 6, @types/node 24, and Tailwind 4.3 across the workspaces. vite-plugin-react 6 (Vite 8) no longer runs Babel, so the Relay tagged-template transform now runs through @rolldown/plugin-babel in the console and trust Vite configs. Relay 21 ships first-party types and enables the ambiguous-alias check by default; disable that flag to preserve existing queries and add explicit usePreloadedQuery type arguments where the new types no longer infer the operation. TypeScript 6 deprecations and stricter inference are addressed in tsconfigs and call sites. Keep n8n-node on ESLint 9 and eslint-plugin-react on 7.37.5, the newest releases compatible with their toolchains. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -81,7 +81,7 @@ export function Th({
|
||||
);
|
||||
}
|
||||
|
||||
const TrContext = createContext({} as { to?: string });
|
||||
const TrContext = createContext<{ to?: string }>({});
|
||||
|
||||
export function Tr({
|
||||
to,
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
import { objectKeys } from "@probo/helpers";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
import type { ComponentType } from "react";
|
||||
|
||||
import * as icons from "./Atoms/Icons";
|
||||
|
||||
@@ -183,7 +184,7 @@ export const Icons: Story = {
|
||||
<div className="flex flex-wrap gap-4">
|
||||
{objectKeys(icons).map((k) => {
|
||||
/* eslint import-x/namespace: ['error', { allowComputed: true }] */
|
||||
const IconComponent = icons[k];
|
||||
const IconComponent = icons[k] as ComponentType;
|
||||
return (
|
||||
<button
|
||||
title={k}
|
||||
|
||||
@@ -36,8 +36,8 @@ type Props = PropsWithChildren<{
|
||||
sidebar?: ReactNode;
|
||||
}>;
|
||||
|
||||
const LayoutContext = createContext({
|
||||
setDrawer: (() => {}) as (v: boolean) => void,
|
||||
const LayoutContext = createContext<{ setDrawer: (v: boolean) => void }>({
|
||||
setDrawer: () => {},
|
||||
});
|
||||
|
||||
export function Layout({
|
||||
|
||||
@@ -38,12 +38,14 @@ type State = {
|
||||
onConfirm: () => void | Promise<unknown>;
|
||||
};
|
||||
|
||||
const initialConfirmState: State = {
|
||||
message: null,
|
||||
onConfirm: () => Promise.resolve(),
|
||||
};
|
||||
|
||||
const useConfirmStore = create(
|
||||
combine(
|
||||
{
|
||||
message: null,
|
||||
onConfirm: () => Promise.resolve(),
|
||||
} as State,
|
||||
initialConfirmState,
|
||||
set => ({
|
||||
open: (props: State) => {
|
||||
set(props);
|
||||
|
||||
@@ -25,22 +25,20 @@ export default {
|
||||
|
||||
type Story = StoryObj<typeof MeasureImplementation>;
|
||||
|
||||
type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED" | "UNKNOWN" | "NOT_IMPLEMENTED";
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
measures: [
|
||||
...times(15, () => ({
|
||||
state: "IMPLEMENTED" as MeasureState,
|
||||
state: "IMPLEMENTED" as const,
|
||||
})),
|
||||
...times(10, () => ({
|
||||
state: "IN_PROGRESS" as MeasureState,
|
||||
state: "IN_PROGRESS" as const,
|
||||
})),
|
||||
...times(5, () => ({
|
||||
state: "NOT_APPLICABLE" as MeasureState,
|
||||
state: "NOT_APPLICABLE" as const,
|
||||
})),
|
||||
...times(5, () => ({
|
||||
state: "NOT_STARTED" as MeasureState,
|
||||
state: "NOT_STARTED" as const,
|
||||
})),
|
||||
],
|
||||
},
|
||||
|
||||
@@ -131,7 +131,7 @@ export const SlashCommandExtension = Extension.create<object, SlashCommandStorag
|
||||
"data-empty": isEmpty
|
||||
? "true"
|
||||
: "false",
|
||||
} as Record<string, string>),
|
||||
}),
|
||||
]);
|
||||
} catch {
|
||||
deactivateSlashCommand(storage);
|
||||
|
||||
@@ -14,5 +14,5 @@ export function cellDomElement(
|
||||
while (el && !(el instanceof HTMLTableCellElement)) {
|
||||
el = (el as HTMLElement).parentElement;
|
||||
}
|
||||
return el as HTMLElement | null;
|
||||
return el;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user