Skip to content

feat: add isolated-vm binary mirror config#69

Draft
iola1999 wants to merge 3 commits intocnpm:masterfrom
iola1999:feat/isolated-vm
Draft

feat: add isolated-vm binary mirror config#69
iola1999 wants to merge 3 commits intocnpm:masterfrom
iola1999:feat/isolated-vm

Conversation

@iola1999
Copy link

@iola1999 iola1999 commented Feb 26, 2026

close #68.
cnpm/cnpmcore#977 镜像生效后再合并这个。

Summary by CodeRabbit

  • Chores
    • Added environment variable mapping for isolated-vm binary hosting configuration
    • Updated test configuration to validate new environment variable setup

@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4124598 and 0a9fb9d.

📒 Files selected for processing (2)
  • package.json
  • test/index.test.js

📝 Walkthrough

Walkthrough

This pull request adds support for isolated-vm binary mirror configuration by introducing a new environment variable mapping in the npm mirrors configuration. The same environment variable is added to corresponding test cases to maintain test coverage consistency.

Changes

Cohort / File(s) Summary
Environment Variable Configuration
package.json
Added npm_config_isolated_vm_binary_host environment variable mapping to the China mirrors configuration, pointing to the npmmirror CDN for isolated-vm prebuilt binaries.
Test Updates
test/index.test.js
Added corresponding npm_config_isolated_vm_binary_host environment variable entry to three test blocks to align test snapshots with the new configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • feat: add env for gl@8 #55: Similar mirror configuration addition for another binary package (gl), following the same pattern of adding npm_config_*_binary_host entries to package.json and test files.

Suggested labels

enhancement

Suggested reviewers

  • fengmk2
  • killagu

Poem

🐰 A mirror so bright for isolated-vm,
The rabbit hops quickly, completing the trim!
npm_config now points to the CDN so fast,
Test snapshots all matching at last! ✨

🚥 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 accurately describes the main change: adding an isolated-vm binary mirror configuration to the mirrors configuration.
Linked Issues check ✅ Passed The PR fulfills the requirement in issue #68 to add mirror configuration for isolated-vm prebuilt artifacts.
Out of Scope Changes check ✅ Passed All changes are scoped to adding isolated-vm binary mirror configuration as requested in issue #68; no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

@gemini-code-assist
Copy link

Summary of Changes

Hello @iola1999, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求通过引入 isolated-vm 模块的专用二进制镜像配置,旨在提升该模块在项目中的安装效率和稳定性。这一改动有助于解决在特定网络环境下,直接从官方源下载二进制文件可能遇到的连接或速度问题,从而简化开发流程。

Highlights

  • 新增 isolated-vm 二进制镜像配置: 在 package.json 中添加了 isolated-vm 模块的二进制文件镜像配置,将其指向 https://cdn.npmmirror.com/binaries/isolated-vm,以优化其安装过程。
Changelog
  • package.json
    • 新增了 npm_config_isolated_vm_binary_host 配置项,用于指定 isolated-vm 模块的二进制文件下载源。
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

此拉取请求为 isolated-vm 添加了二进制镜像配置。这是一个有益的补充。然而,我发现了一些问题:首先,相关的测试用例没有更新,这将导致持续集成(CI)失败。其次,为了提高代码的可维护性,建议对 package.jsonnpm_config_* 相关的配置项进行字母排序。

@iola1999 iola1999 marked this pull request as ready for review March 3, 2026 07:18
@iola1999 iola1999 marked this pull request as draft March 3, 2026 08:12
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.

请求为 isolated-vm 预构建产物添加镜像

1 participant