已关闭
fix: 将社区版本配置为 peerDependencies 解决 TS 类型检查报错。 #65
fix: 将社区版本配置为 peerDependencies 解决 TS 类型检查报错。 #65
已关闭
zhoukc42创建于 14 天前关闭于 9 天前
zhoukc42
zhoukc42
14 天前

fix: 将社区版本配置为 peerDependencies 解决 TS 类型检查报错。

likedislike
当前Pull Request已关闭, 关闭人@zhoukc42
zhoukc42zhoukc42
14 天前 关联了issue:82-将社区版本配置为 peerDependencies 解决 TS 类型检查报错。
zhoukc42
zhoukc42
14 天前 评论:

start build

likedislike
openharmony_ci
openharmony_ci成员
14 天前 评论:

感谢提交 Pull Requests!
Thanks for submitting a pull request.

likedislike
openharmony_ciopenharmony_ci成员
14 天前 添加了label:dco检查成功
openharmony_ci
openharmony_ci成员
14 天前 评论:

首次触发
门禁构建开始,包含静态检查、代码编译【rntpc_br_rnoh0.82编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6a991a2064650f998b442640/runlist

likedislike
cpf-manager
cpf-manager14 天前进行代码检视2
package.json
@@ -48,2 +48,3 @@
4848 "react": "*",
49- "react-native": "*"
49+ "react-native": "*",
50+ "react-native-linear-gradient": "3.0.0-alpha.1"
cpf-manager
cpf-manager14 天前评论:

【AI-Review】【严重】【基础代码问题】【代码逻辑错误】peerDependency 版本约束过严导致 npm 7+ 安装失败

● 问题:package.json:50 将 peerDependencies 中的 react-native-linear-gradient 指定为 "3.0.0-alpha.1"(精确版本号,在 npm semver 中等同于 =3.0.0-alpha.1,只接受这一个版本)。经查询 npm registry(https://registry.npmjs.org/react-native-linear-gradient),上游 react-native-linear-gradient 已发布多个 3.x 预发布版本(3.0.0-alpha.0、3.0.0-alpha.1、3.0.0-beta.0、3.0.0-beta.1、3.0.0-beta.2),dist-tags 中 latest 指向稳定版 2.8.3next 指向 3.0.0-beta.2。本包自身 harmony.aliasreact-native-linear-gradient(package.json:9),要求用户同时安装上游原版以提供 JS 层接口与 TS 类型定义。

● 影响:严重。用户在 RN 项目中执行 npm install @react-native-ohos/react-native-linear-gradient 时,npm 7+(2020 年 10 月起默认行为)开启严格 peer 依赖检查:若用户已安装或 npm 自动解析到的上游版本不是精确的 3.0.0-alpha.1(例如安装了稳定版 2.8.3、next 版 3.0.0-beta.2、或其他 3.x 预发布版本),npm 将抛出 ERESOLVE unable to resolve dependency tree 错误并使整个安装失败。这与本 PR 标题"解决 peerDependencies 报错"的目标相反,反而把报错扩大到绝大多数安装场景(仅安装精确 alpha.1 的用户能成功)。

● 建议:使用 semver 范围约束替代精确版本号,使 3.x 系列任意预发布版本均可通过 peer 检查。将 "react-native-linear-gradient": "3.0.0-alpha.1" 改为 "react-native-linear-gradient": "^3.0.0-alpha.1"(接受 3.0.0-alpha.1 及以上 3.x 版本)或 "react-native-linear-gradient": ">=3.0.0-alpha.1"。若实际仅验证过 alpha.1 兼容性,可在 README 中明确声明兼容性矩阵,但 peerDependencies 仍应使用范围约束以避免安装失败。

likedislike
zhoukc42
zhoukc42
12 天前 评论:

社区基线版本

openharmony_ciopenharmony_ci成员
14 天前 添加了label:编译成功
openharmony_ciopenharmony_ci成员
14 天前 添加了label:静态检查成功
openharmony_ciopenharmony_ci成员
14 天前 通过测试
openharmony_ci
openharmony_ci成员
14 天前 评论:

代码门禁通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/6a991a2064650f998b442640/runlist

静态检查:

# check type result report
1 codeCheck pass >>>

编译测试:
# Device build result package
1 rntpc_br_rnoh0.82 success >>>

likedislike
Hhuang_jy成员
13 天前 通过审查
openharmony_ci
openharmony_ci成员
13 天前 评论:

验证结果已超过12小时,之前验证结果无效,自动重新触发构建,请关注最新验证结果

likedislike
openharmony_ci
openharmony_ci成员
13 天前 评论:

start build

likedislike
openharmony_ciopenharmony_ci成员
13 天前 删除了label:编译成功
openharmony_ciopenharmony_ci成员
13 天前 删除了label:静态检查成功
openharmony_ci
openharmony_ci成员
13 天前 评论:

上次构建已超过12小时,重新全量验证,重置所有关联PR的验证状态
门禁构建开始,包含静态检查、代码编译【rntpc_br_rnoh0.82编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6a9a1b4b64650f998b93ab06/runlist

likedislike
openharmony_ciopenharmony_ci成员
13 天前 添加了label:编译成功
openharmony_ciopenharmony_ci成员
13 天前 添加了label:静态检查成功
openharmony_ciopenharmony_ci成员
13 天前 通过测试
openharmony_ci
openharmony_ci成员
13 天前 评论:

代码门禁通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/6a9a1b4b64650f998b93ab06/runlist

静态检查:

# check type result report
1 codeCheck pass >>>

编译测试:
# Device build result package
1 rntpc_br_rnoh0.82 success >>>

likedislike
zhoukc42
zhoukc42
12 天前 评论:

submit

likedislike
openharmony_ci
openharmony_ci成员
12 天前 评论:

验证结果已超过12小时,之前验证结果无效,自动重新触发构建,请关注最新验证结果

likedislike
openharmony_ci
openharmony_ci成员
12 天前 评论:

start build

likedislike
openharmony_ciopenharmony_ci成员
12 天前 删除了label:编译成功
openharmony_ciopenharmony_ci成员
12 天前 删除了label:静态检查成功
openharmony_ci
openharmony_ci成员
12 天前 评论:

上次构建已超过12小时,重新全量验证,重置所有关联PR的验证状态
门禁构建开始,包含静态检查、代码编译【rntpc_br_rnoh0.82编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6a9b852a64650f998b020191/runlist

likedislike
openharmony_ciopenharmony_ci成员
12 天前 添加了label:编译成功
openharmony_ciopenharmony_ci成员
12 天前 添加了label:静态检查成功
openharmony_ciopenharmony_ci成员
12 天前 通过测试
openharmony_ci
openharmony_ci成员
12 天前 评论:

代码门禁通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/6a9b852a64650f998b020191/runlist

静态检查:

# check type result report
1 codeCheck pass >>>

编译测试:
# Device build result package
1 rntpc_br_rnoh0.82 success >>>

likedislike
zhoukc42
zhoukc42
12 天前 评论:

submit

likedislike
openharmony_dcp
openharmony_dcp成员
12 天前 评论:

你因提交次数过多被限制提交,为保障上库效率、避免资源浪费,请先观看学习视频:https://dcp.openharmony.cn/workbench/video/videoDisplay

likedislike
zhoukc42zhoukc42
9 天前 关闭了 pull request
openharmony_ciopenharmony_ci成员
1 天前 删除了label:编译成功
openharmony_ciopenharmony_ci成员
1 天前 删除了label:静态检查成功
openharmony_ci
openharmony_ci成员
1 天前 评论:

代码有更新,重置PR验证状态

likedislike