{"record":{"id":"cbc4de4df0b4ab20","repo":"sveltejs/kit","slug":"the-update-invalidateall-option-has-been-de","errorCode":null,"errorMessage":"The `update({ invalidateAll })` option has been deprecated in favour of `update({ refreshAll })`","messagePattern":"The `update\\((.+?)\\)` option has been deprecated in favour of `update\\((.+?)\\)`","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/kit/src/runtime/app/forms/client.js","lineNumber":76,"sourceCode":"\n\t/**\n\t * @param {{\n\t *   result: ActionResult;\n\t *   reset?: boolean;\n\t *   refreshAll?: boolean;\n\t *   invalidateAll?: boolean;\n\t *   navigate?: boolean;\n\t * }} opts\n\t */\n\tconst fallback_callback = async ({\n\t\tresult,\n\t\treset = true,\n\t\trefreshAll: should_refresh_all,\n\t\tinvalidateAll: deprecated_invalidate_all,\n\t\tnavigate = true\n\t}) => {\n\t\tif (DEV && deprecated_invalidate_all !== undefined) {\n\t\t\tconsole.warn(\n\t\t\t\t'The `update({ invalidateAll })` option has been deprecated in favour of `update({ refreshAll })`'\n\t\t\t);\n\t\t}\n\n\t\tshould_refresh_all ??= deprecated_invalidate_all ?? result.type === 'success';\n\n\t\tif (result.type === 'success' && reset) {\n\t\t\t// We call reset from the prototype to avoid DOM clobbering\n\t\t\tHTMLFormElement.prototype.reset.call(form_element);\n\t\t}\n\n\t\tconst destination =\n\t\t\tnavigate && result.type !== 'redirect' && !is_current_location(result.location)\n\t\t\t\t? result.location\n\t\t\t\t: undefined;\n\n\t\tif (destination === undefined) {\n\t\t\tif (should_refresh_all && result.type !== 'redirect') {","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/sveltejs/kit/blob/03f1687fe612ce3d2d9131139b5b188d9cf90c64/packages/kit/src/runtime/app/forms/client.js#L58-L94","documentation":"SvelteKit deprecated the `invalidateAll` option in `form.update()` in favour of the unified `refreshAll` option, which also re-runs load functions outside the current page. The library warns once in DEV when the old option is passed so developers migrate before SvelteKit 4.0 removes it.","triggerScenarios":"Calling `update()` on the result of a form submission (`<form method=\"POST\">` action) with `{ invalidateAll: true }` (or any value) while running in DEV mode; `fallback_callback` in packages/kit/src/runtime/app/forms/client.js warns during the handle_submit flow.","commonSituations":"Codebases upgraded from SvelteKit 1.x to 2.x that used `invalidateAll` to re-run `+page(.server).js` load functions after a successful form action; tutorials and older docs still showing `update({ invalidateAll: true })`.","solutions":["Replace `update({ invalidateAll: true })` with `update({ refreshAll: true })`","If you only need the current page's loads re-run, omit the option entirely — success results invalidate by default","Remove any leftover `invalidateAll` keys from form update options via codemod/grep across the codebase"],"exampleFix":"// before\napplyAction(result).then(() => update({ invalidateAll: true }));\n// after\napplyAction(result).then(() => update({ refreshAll: true }));","handlingStrategy":"validation","validationCode":"// before calling update\nconst opts = { invalidateAll: true };\nif ('invalidateAll' in opts) opts.refreshAll = opts.invalidateAll;\ndelete opts.invalidateAll;\nupdate(opts);","typeGuard":"function usesInvalidateAll(opts) { return opts != null && 'invalidateAll' in opts; }","tryCatchPattern":null,"preventionTips":["Always use `refreshAll` in new code","Add a lint rule/grep check for `invalidateAll` in form update options","Read the SvelteKit 2 migration guide when upgrading"],"tags":["deprecation","forms","client-side"],"backgroundTag":"deprecated-option","analyzedSha":"03f1687fe612ce3d2d9131139b5b188d9cf90c64","analyzedAt":"2026-09-02T02:01:50.504Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}