From 216fa811ed7e8a4751cbd7c273fda41128b92eb1 Mon Sep 17 00:00:00 2001 From: Alessandro Bellesia Date: Wed, 30 Sep 2026 17:19:31 +0200 Subject: [PATCH 1/2] refactor: mark the watchers' executions as intentionally not awaited SonarCloud rule S9383 (floating promises) flags the eight `execute()` and `resubmit()` calls made by the autoExecute, executeWhen, window focus and document visibility handlers, and fails the quality gate of the release PR. They are fire and forget by design, and `execute()` never rejects: a failure lands in the query state. Mark them with `void`, as the rule suggests for promises that cannot practically reject. No behavior change. Co-Authored-By: Claude Opus 5.5 --- src/utilities.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/utilities.ts b/src/utilities.ts index 833038a..d922fbe 100644 --- a/src/utilities.ts +++ b/src/utilities.ts @@ -139,6 +139,8 @@ export function initAutoExecuteReadHandlers( const normalizedExecuteWhen = isRef(executeWhen) ? executeWhen : computed(() => executeWhen(unref(params) as ParamMap)) + // the handlers below do not await: `execute()` never rejects, a failure + // lands in the query state // execute on params change if (autoExecute) { const { stop: watchStopHandler, ignoreUpdates: watchIgnoreUpdates } @@ -146,7 +148,7 @@ export function initAutoExecuteReadHandlers( [normalizedParams, normalizedExecuteWhen], ([newParams, newWhen]) => { if (newWhen) { - execute(newParams) + void execute(newParams) } }, { @@ -163,7 +165,7 @@ export function initAutoExecuteReadHandlers( normalizedExecuteWhen, (newWhen, oldWhen) => { if (newWhen && !oldWhen) { - execute(unref(params) as ParamMap) + void execute(unref(params) as ParamMap) } }, { @@ -185,7 +187,7 @@ export function initAutoExecuteReadHandlers( const focused = useWindowFocus() executeOnFocusStopHandler = watch(focused, (isFocused) => { if (isFocused && normalizedExecuteWhen.value) { - execute() + void execute() } }) } @@ -194,7 +196,7 @@ export function initAutoExecuteReadHandlers( const visibility = useDocumentVisibility() documentVisibilityStopHandler = watch(visibility, (visibilityState) => { if (visibilityState === 'visible' && normalizedExecuteWhen.value) { - execute() + void execute() } }) } @@ -234,6 +236,8 @@ export function initAutoExecuteSubmitHandlers( const normalizedExecuteWhen = isRef(executeWhen) ? executeWhen : computed(() => executeWhen(unref(payload), unref(params) as ParamMap)) + // the handlers below do not await: `execute()` never rejects, a failure + // lands in the query state // auto-submit on item or params change if (autoExecute) { const { stop: watchStopHandler, ignoreUpdates: watchIgnoreUpdates } @@ -241,7 +245,7 @@ export function initAutoExecuteSubmitHandlers( [normalizedPayload, normalizedParams, normalizedExecuteWhen], ([newPayload, newParams, newWhen], _) => { if (newWhen) { - resubmit(newPayload, newParams) + void resubmit(newPayload, newParams) } }, { @@ -258,7 +262,7 @@ export function initAutoExecuteSubmitHandlers( normalizedExecuteWhen, (newWhen, oldWhen) => { if (newWhen && !oldWhen) { - resubmit(unref(payload), unref(params) as ParamMap) + void resubmit(unref(payload), unref(params) as ParamMap) } }, { @@ -280,7 +284,7 @@ export function initAutoExecuteSubmitHandlers( const focused = useWindowFocus() executeOnFocusStopHandler = watch(focused, (isFocused) => { if (isFocused && normalizedExecuteWhen.value) { - resubmit() + void resubmit() } }) } @@ -289,7 +293,7 @@ export function initAutoExecuteSubmitHandlers( const visibility = useDocumentVisibility() documentVisibilityStopHandler = watch(visibility, (visibilityState) => { if (visibilityState === 'visible' && normalizedExecuteWhen.value) { - resubmit() + void resubmit() } }) } From 8945ba43a2a76ae7185bd5112b4d0753c60ab0e4 Mon Sep 17 00:00:00 2001 From: Alessandro Bellesia Date: Wed, 30 Sep 2026 17:27:20 +0200 Subject: [PATCH 2/2] chore: update dependencies (2026-09-30) Minor/patch bumps: @types/node, eslint, unplugin-dts, vite and vitest; packageManager pnpm@12.4.2 -> pnpm@12.8.1. Held back on purpose: - typescript stays at 6.0.3: TS 7 drops the JavaScript Compiler API until 7.1, which breaks declaration emit in unplugin-dts; - vitest resolves to 5.0.2, not 5.0.3: 5.0.3 was published a few hours ago and pnpm's one-day minimum release age applies; the next update picks it up. No newly locked package version is younger than one day. The emitted .d.ts files are byte for byte identical to the ones before the update. Type-check, lint, the 81 unit tests and the build all pass. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 3 +- package.json | 12 +- pnpm-lock.yaml | 585 +++++++++++++++++++++++-------------------------- 3 files changed, 280 insertions(+), 320 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f71af2b..9c886c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Code that awaited an action, or returned it from an async function, and then used its refs now gets plain values: `const { data } = await read()` followed by `data.value` is now a type error, and the same destructuring after a top-level `await` in `