Skip to content

fix(edgeone): 修复 MAX_REQUEST_TIMES 被版本号替换误伤#995

Merged
imaegoo merged 1 commit into
twikoojs:mainfrom
jeoor:main
Jun 18, 2026
Merged

fix(edgeone): 修复 MAX_REQUEST_TIMES 被版本号替换误伤#995
imaegoo merged 1 commit into
twikoojs:mainfrom
jeoor:main

Conversation

@jeoor

@jeoor jeoor commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

修复 EdgeOne Pages 部署时的语法解析错误

提交 19d27ff8efd4dff3f552fbc4a63554502c1fe28c 中,版本号替换误将 MAX_REQUEST_TIMES 替换为 1.7.12EQUEST_TIMES,导致 EdgeOne Pages 部署时 Babel 解析 cloud-functions/index.js 失败。

变更

  • 修复 1.7.12EQUEST_TIMESMAX_REQUEST_TIMES
  • VERSION 同步为 1.7.12

影响

修复后 cloud-functions/index.js 可以被 EdgeOne CLI 正常解析,避免部署阶段出现 InvalidOrMissingExponent 语法错误。

@sourcery-ai

sourcery-ai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor
审阅者指南(在小型 PR 中折叠)

审阅者指南

修复由自动版本替换造成的常量名称错误,并在 EdgeOne Pages 云函数入口中将 VERSION 常量更新到 1.7.12。

文件级更改

变更 详情 文件
恢复损坏的常量名称,并在 EdgeOne Pages 云函数入口点中更新 VERSION。
  • 在从 twikoo-func/utils/constants 解构常量时,将错误转换得到的常量 1.7.12EQUEST_TIMES 替换为正确的 MAX_REQUEST_TIMES
  • 将 VERSION 常量从 '1.7.11' 更新为 '1.7.12',以反映当前发布版本。
src/server/eo-pages/cloud-functions/index.js

提示和命令

与 Sourcery 交互

  • 触发新的审阅: 在 pull request 中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审阅评论。
  • 从审阅评论生成 GitHub issue: 回复某条审阅评论,请求 Sourcery 从该评论创建 issue。你也可以回复该评论并输入 @sourcery-ai issue 来从中创建 issue。
  • 生成 pull request 标题: 在 pull request 标题的任意位置写入 @sourcery-ai,即可在任何时候生成标题。你也可以在 pull request 中评论 @sourcery-ai title 来(重新)生成标题。
  • 生成 pull request 摘要: 在 pull request 正文的任意位置写入 @sourcery-ai summary,即可在你想要的位置生成 PR 摘要。你也可以在 pull request 中评论 @sourcery-ai summary 来(重新)生成摘要。
  • 生成审阅者指南: 在 pull request 中评论 @sourcery-ai guide,即可在任何时候(重新)生成审阅者指南。
  • 解决所有 Sourcery 评论: 在 pull request 中评论 @sourcery-ai resolve,以解决所有 Sourcery 评论。如果你已经处理完所有评论且不想再看到它们,这将非常有用。
  • 忽略所有 Sourcery 审阅: 在 pull request 中评论 @sourcery-ai dismiss,即可忽略所有现有的 Sourcery 审阅。若你想在一个全新的审阅基础上重新开始,这尤其有用——别忘了再评论 @sourcery-ai review 来触发新的审阅!

自定义你的体验

访问你的 dashboard 来:

  • 启用或禁用审阅功能,例如 Sourcery 生成的 pull request 摘要、审阅者指南等。
  • 更改审阅语言。
  • 添加、删除或编辑自定义审阅说明。
  • 调整其他审阅设置。

获取帮助

Original review guide in English
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Fixes a constant name corruption from an automated version replacement and bumps the VERSION constant to 1.7.12 in the EdgeOne Pages cloud function entrypoint.

File-Level Changes

Change Details Files
Restore the corrupted constant name and update the VERSION in the EdgeOne Pages cloud functions entrypoint.
  • Replace the incorrectly transformed constant 1.7.12EQUEST_TIMES with the correct MAX_REQUEST_TIMES in the constants destructuring from twikoo-func/utils/constants.
  • Bump the VERSION constant from '1.7.11' to '1.7.12' to reflect the current release.
src/server/eo-pages/cloud-functions/index.js

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

嗨——我已经审查了你的改动,看起来非常棒!


Sourcery 对开源项目是免费的——如果你喜欢我们的评审,请考虑分享给他人 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈来改进评审质量。
Original comment in English

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@imaegoo imaegoo merged commit 3d765aa into twikoojs:main Jun 18, 2026
2 checks passed
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.

2 participants