fix: delete `RemoteFormAllIssue`, add `path` to `RemoteFormIssue` (#14864)
authorRich Harris <richard.a.harris@gmail.com>
Thu, 30 Oct 2025 22:48:52 +0000 (23:48 +0100)
committerGitHub <noreply@github.com>
Thu, 30 Oct 2025 22:48:52 +0000 (23:48 +0100)
* fix: delete `RemoteFormAllIssue`, add `path` to `RemoteFormIssue`

* regenerate

.changeset/twenty-papers-unite.md [new file with mode: 0644]
packages/kit/src/exports/public.d.ts
packages/kit/src/runtime/form-utils.js
packages/kit/types/index.d.ts

diff --git a/.changeset/twenty-papers-unite.md b/.changeset/twenty-papers-unite.md
new file mode 100644 (file)
index 0000000..cdbcf60
--- /dev/null
@@ -0,0 +1,5 @@
+---
+'@sveltejs/kit': patch
+---
+
+fix: delete `RemoteFormAllIssue`, add `path` to `RemoteFormIssue`
index 1ef3333103262798c9b02c7186af859dcc2cfdb4..3516689dce67248c1715089ce5d58ffc2e2b4674 100644 (file)
@@ -1911,12 +1911,12 @@ export type RemoteFormField<Value extends RemoteFormFieldValue> = RemoteFormFiel
 
 type RemoteFormFieldContainer<Value> = RemoteFormFieldMethods<Value> & {
        /** Validation issues belonging to this or any of the fields that belong to it, if any */
-       allIssues(): RemoteFormAllIssue[] | undefined;
+       allIssues(): RemoteFormIssue[] | undefined;
 };
 
 type UnknownField<Value> = RemoteFormFieldMethods<Value> & {
        /** Validation issues belonging to this or any of the fields that belong to it, if any */
-       allIssues(): RemoteFormAllIssue[] | undefined;
+       allIssues(): RemoteFormIssue[] | undefined;
        /**
         * Returns an object that can be spread onto an input element with the correct type attribute,
         * aria-invalid attribute if the field is invalid, and appropriate value/checked property getters/setters.
@@ -1963,9 +1963,6 @@ export interface RemoteFormInput {
 
 export interface RemoteFormIssue {
        message: string;
-}
-
-export interface RemoteFormAllIssue extends RemoteFormIssue {
        path: Array<string | number>;
 }
 
index 26468a4dd005c3cdac8ae2ba435c9bfc9f5f6048..c879fa2be5e29f9b4c9b91ee8b3c883c4522b95d 100644 (file)
@@ -255,6 +255,7 @@ export function create_field_proxy(target, get_input, set_input, get_issues, pat
                                        return all_issues
                                                ?.filter((issue) => issue.name === key)
                                                ?.map((issue) => ({
+                                                       path: issue.path,
                                                        message: issue.message
                                                }));
                                };
index 9705e4a0b9bdb24287d8631be5b88ce53db0cb37..0ddf7ca088449646ca6461c351f23b17a92c0e77 100644 (file)
@@ -1887,12 +1887,12 @@ declare module '@sveltejs/kit' {
 
        type RemoteFormFieldContainer<Value> = RemoteFormFieldMethods<Value> & {
                /** Validation issues belonging to this or any of the fields that belong to it, if any */
-               allIssues(): RemoteFormAllIssue[] | undefined;
+               allIssues(): RemoteFormIssue[] | undefined;
        };
 
        type UnknownField<Value> = RemoteFormFieldMethods<Value> & {
                /** Validation issues belonging to this or any of the fields that belong to it, if any */
-               allIssues(): RemoteFormAllIssue[] | undefined;
+               allIssues(): RemoteFormIssue[] | undefined;
                /**
                 * Returns an object that can be spread onto an input element with the correct type attribute,
                 * aria-invalid attribute if the field is invalid, and appropriate value/checked property getters/setters.
@@ -1939,9 +1939,6 @@ declare module '@sveltejs/kit' {
 
        export interface RemoteFormIssue {
                message: string;
-       }
-
-       export interface RemoteFormAllIssue extends RemoteFormIssue {
                path: Array<string | number>;
        }