Skip to content

feat(template): 添加 z-paging 模块#164

Merged
FliPPeDround merged 1 commit intouni-helper:mainfrom
xiaohe0601:feat/z-paging
Jan 6, 2026
Merged

feat(template): 添加 z-paging 模块#164
FliPPeDround merged 1 commit intouni-helper:mainfrom
xiaohe0601:feat/z-paging

Conversation

@xiaohe0601
Copy link
Member

@xiaohe0601 xiaohe0601 commented Jan 6, 2026

Description 描述

添加 z-paging 模块

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for z-paging, a high-performance pagination component for uni-app.
  • Documentation

    • Updated documentation to include z-paging module information and configuration.
  • Tests

    • Expanded test matrix to cover z-paging module.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 6, 2026

📝 Walkthrough

Walkthrough

Introduces z-paging module support to the project by registering it in the module options registry, creating template configuration with data hooks for jsconfig and vite plugin setup, updating test coverage, bumping related dependency versions, and documenting the new module.

Changes

Cohort / File(s) Summary
Module Registration & Documentation
README.md, packages/config/src/module.data.ts
Added z-paging entry to module registry with label, value 'zPaging', and hint describing a high-performance uni-app pagination component; updated README documentation.
z-paging Template Module
packages/core/template/module/zPaging/package.json, packages/core/template/module/zPaging/jsconfig.json.data.mjs, packages/core/template/module/zPaging/vite.config.js.data.mjs
Created new module directory with package.json declaring z-paging ^2.8.8 dependency; added data hooks to augment jsconfig and vite config by injecting zPagingConfig and auto-import resolver.
Dependencies & Infrastructure
packages/core/template/plugin/import/package.json, .github/workflows/core_test.yml
Bumped @uni-helper/vite-plugin-uni-components to ^0.2.6; expanded CI test matrix with -m zPaging flag.
Tests
packages/mcp/test/promptBuilder.test.ts
Updated snapshot fixture to include zPaging entry and corrected string termination.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • PR #138 — Introduces injectUtils helpers that the new zPaging template data hooks depend on for resolver injection and data manipulation.
  • PR #72 — Follows the same module addition pattern (registry entry, template directory with data hooks, vite config augmentation, test matrix expansion).

Poem

🐰 A paging component hops into view,
With z-paging swift, the configs renew,
Data hooks transform what vite shall know,
Through flatMap gardens, resolvers grow! 📖✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: adding the z-paging module. It clearly aligns with all file modifications shown in the changeset.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c7c48fc and 3c50e79.

📒 Files selected for processing (8)
  • .github/workflows/core_test.yml
  • README.md
  • packages/config/src/module.data.ts
  • packages/core/template/module/zPaging/jsconfig.json.data.mjs
  • packages/core/template/module/zPaging/package.json
  • packages/core/template/module/zPaging/vite.config.js.data.mjs
  • packages/core/template/plugin/import/package.json
  • packages/mcp/test/promptBuilder.test.ts
🧰 Additional context used
🧬 Code graph analysis (2)
packages/core/template/module/zPaging/vite.config.js.data.mjs (1)
packages/core/template/module/zPaging/jsconfig.json.data.mjs (1)
  • getData (1-13)
packages/core/template/module/zPaging/jsconfig.json.data.mjs (1)
packages/core/template/module/zPaging/vite.config.js.data.mjs (1)
  • getData (1-15)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p root -p componentPla...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p root -p componentPla...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p root -p componentPlacehold...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p root -p componentPla...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p root -p componentPla...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p root -p componentPla...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p root -p componentPla...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p root -p componentPlacehold...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p root -p componentPlacehold...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p root -p componentPlacehold...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p root -p componentPlacehold...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p root -p componentPlacehold...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p root -p componentPlacehold...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p root -p componentPlacehold...
  • GitHub Check: test (-t vitesse, 20.x, macos-latest)
  • GitHub Check: test (-t vitesse, 20.x, windows-latest)
  • GitHub Check: stable - i686-pc-windows-msvc - node@20
  • GitHub Check: stable - aarch64-pc-windows-msvc - node@20
  • GitHub Check: stable - x86_64-pc-windows-msvc - node@20
  • GitHub Check: stable - aarch64-apple-darwin - node@20
🔇 Additional comments (8)
packages/config/src/module.data.ts (1)

51-57: LGTM! Module entry is well-structured.

The z-paging module entry follows the established pattern and is consistent with other module entries in the list. The camelCase value 'zPaging' aligns with the naming convention, and the Chinese description is consistent with the project style.

packages/core/template/module/zPaging/vite.config.js.data.mjs (1)

1-15: LGTM! Auto-import configuration is correctly structured.

The data hook properly injects the ZPagingResolver into the autoImport plugin and adds the necessary import statement. The flatMap pattern ensures that:

  1. The existing autoImport plugin is augmented with ZPagingResolver via utils.addResolver
  2. A new z-paging-auto-import plugin is added with the resolver import

This implementation is consistent with the jsconfig data hook pattern and correctly handles the plugin transformation.

packages/core/template/module/zPaging/package.json (1)

3-3: No action needed—z-paging version 2.8.8 is the latest stable release with no known vulnerabilities.

The specified version is current as of January 2026 and has no reported security issues. Consider running npm audit or Snyk to verify transitive dependencies remain secure.

packages/core/template/plugin/import/package.json (1)

3-3: Version 0.2.6 of @uni-helper/vite-plugin-uni-components does not export ZPagingResolver. The package does not provide a built-in ZPagingResolver. Additionally, npm's registry shows 0.2.0 as the current published version; version 0.2.6 may not exist on the npm registry. Use a custom resolver instead to map component names to z-paging's path.

Likely an incorrect or invalid review comment.

packages/core/template/module/zPaging/jsconfig.json.data.mjs (1)

1-13: LGTM! The z-paging types export path is valid.

The data hook logic correctly injects the zPagingConfig before baseConfig using flatMap, following the same pattern seen in the vite config data hook. The z-paging npm package (v^2.8.8) properly exports TypeScript types at the 'z-paging/types' path, so the type resolution will work correctly.

README.md (1)

94-94: LGTM! The documentation entry for z-paging follows the existing format correctly, is consistent with the parameter name used in the CI workflow, and the repository URL is accessible.

.github/workflows/core_test.yml (1)

63-63: LGTM! The zPaging module implementation is properly configured.

The test matrix expansion correctly includes the new -m zPaging flag following the existing pattern. All module implementation files are in place: module registry entry exists in module.data.ts, the template directory structure is present at packages/core/template/module/zPaging/, and required template files (jsconfig.json.data.mjs, package.json, vite.config.js.data.mjs) are properly configured.

packages/mcp/test/promptBuilder.test.ts (1)

14-15: Module registry properly updated with zPaging entry.

Verification confirms that packages/config/src/module.data.ts includes the zPaging module with value 'zPaging' and description '高性能、全平台兼容的 uni-app 分页组件', which matches the test fixture. The module registry is correctly configured.


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 and usage tips.

@FliPPeDround
Copy link
Member

河神新做🤩
顺便帮忙webview那边也更新一下吧 ;)

@FliPPeDround FliPPeDround merged commit ffb22bb into uni-helper:main Jan 6, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants