Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
},
"dependencies": {
"@babel/runtime": "^7.23.9",
"@nutui/icons-react": "^3.0.1",
"@nutui/icons-react-taro": "^3.0.1",
"@nutui/icons-react": "^3.0.2-beta.5",
"@nutui/icons-react-taro": "^3.0.2-beta.2",
Comment on lines +111 to +112
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

升级到 beta OK,但建议固定预发布版本并补充验证项

  • 目前使用的 caret 范围 ^3.0.2-beta.* 在 npm 语义下可能在 CI/发布时解析到更新的 beta/stable 3.x,带来不可预期变更(尤其图标重命名/导出路径调整这类细小变更)。在 beta 阶段建议固定精确版本,或改用 ~ 以降低漂移风险。
  • PR 描述里补充“升级动机/变更影响”更利于后续追溯:是否包含新图标、修复渲染问题、或 tree-shaking 调整等。

可以考虑如下微调(保持可回滚与可复现):

-    "@nutui/icons-react": "^3.0.2-beta.5",
-    "@nutui/icons-react-taro": "^3.0.2-beta.2",
+    "@nutui/icons-react": "3.0.2-beta.5",
+    "@nutui/icons-react-taro": "3.0.2-beta.2",

建议核对与冒烟:

  • 核对是否存在破坏性变更:图标命名/命名导出是否一致、导入路径是否变更(例如是否仍然 import { Xxx } from '@nutui/icons-react' / @nutui/icons-react-taro')、是否有移除的图标。
  • 在 H5 与 Taro demo 中各做一次图标相关组件(Icon、Button+Icon 等)的冒烟。

可用以下脚本快速罗列代码库中对两个包的实际导入位置,辅助评估影响面(在仓库根目录执行):


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Direct imports from @nutui/icons-react =="
rg -nP -C2 --type=ts --type=tsx $'from\\s+[\'"]@nutui/icons-react[\'"]|require\\([\'"]@nutui/icons-react[\'"]\\)'

echo
echo "== Direct imports from @nutui/icons-react-taro =="
rg -nP -C2 --type=ts --type=tsx $'from\\s+[\'"]@nutui/icons-react-taro[\'"]|require\\([\'"]@nutui/icons-react-taro[\'"]\\)'

echo
echo "== Deep path imports (potentially breaking across versions) =="
rg -nP -C2 --type=ts --type=tsx $'@nutui/(icons-react|icons-react-taro)/'

Length of output: 266


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Search for any mention of @nutui/icons-react =="
rg -n -S "@nutui/icons-react" || true

echo
echo "== Direct import/require of @nutui/icons-react =="
rg -n -S "from\s+['\"]@nutui/icons-react['\"]|require\(['\"]@nutui/icons-react['\"]\)" || true

echo
echo "== Search for any mention of @nutui/icons-react-taro =="
rg -n -S "@nutui/icons-react-taro" || true

echo
echo "== Direct import/require of @nutui/icons-react-taro =="
rg -n -S "from\s+['\"]@nutui/icons-react-taro['\"]|require\(['\"]@nutui/icons-react-taro['\"]\)" || true

echo
echo "== Deep path imports under @nutui/(icons-react|icons-react-taro)/ =="
rg -n -S "@nutui/(icons-react|icons-react-taro)/" || true

Length of output: 93026


请固定 @nutui/icons-react / @nutui/icons-react-taro 的预发布版本并补充兼容验证

原因简述:package.json 仍使用 caret(^3.0.2-beta.*),仓库中有大量直接从这两个包导入(见下),存在安装时解析到不同 beta/3.x 版本导致导出/命名/路径变更的风险。pnpm-lock.yaml 当前已解析为 3.0.2-beta.5 / 3.0.2-beta.2,但为了可回滚与可复现,建议在 package.json 固定精确版本并在 PR 描述里说明变更动机与影响。

需要改动(最小变更建议):

-    "@nutui/icons-react": "^3.0.2-beta.5",
-    "@nutui/icons-react-taro": "^3.0.2-beta.2",
+    "@nutui/icons-react": "3.0.2-beta.5",
+    "@nutui/icons-react-taro": "3.0.2-beta.2",

需要关注 / 验证的代码位置(示例):

  • package.json(lines 111-112)
  • pnpm-lock.yaml(已包含 @nutui/[email protected] 与 @nutui/[email protected]
  • 打包脚本:scripts/build.mjs (≈ line 384), scripts/build-taro.mjs (≈ line 500) — 注意这些脚本会修改 packageJson.dependencies
  • 代表性直接导入(需逐项核对命名导出与路径):
    • src/packages/uploader/uploader.tsx
    • src/packages/uploader/uploader.taro.tsx
    • src/packages/icon/demo.tsx (含 '@nutui/icons-react/dist/style_iconfont.css')
    • src/packages/tabs/tabs.tsx / src/packages/tabs/tabs.taro.tsx
    • src/packages/toast/Notification.tsx / src/packages/toast/toast.taro.tsx
    • src/packages/tabbar/demos/h5/demo1.tsx / src/packages/tabbar/demos/taro/demo1.tsx
    • 以及大量 demo/test 文件(见仓库搜索结果)

建议的最小验证清单(冒烟):

  • 核对命名导出是否 unchanged(eg. import { Xxx } from '@nutui/icons-react' 仍有效)
  • 核对导入路径(包括 style_iconfont.css 或 dist 下的类型声明路径)是否未变
  • 在 H5 与 Taro 的若干 demo 中分别验证:Icon、Button+Icon、IconFont、Uploader 等(示例文件见上)
  • 运行相关单元/快照测试(tests 引用较多 icons),确保没有断裂

如需,我可以把仓库中引用该包的文件列表导出成清单,或把 build 脚本附近的具体行贴出来供进一步评审。

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@nutui/icons-react": "^3.0.2-beta.5",
"@nutui/icons-react-taro": "^3.0.2-beta.2",
"@nutui/icons-react": "3.0.2-beta.5",
"@nutui/icons-react-taro": "3.0.2-beta.2",

"@nutui/jdesign-icons-react-taro": "1.0.6-beta.2",
"@nutui/touch-emulator": "^1.0.0",
"@nutui/lottie-miniprogram": "^1.0.2",
Expand Down
433 changes: 227 additions & 206 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions src/packages/audio/__test__/__snapshots__/audio.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ exports[`icon type test 1`] = `
aria-labelledby="Service"
class="nut-icon nut-icon-Service "
role="presentation"
viewBox="0 0 48 48"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M2 20h1.006C3.278 8.875 12.609 0 24 0c11.39 0 20.722 8.875 20.994 20H46a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-.508c-.269 7.663-6.658 13.743-14.49 13.992a.488.488 0 0 1-.502-.492v-2c0-.276.224-.499.5-.51 6.27-.245 11.223-5.075 11.49-10.99H41a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h.993C41.721 10.6 33.805 3 24 3 14.195 3 6.279 10.6 6.007 20H7a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2m1 3v6h3v-6zm39 6h3v-6h-3zm-13.063-.858a.528.528 0 0 1 .72.011l1.413 1.415a.483.483 0 0 1-.007.698c-3.998 3.64-10.127 3.64-14.126 0a.483.483 0 0 1-.009-.698l1.415-1.415a.527.527 0 0 1 .718-.011 7.501 7.501 0 0 0 9.876 0"
d="M64.21 469.33H42.67A42.67 42.67 0 0 0 0 512v170.67a42.67 42.67 0 0 0 42.67 42.66h106.66c23.68 0 42.67-18.99 42.67-42.66V512c0-23.68-18.99-42.67-42.67-42.67h-21.12C133.97 268.8 302.93 106.66 512 106.67c209.07 0 378.03 162.13 383.79 362.66h-21.12A42.67 42.67 0 0 0 832 512v170.67a42.67 42.67 0 0 0 42.67 42.66h31.78C900.9 848.21 800.64 949.12 672 959.15c-11.73.85-21.33 10.45-21.33 22.18v21.34c0 11.73 9.6 21.33 21.33 20.69 162.13-10.45 292.91-138.03 298.45-298.03h10.88a42.67 42.67 0 0 0 42.67-42.66V512a42.67 42.67 0 0 0-42.67-42.67h-21.54C954.03 231.89 754.99 42.66 512 42.67c-242.99 0-442.03 189.44-447.79 426.66m-.21 192v-128h64v128zm832-128h64v128h-64z"
fill="currentColor"
/>
,
<path
d="M640.21 650.88c-8.32-8.32-21.76-8.11-31.14-1.07a160.02 160.02 0 0 1-194.14 0c-9.39-7.25-22.83-7.25-31.14 1.07l-15.15 14.93c-8.32 8.32-8.32 21.97.85 29.44 82.56 68.27 202.67 68.27 285.02 0 9.17-7.47 8.96-21.12.85-29.44z"
fill="currentColor"
/>
</svg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ exports[`backtop custom test 1`] = `
aria-labelledby="Top"
class="nut-icon nut-icon-Top "
role="presentation"
viewBox="0 0 44 44"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M43.042 18.666a.6.6 0 0 1 .062.846l-1.506 1.743a.6.6 0 0 1-.846.062L23.753 6.64V42.9a.6.6 0 0 1-.6.599H20.85a.6.6 0 0 1-.6-.6V6.64L3.25 21.318a.6.6 0 0 1-.846-.062L.898 19.512a.6.6 0 0 1 .062-.846L22.001.5z"
d="M111.79 471.68a21.31 21.31 0 0 1-30.08-2.35l-14.08-16.21a21.31 21.31 0 0 1 2.34-30.08L498.13 54.61a21.33 21.33 0 0 1 27.74 0l428.16 368.43c8.96 7.68 10.03 21.12 2.34 30.08l-14.08 16.21c-7.68 8.96-21.12 10.03-30.08 2.35L544 154.67V960c0 11.73-9.6 21.33-21.33 21.33h-21.34c-11.73 0-21.33-9.6-21.33-21.33V154.67zM510.93 128h2.14l-1.07-.85z"
fill="currentColor"
/>
</svg>
Expand Down
4 changes: 2 additions & 2 deletions src/packages/badge/__test__/__snapshots__/badge.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ exports[`should match custom icon 1`] = `
aria-labelledby="Check"
class="nut-icon nut-icon-Check "
role="presentation"
viewBox="0 0 49 48"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M45.121 16.121 47.243 14 43 9.757l-2.121 2.122L19 33.757 7.121 21.88 5 19.757.757 24l2.122 2.121L14.757 38l2.122 2.121L19 42.243l2.121-2.122L23.243 38z"
d="m942.94 336.9 44.34-44.33-88.67-88.67-44.32 44.35-457.23 457.2-248.25-248.2-44.32-44.37-88.67 88.67 44.35 44.33 248.22 248.24 44.35 44.33 44.32 44.34 44.33-44.34 44.34-44.33L942.92 336.9z"
fill="currentColor"
/>
</svg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ exports[`Cascader > visible true 1`] = `
aria-labelledby="Check"
class="nut-icon nut-icon-Check nut-cascader-icon-check"
role="presentation"
viewBox="0 0 49 48"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M45.121 16.121 47.243 14 43 9.757l-2.121 2.122L19 33.757 7.121 21.88 5 19.757.757 24l2.122 2.121L14.757 38l2.122 2.121L19 42.243l2.121-2.122L23.243 38z"
d="m942.94 336.9 44.34-44.33-88.67-88.67-44.32 44.35-457.23 457.2-248.25-248.2-44.32-44.37-88.67 88.67 44.35 44.33 248.22 248.24 44.35 44.33 44.32 44.34 44.33-44.34 44.34-44.33L942.92 336.9z"
fill="currentColor"
/>
</svg>
Expand All @@ -136,11 +136,11 @@ exports[`Cascader > visible true 1`] = `
aria-labelledby="Check"
class="nut-icon nut-icon-Check nut-cascader-icon-check"
role="presentation"
viewBox="0 0 49 48"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M45.121 16.121 47.243 14 43 9.757l-2.121 2.122L19 33.757 7.121 21.88 5 19.757.757 24l2.122 2.121L14.757 38l2.122 2.121L19 42.243l2.121-2.122L23.243 38z"
d="m942.94 336.9 44.34-44.33-88.67-88.67-44.32 44.35-457.23 457.2-248.25-248.2-44.32-44.37-88.67 88.67 44.35 44.33 248.22 248.24 44.35 44.33 44.32 44.34 44.33-44.34 44.34-44.33L942.92 336.9z"
fill="currentColor"
/>
</svg>
Expand All @@ -165,11 +165,11 @@ exports[`Cascader > visible true 1`] = `
aria-labelledby="Check"
class="nut-icon nut-icon-Check nut-cascader-icon-check"
role="presentation"
viewBox="0 0 49 48"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M45.121 16.121 47.243 14 43 9.757l-2.121 2.122L19 33.757 7.121 21.88 5 19.757.757 24l2.122 2.121L14.757 38l2.122 2.121L19 42.243l2.121-2.122L23.243 38z"
d="m942.94 336.9 44.34-44.33-88.67-88.67-44.32 44.35-457.23 457.2-248.25-248.2-44.32-44.37-88.67 88.67 44.35 44.33 248.22 248.24 44.35 44.33 44.32 44.34 44.33-44.34 44.34-44.33L942.92 336.9z"
fill="currentColor"
/>
</svg>
Expand Down Expand Up @@ -206,11 +206,11 @@ exports[`Cascader > visible true 2`] = `
aria-labelledby="Check"
class="nut-icon nut-icon-Check nut-cascader-icon-check"
role="presentation"
viewBox="0 0 49 48"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M45.121 16.121 47.243 14 43 9.757l-2.121 2.122L19 33.757 7.121 21.88 5 19.757.757 24l2.122 2.121L14.757 38l2.122 2.121L19 42.243l2.121-2.122L23.243 38z"
d="m942.94 336.9 44.34-44.33-88.67-88.67-44.32 44.35-457.23 457.2-248.25-248.2-44.32-44.37-88.67 88.67 44.35 44.33 248.22 248.24 44.35 44.33 44.32 44.34 44.33-44.34 44.34-44.33L942.92 336.9z"
fill="currentColor"
/>
</svg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ exports[`should match snapshot 1`] = `
aria-labelledby="Checked"
class="nut-icon nut-icon-Checked nut-checkbox-icon nut-checkbox-icon-checked"
role="presentation"
viewBox="0 0 16 16"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m4.325-10.117-5.318 5.362-3.332-3.36a.25.25 0 0 1 0-.351l.701-.707a.25.25 0 0 1 .355 0L7.007 9.12l4.262-4.297a.25.25 0 0 1 .355 0l.701.707a.25.25 0 0 1 0 .352"
d="M512 1024A512 512 0 1 0 512 0a512 512 0 0 0 0 1024m276.8-647.49L448.45 719.68 235.2 504.64a16 16 0 0 1 0-22.46l44.86-45.25a16 16 0 0 1 22.72 0l145.67 146.75 272.77-275.01a16 16 0 0 1 22.72 0l44.86 45.25a16 16 0 0 1 0 22.53z"
fill="currentColor"
/>
</svg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ exports[`should match snapshot 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M153.81 362.67a10.67 10.67 0 0 0-7.68 18.13L512 746.67 877.87 380.8a10.67 10.67 0 0 0-7.68-18.13h-60.38a10.03 10.03 0 0 0-7.46 3.2L512 656.21 221.65 365.87a10.88 10.88 0 0 0-7.46-3.2z"
d="M187.73 351.57a21.33 21.33 0 0 0 .43 29.66l307.63 307.62c8.32 8.32 21.76 8.32 30.08 0L835.2 379.73c8.53-8.53 8.32-22.19-.43-30.5l-15.36-14.72c-8.32-8.11-21.76-7.89-29.86.21L510.93 613.55 232.96 335.57c-8.53-8.53-22.4-8.32-30.72.43z"
fill="currentColor"
/>
</svg>
Expand Down Expand Up @@ -84,7 +84,7 @@ exports[`should match snapshot 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M153.81 362.67a10.67 10.67 0 0 0-7.68 18.13L512 746.67 877.87 380.8a10.67 10.67 0 0 0-7.68-18.13h-60.38a10.03 10.03 0 0 0-7.46 3.2L512 656.21 221.65 365.87a10.88 10.88 0 0 0-7.46-3.2z"
d="M187.73 351.57a21.33 21.33 0 0 0 .43 29.66l307.63 307.62c8.32 8.32 21.76 8.32 30.08 0L835.2 379.73c8.53-8.53 8.32-22.19-.43-30.5l-15.36-14.72c-8.32-8.11-21.76-7.89-29.86.21L510.93 613.55 232.96 335.57c-8.53-8.53-22.4-8.32-30.72.43z"
fill="currentColor"
/>
</svg>
Expand Down Expand Up @@ -134,7 +134,7 @@ exports[`should match snapshot 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M153.81 362.67a10.67 10.67 0 0 0-7.68 18.13L512 746.67 877.87 380.8a10.67 10.67 0 0 0-7.68-18.13h-60.38a10.03 10.03 0 0 0-7.46 3.2L512 656.21 221.65 365.87a10.88 10.88 0 0 0-7.46-3.2z"
d="M187.73 351.57a21.33 21.33 0 0 0 .43 29.66l307.63 307.62c8.32 8.32 21.76 8.32 30.08 0L835.2 379.73c8.53-8.53 8.32-22.19-.43-30.5l-15.36-14.72c-8.32-8.11-21.76-7.89-29.86.21L510.93 613.55 232.96 335.57c-8.53-8.53-22.4-8.32-30.72.43z"
fill="currentColor"
/>
</svg>
Expand Down
Loading
Loading