Skip to content

[npm] Bump ahooks from 3.10.0 to 3.11.0 - #426

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/ahooks-3.11.0
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/ahooks-3.11.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Bumps ahooks from 3.10.0 to 3.11.0.

Release notes

Sourced from ahooks's releases.

v3.11.0

ahooks 3.11.0

中文

新功能

  • useClickAway 的第三个参数支持配置对象,新增 enabled 选项,用于控制是否绑定外部点击监听。原有事件名字符串和事件名数组调用方式保持兼容。#2984

修复

  • useInfiniteScroll 避免空页引起连续自动请求,并在加载状态更新完成后再检查是否需要继续加载。7369875、587ea88
  • useInfiniteScroll 在容器尺寸或视口变化后重新判断是否需要加载,避免初次尺寸通知触发额外请求。#2964
  • useInfiniteScroll.cancel() 清除 loadingMore,使取消后的按钮操作和滚动加载能够继续工作,同时忽略已取消请求的结果及回调。#2970
  • useCookieState 删除 Cookie 时保留配置的 path、domain 等属性,修复自定义作用域下无法删除 Cookie 的问题。#2977
  • useTheme 在服务端渲染时避免访问浏览器存储。#2983
  • useResetState 正确保留函数类型的状态值,初始化和重置时不再把该值作为状态更新函数执行。#2982
  • useDynamicList.sortList 保留 0、false 和空字符串,同时继续过滤 null 和 undefined。#2981
  • useSelections 在 itemKey 属性名或回调变化后重新计算选中映射与选中状态。#2980
  • useExternal 和 useFavicon 正确识别带查询参数或片段的资源 URL 类型,并保留元素上的原始 URL。#2979
  • useHistoryTravel 在批量设置值、前进、后退及重置后更新时保留正确的历史记录。#2978
  • useMutationObserver 使用最新回调,同时保留原生回调参数和 this,回调变化不会重建 observer。#2973

文档

  • 说明 useSessionStorageState 的 listenStorageChange 支持同页 Hook 更新及同一标签页内的同源 iframe 更新,不会跨标签页同步。#2972
  • 补充维护者发布指南,涵盖 npm、GitHub Release、文档站发布及发布后验收。

使用示例

useClickAway(onClickAway, target, {
  eventName: 'click',
  enabled: open,
});

本次发布包为 ahooks。独立包 @ahooks.js/use-url-state 保持原版本。

English

Features

  • Accept an options object as the third argument of useClickAway, with an enabled option to control whether outside-click listeners are attached. Existing event-name string and array arguments remain supported. #2984

Fixes

  • Prevent repeated automatic requests after an empty page in useInfiniteScroll, and defer bottom checks until loading state updates complete. 7369875, 587ea88
  • Recheck whether more data is needed when the scroll container or viewport changes size, without treating the initial resize notification as a resize. #2964
  • Clear loadingMore when cancelling useInfiniteScroll requests, allowing subsequent button and scroll loading while continuing to ignore cancelled responses and callbacks. #2970

... (truncated)

Commits
  • a0c33c2 chore: prepare ahooks 3.11.0 (#2985)
  • f40fd78 fix(useInfiniteScroll): reset loadingMore when cancelled (#2970)
  • 24f835d docs: clarify session storage synchronization scope (#2972)
  • 5b50927 fix: use latest useMutationObserver callback (#2973)
  • 9187b81 fix(useHistoryTravel): preserve batched history updates (#2978)
  • ae7468b fix: infer asset types from URLs with queries and fragments (#2979)
  • 4ff36a7 fix(useSelections): refresh selection when itemKey changes (#2980)
  • b3a349d fix: preserve falsy values in useDynamicList.sortList (#2981)
  • 04a61ae Merge pull request #2982 from Aminark/fix/reset-function-state
  • cd8ceab fix(useTheme): do not read localStorage during SSR (#2983)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [ahooks](https://github.com/alibaba/hooks) from 3.10.0 to 3.11.0.
- [Release notes](https://github.com/alibaba/hooks/releases)
- [Commits](alibaba/hooks@v3.10.0...v3.11.0)

---
updated-dependencies:
- dependency-name: ahooks
  dependency-version: 3.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Nov 3, 2026

@ecosquad-autoreview ecosquad-autoreview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Bump ahooks from 3.10.0 to 3.11.0

Summary: Standard dependabot patch/minor bump. package.json changes ahooks from ^3.10.0 to ^3.11.0, and pnpm-lock.yaml consistently updates the specifier, resolved version (3.11.0), and integrity hash. The diff contains no other changes.

Compatibility assessment:

  • Searched the entire checkout (100 files, no truncation) for from 'ahooks' imports and for every hook touched by the 3.11.0 changelog (useClickAway, useInfiniteScroll, useCookieState, useResetState, useDynamicList, useSelections, useExternal, useFavicon, useHistoryTravel, useMutationObserver, useTheme) — no usage found. The dependency is declared but unused in application code, so the 3.11.0 behavioral changes cannot affect this project.
  • Peer dependencies are unchanged (react ^16.8 || ^17 || ^18 || ^19), and the project runs React 19.3 — no peer conflict.
  • 3.11.0 is a semver-minor release with no breaking changes reported; the only feature (options object for useClickAway) is additive and backward compatible.

CI: check ✅, GitGuardian ✅, CodeQL neutral (two pre-existing configs missing on main; not introduced by this PR).

Findings: None.

Verdict: Approve.

(One optional note, not blocking: if ahooks truly is unused, it could be removed from package.json to shrink the dependency tree — but that's out of scope for this PR.)

@dependabot @github

dependabot Bot commented on behalf of github Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

Looks like ahooks is up-to-date now, so this is no longer needed.

@dependabot dependabot Bot closed this Nov 13, 2026
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/ahooks-3.11.0 branch November 13, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants