feat: 升级到 Node.js 22 和 React 18 (v2.4.0)#26
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 变更概述
本PR将项目升级到最新的 Node.js 22 LTS 版本,并同时升级了React生态系统和相关依赖。
🚀 主要变更
Node.js 升级
React 生态系统升级
^16.0.0→^18^16.0.0→^18^17.0.37→^18^17.0.11→^18TypeScript 升级
4.7.4→^5.3.0^18.11.17→^22.0.0@realsee 生态系统
5.0.0-alpha.149→^6.4.0-alpha.36^2.19.3→^3.67.1🔧 代码修复
React 18 兼容性修复
VreoProviderProps接口缺少children属性的问题resources/react/index.tsxTypeScript 5.x 严格类型检查修复
修复
NodeJS.Timer→NodeJS.Timeout类型问题文件:
__test__/shared-utils/debounce.ts添加泛型约束
extends Record<string, any>文件:
resources/shared-utils/animationFrame/BetterTween.ts文件:
resources/shared-utils/animationFrame/tween.ts添加空值检查防止 undefined 错误
文件:
resources/Player/modules/keyframes/UpdateVRPanorama/index.tsx📁 新增文件
.nvmrc- Node.js 版本锁定.npmrc- npm 配置.github/workflows/ci.yml- GitHub Actions CI 配置NODE_22_UPGRADE.md- 详细升级文档⚙️ 配置更新
package.json
{ "engines": { "node": ">=22.0.0", "npm": ">=10.0.0" } }GitHub Actions CI
✅ 测试验证
npm run build)npm run dev)🚨 Breaking Changes
📖 迁移指南
对于开发者
nvm use 22rm -rf node_modules package-lock.jsonnpm install --legacy-peer-deps对于使用者
NODE_22_UPGRADE.md获取详细信息🔗 相关资源
✨ 下一步