Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: 细化维护者指南 #225

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

GaoNeng-wWw
Copy link
Collaborator

@GaoNeng-wWw GaoNeng-wWw commented Nov 13, 2024

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Documentation
    • Updated the maintainer guide with clearer steps for publishing test packages.
    • Renumbered and reorganized steps to improve clarity.
    • Added a checklist to ensure proper task completion and emphasized the importance of restarting the terminal after modifying environment variables.

Copy link

coderabbitai bot commented Nov 13, 2024

Walkthrough

The document docs/maintainer-guide.md has been revised to improve the clarity of the steps for publishing test packages. Changes include the renumbering and reordering of steps, the addition of new instructions, and updates to the checklist to ensure proper sequence and verification of tasks. Notably, instructions regarding the necessity of restarting the terminal after modifying environment variables have been emphasized for better user guidance.

Changes

File Change Summary
docs/maintainer-guide.md Modified steps for publishing test packages: renumbered and reordered steps, added new instructions, and updated checklist. Emphasized the need to restart the terminal after changing environment variables.

Poem

In the guide where bunnies hop,
Steps now clear, they never stop.
With each change, a path anew,
Publishing test packages, easy to do!
Restart that terminal, don't delay,
Happy hopping, hip-hip-hooray! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 0

🧹 Outside diff range and nitpick comments (4)
docs/maintainer-guide.md (4)

53-61: Enhance clarity of publishing steps

Consider the following improvements to make the steps more foolproof:

  1. Add a prerequisite step to verify npm login status (npm whoami)
  2. Clarify step 5 with a complete example:
    5. 修改环境变量`TINY_SCOPE=xxx` (第一步中替换的结果, 但是不要包含@)
       1. 例如 `@foo/tiny-toolkit-pro`,TINY_SCOPE应该是`foo`而不是`@foo`
    +   2. 完整示例: 如果您的包名是 `@john/tiny-toolkit-pro`,则设置 `TINY_SCOPE=john`
  3. Add explanation for steps 7-8:
    7. `rm -rf ~/.tiny`
    +   # 清除缓存以确保新的scope设置生效
    8. `tiny init pro`
    +   # 使用新的scope初始化环境

53-61: Improve environment variable section formatting

Consider using a more prominent warning box format:

-> ⚠️ 重要提示
->
-> 修改环境变量后必须重启终端才能生效。这是一个常见的错误来源。
->
-> 各操作系统的环境变量设置指南:
-> - [Linux 环境变量指南](https://wiki.archlinuxcn.org/wiki/%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F)
-> - [Windows 环境变量指南](https://support.esri.com/zh-cn/knowledge-base/edit-an-environment-variable-1462478594981-000002146)
-> - [macOS 环境变量指南](https://support.apple.com/zh-cn/guide/terminal/apd382cc5fa-4f58-4449-b20a-41c53c006f8f/mac)

This format provides better visual hierarchy and makes the warning more noticeable.


53-61: Enhance safety checks in publishing checklists

Consider adding these important verification steps to both checklists:

+- [ ] 已验证 npm 登录状态 (`npm whoami`)
+- [ ] 已验证包的内容 (`npm pack` 并检查 .tgz 文件内容)
+- [ ] 已在新的终端验证环境变量设置 (`echo $TINY_SCOPE`)

These additional checks will help prevent common publishing mistakes.


53-61: Consider adding a troubleshooting section

The guide would benefit from a troubleshooting section that addresses common issues:

## 常见问题排查

### 发布失败
- 确认 npm 登录状态
- 检查包名是否已被占用
- 验证 package.json 中的版本号

### 环境变量问题
- 确认环境变量格式正确
- 验证终端已重启
- 检查 TINY_SCOPE 值

### 初始化失败
- 确认 ~/.tiny 目录已清理
- 验证 CLI 工具安装正确

This would help users resolve common issues independently.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 0788f02 and 60e90e1.

📒 Files selected for processing (1)
  • docs/maintainer-guide.md (1 hunks)

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.

1 participant