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

feat: add bundle for windows #1575

Merged
merged 6 commits into from
Sep 9, 2024
Merged

feat: add bundle for windows #1575

merged 6 commits into from
Sep 9, 2024

Conversation

sorrycc
Copy link
Member

@sorrycc sorrycc commented Sep 6, 2024

Close #1480

参考:
#1508

Summary by CodeRabbit

Summary by CodeRabbit

  • 新功能
    • 增加对32位和64位Windows环境的支持,提升了项目的兼容性和部署选项。
    • 更新多个包至新版本,包含新功能和修复。
  • 错误修复
    • 移除了CLI应用程序对Windows平台的错误处理逻辑,允许CLI在Windows上运行。

Copy link
Contributor

coderabbitai bot commented Sep 6, 2024

Walkthrough

此次更改主要涉及在 GitHub Actions 工作流中新增针对 Windows 环境的构建配置,支持 x86_64-pc-windows-msvci686-pc-windows-msvc 两种架构。此外,多个包的 package.json 文件更新了版本号,并增加了对新架构的支持,提升了在 Windows 和其他环境中的兼容性。同时,CLI 应用程序移除了对 Windows 平台的错误处理逻辑。

Changes

文件路径 更改摘要
.github/workflows/node-bind-build.yml, packages/mako/package.json, packages/bundler-mako/package.json, packages/mako/npm/darwin-arm64/package.json, packages/mako/npm/darwin-x64/package.json, packages/mako/npm/linux-arm64-gnu/package.json, packages/mako/npm/linux-arm64-musl/package.json, packages/mako/npm/linux-x64-gnu/package.json, packages/mako/npm/linux-x64-musl/package.json, packages/mako/npm/win32-ia32-msvc/package.json, packages/mako/npm/win32-x64-msvc/package.json 更新版本号至 0.8.9-canary.20240906.2,新增对 x86_64-pc-windows-msvci686-pc-windows-msvc 架构的支持。
packages/mako/src/cli.ts 移除了对 Windows 平台的错误处理逻辑。

Assessment against linked issues

