akiomik / akiomik/nosvelte

queryClientConfig is merged shallowly, dropping NostrApp's own defaults

未关闭 适合新手
#76 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
TypeScript
星标
29
派生
3
平均合并
3 小时 5 分钟
30 天内合并 PR
11

描述

`NostrApp` merges the caller's config with a shallow spread
(`src/lib/components/NostrApp.svelte:31`):

```ts
$: mergedQueryClientConfig = { ...defaultQueryClientConfig, ...queryClientConfig };
```

`defaultOptions` is a single key, so any caller that passes

```svelte

```

replaces the whole `defaultOptions` object and silently loses nosvelte's
`staleTime` and `refetchInterval`.

Every test in this repository passes exactly that shape, which is why the
interaction between the library's defaults and a caller-supplied config is
currently untested.

Determined by code reading.

## Direction

Merge `defaultOptions.queries` (and the sibling option groups) rather than
`defaultOptions` as a whole.

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start in src/lib/components/NostrApp.svelte:31 and inspect how mergedQueryClientConfig combines defaultQueryClientConfig with queryClientConfig. Run the repository tests, add coverage for a caller-supplied defaultOptions.queries configuration, and verify that the caller's retry setting is applied while nosvelte's staleTime and refetchInterval remain present.

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
frontend
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
冷清
描述清晰度
描述清楚
新手友好度
78/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。