build: 修复 NODE_OPTIONS 的跨平台设置 - #515
GoodScholar wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe build scripts now set ChangesBuild memory options
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The build scripts now configure the Node.js memory limit cross-platform, with the dependency and lockfile entry aligned. Full builds remain normal follow-up validation, not a merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. 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. Comment |
变更说明
修复 core 的 ES/UMD 构建脚本在 macOS/Linux 下未向子进程导出
NODE_OPTIONS的问题。变更前
脚本通过
set NODE_OPTIONS="--max-old-space-size=4096" && ...设置内存参数。在 POSIX shell 中,set不会导出该环境变量;清除外部NODE_OPTIONS后,后续 Node 进程读取该变量为undefined。变更后
使用
cross-env-shell包裹原有的完整命令链,让类型生成、vue-tsc和 Vite 都继承--max-old-space-size=4096,保留原有执行顺序及&&失败中断语义。新增开发依赖
cross-env@^7.0.3,兼容项目声明的 Node >=18;同步 pnpm 锁文件,仅增加该依赖所需条目。变更类型
验证
NODE_OPTIONS。pnpm install --frozen-lockfile --ignore-scripts --offline --lockfile-only通过。git diff --check通过。未运行完整 ES/UMD 构建,未在 Windows/Linux 上实测,不据此声称构建 OOM 已解决。
相关 Issue
无关联 Issue。
Changeset
Summary by CodeRabbit