Objective Addressed Explanation
CI工作流支持多个操作系统(包括Windows) (#1480)
新增处理Windows文件路径的工具函数 (#1480) 未见相关工具函数的实现。
更新脚本逻辑以确保跨平台路径构造的一致性 (#1480) 未见相关脚本逻辑的更新。

Poem

在草丛中我欢跃,
新架构如花绽放,
Windows 上的旅途,
兼容性更强壮。
小兔子我跳跃,
为更好的未来歌唱! 🐇✨


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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
Contributor

@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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 569ee40 and 8990551.

Files selected for processing (2)
  • .github/workflows/node-bind-build.yml (1 hunks)
  • packages/mako/package.json (1 hunks)
Additional comments not posted (2)
packages/mako/package.json (1)

17-19: 新增架构支持

代码正确地在 napi 配置中添加了新的目标架构 "i686-pc-windows-msvc""x86_64-pc-windows-msvc"。这些更改与 PR 目标一致,扩展了包在 Windows 环境中的兼容性。

.github/workflows/node-bind-build.yml (1)

68-79: 新增 Windows 构建配置

代码正确地在 GitHub Actions 工作流中添加了针对 x86_64-pc-windows-msvci686-pc-windows-msvc 的新构建配置。这些更改扩展了项目在多个 Windows 架构上的构建能力,提高了兼容性和部署选项。

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.00%. Comparing base (569ee40) to head (9a8b5fd).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1575   +/-   ##
=======================================
  Coverage   62.00%   62.00%           
=======================================
  Files         127      127           
  Lines       15344    15344           
=======================================
  Hits         9514     9514           
  Misses       5830     5830           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8990551 and 918b5f7.

Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing (10)
  • packages/bundler-mako/package.json (1 hunks)
  • packages/mako/npm/darwin-arm64/package.json (1 hunks)
  • packages/mako/npm/darwin-x64/package.json (1 hunks)
  • packages/mako/npm/linux-arm64-gnu/package.json (2 hunks)
  • packages/mako/npm/linux-arm64-musl/package.json (1 hunks)
  • packages/mako/npm/linux-x64-gnu/package.json (1 hunks)
  • packages/mako/npm/linux-x64-musl/package.json (1 hunks)
  • packages/mako/npm/win32-ia32-msvc/package.json (2 hunks)
  • packages/mako/npm/win32-x64-msvc/package.json (2 hunks)
  • packages/mako/package.json (3 hunks)
Files skipped from review due to trivial changes (4)
  • packages/mako/npm/darwin-arm64/package.json
  • packages/mako/npm/darwin-x64/package.json
  • packages/mako/npm/linux-x64-gnu/package.json
  • packages/mako/npm/win32-ia32-msvc/package.json
Additional comments not posted (6)
packages/mako/npm/win32-x64-msvc/package.json (1)

3-3: 版本更新审查通过。

版本从 0.0.0 更新到 0.8.9-canary.20240906.1,适合于重大更新或添加的情况。使用 "canary" 标签对于正在进行的功能是恰当的,允许在稳定版本发布前进行测试。

packages/mako/npm/linux-x64-musl/package.json (1)

3-3: 版本更新审查通过。

版本从 0.8.8 更新到 0.8.9-canary.20240906.1,适合于重大更新或添加的情况。使用 "canary" 标签对于正在进行的功能是恰当的,允许在稳定版本发布前进行测试。

packages/mako/npm/linux-arm64-musl/package.json (1)

3-3: 版本更新审查通过。

版本从 0.8.8 更新到 0.8.9-canary.20240906.1,适合于重大更新或添加的情况。使用 "canary" 标签对于正在进行的功能是恰当的,允许在稳定版本发布前进行测试。

packages/mako/npm/linux-arm64-gnu/package.json (1)

3-3: 版本更新审查

此次更改将版本号从 0.0.0 更新至 0.8.9-canary.20240906.1。请确保此版本与 Linux ARM64 架构的兼容性。

packages/bundler-mako/package.json (1)

3-3: 版本及依赖更新审查

此次更改将 @umijs/bundler-mako 的版本号从 0.8.8 更新至 0.8.9-canary.20240906.1,并更新了对 @umijs/mako 的依赖版本。请确保这些更新不会影响现有功能,并与其他依赖项保持兼容。

Also applies to: 6-6

packages/mako/package.json (1)

3-3: 版本更新及架构扩展审查

此次更改更新了版本号至 0.8.9-canary.20240906.1,并新增了对 Windows 环境的支持(i686-pc-windows-msvcx86_64-pc-windows-msvc)。此外,更新了可选依赖项以反映新版本。请确保在 Windows 平台上进行彻底测试,以验证新架构的兼容性和功能。

Also applies to: 17-19, 80-87

@sorrycc sorrycc changed the title WIP: feat: add bundle for windows feat: add bundle for windows Sep 6, 2024
Copy link
Contributor

@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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 918b5f7 and 9a8b5fd.

Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing (11)
  • packages/bundler-mako/package.json (1 hunks)
  • packages/mako/npm/darwin-arm64/package.json (1 hunks)
  • packages/mako/npm/darwin-x64/package.json (1 hunks)
  • packages/mako/npm/linux-arm64-gnu/package.json (2 hunks)
  • packages/mako/npm/linux-arm64-musl/package.json (1 hunks)
  • packages/mako/npm/linux-x64-gnu/package.json (1 hunks)
  • packages/mako/npm/linux-x64-musl/package.json (1 hunks)
  • packages/mako/npm/win32-ia32-msvc/package.json (2 hunks)
  • packages/mako/npm/win32-x64-msvc/package.json (2 hunks)
  • packages/mako/package.json (3 hunks)
  • packages/mako/src/cli.ts (1 hunks)
Files skipped from review as they are similar to previous changes (10)
  • packages/bundler-mako/package.json
  • packages/mako/npm/darwin-arm64/package.json
  • packages/mako/npm/darwin-x64/package.json
  • packages/mako/npm/linux-arm64-gnu/package.json
  • packages/mako/npm/linux-arm64-musl/package.json
  • packages/mako/npm/linux-x64-gnu/package.json
  • packages/mako/npm/linux-x64-musl/package.json
  • packages/mako/npm/win32-ia32-msvc/package.json
  • packages/mako/npm/win32-x64-msvc/package.json
  • packages/mako/package.json
Additional comments not posted (3)
packages/mako/src/cli.ts (3)

Line range hint 41-53: 帮助功能实现正确

showHelp 函数提供了 CLI 的帮助信息,实现看起来没有问题。


Line range hint 55-67: 构建帮助功能实现正确

showBuildHelp 函数为构建命令提供了帮助信息,实现看起来没有问题。


Line range hint 1-39: 移除 Windows 平台的错误处理逻辑

根据 AI 生成的摘要,此次更改移除了针对 Windows 平台的错误处理逻辑。这可能会导致 Windows 用户在使用 CLI 时遇到未处理的错误。建议进行彻底的测试,以确保在 Windows 上的兼容性和稳定性。

请运行以下脚本来验证 Windows 平台上的行为:

@sorrycc sorrycc merged commit 0e506db into master Sep 9, 2024
21 checks passed
@sorrycc sorrycc deleted the sorrycc-5qfc branch September 9, 2024 05:58
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