feat(actions): upgrade deps#58
Open
liweijie0812 wants to merge 41 commits intomainfrom
Open
Conversation
refactor(github-helper): 重构 GithubHelper 类并改进错误处理 feat(upgrade-deps): 新增依赖升级工作流和工具 chore: 更新 pnpm 工作区配置和依赖
test(git-helper): 添加测试token的特殊处理逻辑
refactor: 更新@actions/core和@actions/github依赖版本 docs: 为定时器相关函数添加详细注释
在 main.ts 中移除多余空行,在 git-helper.ts 中将 == 改为 === 进行严格比较
在获取依赖项输入时添加trimWhitespace选项以去除空格 添加depInfos的调试日志输出以便排查问题
替换原有的npm CLI命令方式,改为通过npm registry API直接获取包的最新版本信息 添加错误处理和警告日志,当获取包信息失败时跳过该包而不是终止流程
将获取npm包最新版本时的警告信息(core.warning)改为错误信息(core.error),以更明确地标识获取包信息失败的情况
- 使用原始包名而非编码后的名称显示错误信息 - 将警告日志升级为错误日志以提高可见性 - 添加对依赖项名称中引号的清理处理
不再对npm包名进行URI编码,因为npm registry可以直接处理未编码的包名。这修复了某些特殊包名无法正确查询的问题。
在生成依赖升级分支名时,处理依赖名称中的特殊字符,将其替换为连字符以避免生成无效的分支名
将分支名称从 'chore(deps): upgrade-...' 格式改为 'chore/deps/upgrade-...' 格式,以保持命名一致性
添加 target-dir 输入参数,允许在 monorepo 的子目录中执行依赖升级。同时更新测试工作流以验证此功能。
移除 tdesign-site 路径的引号以保持工作流文件格式一致性
在依赖升级测试工作流中指定使用 pnpm 包管理器,以确保与项目现有依赖管理方式保持一致。
为 actions/setup-node 步骤明确指定 node-version 为 22,以确保测试环境的一致性,避免因默认版本变化导致构建失败。
将工作流文件中的依赖包名用引号包裹,以避免 YAML 解析错误。
在克隆仓库后自动初始化子模块,确保依赖更新流程完整
允许在升级依赖时指定自定义的 PR 标题,当未指定时仍使用默认标题格式
移除不再使用的pnpm catalog相关代码,清理冗余依赖导入 优化测试工作流中的job名称以更清晰地标识项目
将获取包版本和更新依赖的逻辑拆分为更小的函数 使用常量对象管理不同包管理器的命令 移除不必要的 ActionError 类,使用原生 Error 优化错误变量命名以避免冲突
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.
No description provided.