Skip to content

fix: update plugin filtering logic to match exact command tag - #19464

Open
alvinhui wants to merge 1 commit into
NervJS:mainfrom
alvinhui:fix/plugin-register
Open

fix: update plugin filtering logic to match exact command tag#19464
alvinhui wants to merge 1 commit into
NervJS:mainfrom
alvinhui:fix/plugin-register

Conversation

@alvinhui

@alvinhui alvinhui commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

这个 PR 做了什么? (简要描述所做更改)

内部已存在部分 Plugin 包名适配

这个 PR 是什么类型? (至少选择一个)

  • 错误修复 (Bugfix) issue: fix #
  • 新功能 (Feature)
  • 代码重构 (Refactor)
  • TypeScript 类型定义修改 (Types)
  • 文档修改 (Docs)
  • 代码风格更新 (Code style update)
  • 构建优化 (Chore)
  • 其他,请描述 (Other, please describe):

这个 PR 涉及以下平台:

  • 所有平台
  • Web 端(H5)
  • 移动端(React-Native)
  • 鸿蒙(Harmony)
  • 鸿蒙容器(Harmony Hybrid)
  • ASCF 元服务
  • 快应用(QuickApp)
  • 所有小程序
  • 微信小程序
  • 企业微信小程序
  • 京东小程序
  • 百度小程序
  • 支付宝小程序
  • 支付宝 IOT 小程序
  • 钉钉小程序
  • QQ 小程序
  • 飞书小程序
  • 快手小程序
  • 头条小程序

Summary by CodeRabbit

  • Bug Fixes
    • 优化插件筛选规则,准确匹配当前命令相关的插件名称。
    • 避免将名称相近但不相关的插件错误纳入全局插件列表。

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

调整 filterGlobalConfig 的命令相关插件匹配逻辑,支持精确标签匹配及带连字符后缀的插件名称匹配。

Changes

插件过滤

Layer / File(s) Summary
命令相关插件匹配规则
packages/taro-service/src/utils/index.ts
RelatedPluginTag 改为不带尾部连字符,并将过滤条件改为精确匹配标签或匹配 ${RelatedPluginTag}- 前缀。

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • NervJS/taro#17514:同样修改 filterGlobalConfig 的命令相关插件过滤逻辑。

Poem

小兔蹦来查插件,
标签精准不混乱;
等号相逢开新门,
连字符后也收存;
过滤清晰胡萝卜甜。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了本次对插件过滤逻辑按命令标签精确匹配的修复。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/taro-service/src/utils/index.ts`:
- Around line 134-137: Update the plugin filter in the config handling around
RelatedPluginTag to use a prefix check instead of includes, so only plugin names
equal to RelatedPluginTag or beginning with RelatedPluginTag followed by a
hyphen are retained; reject unrelated names containing that sequence elsewhere.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b0064b4e-dcda-47a9-85d6-08f83a69871c

📥 Commits

Reviewing files that changed from the base of the PR and between dd4f0fb and d7c0312.

📒 Files selected for processing (1)
  • packages/taro-service/src/utils/index.ts

Comment thread packages/taro-service/src/utils/index.ts
@Single-Dancer Single-Dancer added this to the 4.2.2 milestone Aug 21, 2026
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.70%. Comparing base (d6d69e3) to head (ddd9ec7).

❌ Your project check has failed because the head coverage (55.70%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #19464      +/-   ##
==========================================
+ Coverage   51.55%   55.70%   +4.15%     
==========================================
  Files         256      451     +195     
  Lines       12094    23779   +11685     
  Branches     2847     5895    +3048     
==========================================
+ Hits         6235    13247    +7012     
- Misses       4844     8648    +3804     
- Partials     1015     1884     +869     
Flag Coverage Δ
taro-cli 56.96% <ø> (+0.58%) ⬆️
taro-runtime 58.63% <ø> (ø)
taro-web 53.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 196 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants