Skip to content

chore: update package metadata and enhance documentation#309

Merged
hexqi merged 10 commits intoopentiny:developfrom
gene9831:chore/readme-sync
Mar 2, 2026
Merged

chore: update package metadata and enhance documentation#309
hexqi merged 10 commits intoopentiny:developfrom
gene9831:chore/readme-sync

Conversation

@gene9831
Copy link
Collaborator

@gene9831 gene9831 commented Feb 27, 2026

Summary by CodeRabbit

  • Documentation

    • Consolidated and simplified README content across packages: clearer overviews, installation guidance, language link fixes, removed an unnecessary header; kit docs shortened to high-level guidance; svgs docs expanded with icon usage examples; updated top-level README assets/links.
  • Chores

    • Added and standardized package metadata (license, homepage, repository, bugs, keywords, module/build fields) across packages.
  • Packaging

    • Build now copies README and LICENSE into component output; component directory ignores local README/LICENSE in VCS.

…t components and kits

- Added license, description, repository, and bugs information to package.json files for components, kit, and svgs.
- Expanded README.md files for components and kit with detailed features, installation instructions, and usage examples.
- Introduced a plugin in vite.config.ts to copy the root README.md to the components directory for better accessibility.
- Updated keywords in package.json files to improve discoverability.
@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

Warning

Rate limit exceeded

@gene9831 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 38 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between b0d869b and 56e027e.

📒 Files selected for processing (2)
  • README.md
  • README.zh-CN.md

Walkthrough

Update documentation and package manifests across multiple packages; add a Vite build plugin in packages/components that copies root README.md, README.zh-CN.md, and LICENSE into the components directory on closeBundle. Changes are documentation/manifest-focused plus one build-time plugin.

Changes

Cohort / File(s) Summary
Components package
packages/components/README.md, packages/components/package.json, packages/components/vite.config.ts, packages/components/.gitignore
Removed a Chinese header from the README; added license, description, homepage, repository, bugs, keywords, type/module/main/files to package.json; added a Vite plugin copyRootReadmeToComponents to copy root README.md, README.zh-CN.md, and LICENSE into the package on closeBundle; added .gitignore entries for README* and LICENSE.
Kit package
packages/kit/README.md, packages/kit/package.json
Replaced detailed API README with a higher-level feature/installation overview; added homepage, repository, bugs, and keywords metadata to package.json.
SVGs package
packages/svgs/README.md, packages/svgs/package.json
Expanded README with installation and Vue 3 usage example and use cases; added license/homepage/repository/bugs and updated keywords in package.json.
Repository root
README.md, README.zh-CN.md
Updated logo image source to an external URL, adjusted English/Chinese README links to GitHub paths, simplified packages listing/table, and updated LICENSE link to point to GitHub.
Misc
(repo-wide manifests) packages/*/package.json
Multiple packages had package.json metadata augmented (license, homepage, repository, bugs, keywords) and packages/components gained module/build fields and files entry.

Sequence Diagram(s)

sequenceDiagram
    participant Vite as "Vite"
    participant Plugin as "copyRootReadmeToComponents (Plugin)"
    participant FS as "Filesystem (repo root / packages/components)"

    Vite->>Plugin: closeBundle
    Plugin->>FS: resolve paths for README.md, README.zh-CN.md, LICENSE
    Plugin->>FS: existsSync(path) for each file
    FS-->>Plugin: file exists / missing
    Plugin->>FS: copyFileSync(source, target) for existing files
    FS-->>Plugin: copy result
    Plugin-->>Vite: done
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through docs with tiny feet,
I nudged the READMEs into their suite,
I added metadata, tidy and bright,
A plugin fetched files in the build's last light,
Hop, hop — tiny-robot set right!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: updating package metadata (license, repository, bugs, keywords, homepage fields across multiple package.json files) and enhancing documentation (README rewrites, logo updates, table reformatting).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

✅ Preview build completed successfully!

Click the image above to preview.
Preview will be automatically removed when this PR is closed.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
packages/components/vite.config.ts (1)

12-23: Move README.md copy target to build output directory to avoid mutating tracked source files.

Line 21 writes directly to packages/components/README.md on every build, mutating a tracked source file. This creates workspace side effects (dirty git state after each build). Copy to the build output directory instead:

Suggested fix
-const targetReadme = resolve(__dirname, 'README.md')
+const targetReadme = resolve(__dirname, 'dist/README.md')
...
-console.log('[tiny-robot] Copied root README.md to packages/components/README.md')
+console.log('[tiny-robot] Copied root README.md to packages/components/dist/README.md')
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/components/vite.config.ts` around lines 12 - 23, The closeBundle
hook currently copies rootReadme into the source file targetReadme
(packages/components/README.md) causing git-dirty builds; change the target to
the build output directory instead (e.g. resolve(__dirname, 'dist/README.md') or
use the actual outputDir used by the Vite build), ensure the target directory
exists before copying, and update the log message accordingly so closeBundle
copies rootReadme -> build output README rather than mutating the tracked source
README; reference the closeBundle function and the rootReadme/targetReadme
variables when making the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/components/README.md`:
- Line 174: Update the README.md license link in the "MIT License - see
[LICENSE](./LICENSE)" line so it points to the repository root LICENSE file
instead of ./LICENSE; replace the relative target with a correct path (for
example ../../LICENSE from packages/components/README.md or an absolute
/LICENSE) so the link resolves to the repo root LICENSE.
- Around line 35-37: Fix the broken relative links in the package table by
updating the hrefs to be correct from packages/components/README.md: change the
`@opentiny/tiny-robot` link target from `./packages/components` to `.` (or
`./`), change `@opentiny/tiny-robot-kit` from `./packages/kit` to `../kit`, and
change `@opentiny/tiny-robot-svgs` from `./packages/svgs` to `../svgs`; adjust
only the markdown link targets in the table where the package names
`@opentiny/tiny-robot`, `@opentiny/tiny-robot-kit`, and
`@opentiny/tiny-robot-svgs` appear.

---

Nitpick comments:
In `@packages/components/vite.config.ts`:
- Around line 12-23: The closeBundle hook currently copies rootReadme into the
source file targetReadme (packages/components/README.md) causing git-dirty
builds; change the target to the build output directory instead (e.g.
resolve(__dirname, 'dist/README.md') or use the actual outputDir used by the
Vite build), ensure the target directory exists before copying, and update the
log message accordingly so closeBundle copies rootReadme -> build output README
rather than mutating the tracked source README; reference the closeBundle
function and the rootReadme/targetReadme variables when making the change.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 558095a and 936a06d.

📒 Files selected for processing (7)
  • packages/components/README.md
  • packages/components/package.json
  • packages/components/vite.config.ts
  • packages/kit/README.md
  • packages/kit/package.json
  • packages/svgs/README.md
  • packages/svgs/package.json

hexqi
hexqi previously approved these changes Feb 27, 2026
- Added homepage field to package.json files for components, kit, and svgs.
- Removed the README.md file from the components package to streamline documentation management.
- Enhanced vite.config.ts to copy multiple root files (README.md, README_zh.md, LICENSE) to the components directory for better accessibility.
- Created a .gitignore file to exclude README.md, README_zh.md, and LICENSE from version control, ensuring cleaner repository management.
- Bumped version to 0.4.0-alpha.12 in package.json.
- Added README files to the list of files included in the package distribution for better documentation accessibility.
- Updated the English README link to point to the new Chinese README file (README.zh-CN.md).
- Added a new README.zh-CN.md file for Chinese documentation.
- Modified .gitignore to exclude the new README file.
- Updated vite.config.ts to copy the new README file during the build process.
gene9831 added 4 commits March 2, 2026 11:06
- Changed the logo image source to a direct link from the repository.
- Updated the Chinese README link to point to the raw file in the repository.
- Reformatted the package table for better readability.
- Updated the LICENSE link to point to the raw file in the repository.
- Changed logo image source to a direct link from the repository.
- Updated links to the English README and LICENSE for better accessibility.
- Reformatted the package table for improved readability.
- Changed links in both English and Chinese README files to point directly to the respective Contributing Guide documents on GitHub.
@hexqi hexqi merged commit be1ef31 into opentiny:develop Mar 2, 2026
3 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

🧹 Preview Cleaned Up

The preview deployment has been removed.

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