mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-02 21:06:52 +03:00
Update more web deps and reformat with updated prettier (#24358)
* update date-fns, i18next, react-dropzone, react-markdown and @types/node react-i18next 17 peers `i18next >= 26.2.0`, so the two move together. react-day-picker already depends on date-fns 4, so date-fns now dedupes to a single copy. react-dropzone 20 declares `node >=22` in `engines`, but npm only warns on Node 20 and nothing in the build needs Node 22. * update js-yaml, @hookform/resolvers and prettier js-yaml 5 has no default export, so `DictAsYamlField` imports `dump`, `load` and `YAMLException` by name. @hookform/resolvers 5 types `zodResolver` with the schema's input and output types separately, and fields with defaults are optional on input, so the zone and classification model forms pass both types to `useForm`. zod's range now starts at 3.25, which resolvers 5 requires. * format with prettier 3.9
This commit is contained in:
@@ -123,8 +123,7 @@ function getDefaultFilter(
|
||||
if (!schema) return undefined;
|
||||
const sectionSchema = extractSectionSchema(schema, sectionPath, "camera");
|
||||
const filtersSchema = sectionSchema?.properties?.filters as
|
||||
| RJSFSchema
|
||||
| undefined;
|
||||
RJSFSchema | undefined;
|
||||
if (!filtersSchema) return undefined;
|
||||
|
||||
// An optional map (`dict[str, X] | None`, as `audio.filters` is declared)
|
||||
@@ -965,8 +964,7 @@ export function useProfileSectionDeltas(
|
||||
|
||||
const profileSection = (
|
||||
cameraConfig.profiles?.[profileName] as
|
||||
| Record<string, unknown>
|
||||
| undefined
|
||||
Record<string, unknown> | undefined
|
||||
)?.[sectionPath];
|
||||
if (profileSection == null) return [];
|
||||
|
||||
|
||||
@@ -43,10 +43,10 @@ export default function useStats(stats: FrigateStats | undefined) {
|
||||
const { payload: replayJob } = useJobStatus("debug_replay", isAdmin);
|
||||
const replayActive = Boolean(
|
||||
isAdmin &&
|
||||
replayJob &&
|
||||
(replayJob.status === "queued" ||
|
||||
replayJob.status === "running" ||
|
||||
replayJob.status === "success"),
|
||||
replayJob &&
|
||||
(replayJob.status === "queued" ||
|
||||
replayJob.status === "running" ||
|
||||
replayJob.status === "success"),
|
||||
);
|
||||
|
||||
const memoizedStats = useDeepMemo(stats);
|
||||
|
||||
Reference in New Issue
Block a user