chore(use-url-state): rename package and add migration notices#2922
chore(use-url-state): rename package and add migration notices#2922
Conversation
|
|
commit: |
There was a problem hiding this comment.
Pull request overview
Renames the standalone use-url-state package from @ahooksjs/use-url-state to @ahooks.js/use-url-state, and updates associated build outputs, demos, and documentation with migration notices to reflect the new publish location.
Changes:
- Update
packages/use-url-statepackage metadata, TS path alias, and UMD/unpkg build output naming for the new package name. - Update demos and package docs to import/install
@ahooks.js/use-url-state. - Add migration notices to root READMEs and upgrade guides (EN/ZH).
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/use-url-state/webpack.config.js | Renames UMD output filename and global library name to match new package name. |
| packages/use-url-state/use-url-state.zh-CN.md | Updates install/import examples and adds migration notice (ZH). |
| packages/use-url-state/use-url-state.en-US.md | Updates install/import examples and adds migration notice (EN). |
| packages/use-url-state/tsconfig.json | Updates TS paths alias for the new scoped package name. |
| packages/use-url-state/package.json | Renames package and updates unpkg entry file name. |
| packages/use-url-state/demo/demo1.tsx | Updates demo import to new package name. |
| packages/use-url-state/demo/demo2.tsx | Updates demo import to new package name. |
| packages/use-url-state/demo/demo3.tsx | Updates demo import to new package name. |
| packages/use-url-state/demo/demo4.tsx | Updates demo import to new package name. |
| packages/use-url-state/README.md | Updates install/import examples and adds migration notice. |
| docs/guide/upgrade.zh-CN.md | Adds upgrade guide note for the standalone package rename (ZH). |
| docs/guide/upgrade.en-US.md | Adds upgrade guide note for the standalone package rename (EN). |
| README.zh-CN.md | Adds top-level migration notice (ZH). |
| README.md | Adds top-level migration notice (EN). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| */ | ||
|
|
||
| import useUrlState from '@ahooksjs/use-url-state'; | ||
| import useUrlState from '@ahooks.js/use-url-state'; |
There was a problem hiding this comment.
This new import path will not resolve in the repo’s local docs/demo build because the site alias and TS path mappings still point to the old package name (@ahooksjs/use-url-state). Please update config/config.ts (alias) and tsconfig.pro.json (compilerOptions.paths) to use @ahooks.js/use-url-state so demos compile correctly.
| import useUrlState from '@ahooks.js/use-url-state'; | |
| import useUrlState from '@ahooksjs/use-url-state'; |
There was a problem hiding this comment.
已经更新了 config/config.ts (alias) and tsconfig.pro.json (compilerOptions.paths),你再重新 review 一下 @copilot
There was a problem hiding this comment.
已确认,config/config.ts 和 tsconfig.pro.json 均已正确更新为 @ahooks.js/use-url-state(commit ab708f0),所有 demo 的 import 路径也一致。本地 docs/demo 构建的别名解析已对齐,无需进一步修改。
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
暂无(因 npm 发布权限变更触发的包重发与迁移)
💡 Background and solution
由于当前维护账号对
@ahooksjs/use-url-state的持续发布权限受限,无法继续稳定更新该包。为保证
use-url-state独立包可持续发布,本次将包名迁移为:@ahooks.js/use-url-state本次改动包括:
包配置与构建配置更新(
packages/use-url-state)package.json包名改为@ahooks.js/use-url-stateunpkg产物名同步调整webpack.config.js输出文件名与 library 名称同步调整tsconfig.json路径别名同步调整使用侧代码与文档同步
README安装与导入示例更新为新包名迁移公告补充(提升可见性)
README.md/README.zh-CN.mddocs/guide/upgrade.en-US.md/docs/guide/upgrade.zh-CN.mdpackages/use-url-state/README.md、use-url-state.en-US.md、use-url-state.zh-CN.md站点构建别名修复
config/config.ts中的 alias 更新为@ahooks.js/use-url-state,确保 demo/docs 本地构建正确解析tsconfig.pro.json的compilerOptions.paths更新为@ahooks.js/use-url-state,确保 TypeScript 编译时路径正确📝 Changelog
@ahooksjs/use-url-stateto@ahooks.js/use-url-statedue to publish permission changes; update demos/docs, add migration notices, and fix site build aliases inconfig/config.tsandtsconfig.pro.json.use-url-state独立包由@ahooksjs/use-url-state迁移为@ahooks.js/use-url-state;同步更新示例与文档,新增迁移公告,并修复config/config.ts与tsconfig.pro.json中的站点构建别名。☑️ Self Check before Merge
⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.