Skip to content

feat: 兼容 pages.json 中 subPackages 字段的小写形式 - #42

Merged
skiyee merged 1 commit into
uni-ku:mainfrom
jackysmith9527:feat/support-lowercase-subpackages
Jul 25, 2026
Merged

feat: 兼容 pages.json 中 subPackages 字段的小写形式#42
skiyee merged 1 commit into
uni-ku:mainfrom
jackysmith9527:feat/support-lowercase-subpackages

Conversation

@jackysmith9527

@jackysmith9527 jackysmith9527 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

加载页面时同时识别 subPackagessubpackages,避免因字段命名差异导致子包页面未被处理。

Summary by CodeRabbit

  • Bug Fixes

    • Improved page configuration loading to recognize both subPackages and subpackages naming formats.
    • Added safer handling when no subpackage configuration is provided, preventing parsing issues and ensuring page paths resolve correctly.
  • Tests

    • Added coverage for both supported subpackage property formats and verified resolution of associated page files.

加载页面时同时识别 `subPackages` 和 `subpackages`,避免因字段命名差异导致子包页面未被处理。
@jackysmith9527
jackysmith9527 requested a review from skiyee as a code owner July 24, 2026 11:09
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 705e61fb-97e1-4fb1-8727-7afd7f4e9696

📥 Commits

Reviewing files that changed from the base of the PR and between 1608283 and 2b6d52b.

📒 Files selected for processing (2)
  • src/utils.ts
  • test/transform.test.ts

📝 Walkthrough

Walkthrough

loadPagesJson now supports both subPackages and subpackages keys when parsing pages.json. New tests verify resolved Vue paths for both forms and clean up temporary directories.

Changes

pages.json loading

Layer / File(s) Summary
Loader alias handling and validation
src/utils.ts, test/transform.test.ts
loadPagesJson resolves subpackages from either supported key, while tests validate both spellings, path resolution, and temporary directory cleanup.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • uni-ku/root#41: Modifies loadPagesJson subpackage handling and pages path resolution.

Suggested reviewers: skiyee

🚥 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 The title clearly matches the main change: supporting the lowercase pages.json subpackages field.
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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: private package registry requires authentication. Disable ESLint in CodeRabbit settings or use public packages.


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.

@skiyee

skiyee commented Jul 25, 2026

Copy link
Copy Markdown
Member

thank you ❤

@skiyee
skiyee merged commit 84d5deb into uni-ku:main Jul 25, 2026
1 check passed
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