-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: node ignores #1716
fix: node ignores #1716
Conversation
Warning Rate limit exceeded@akitaSummer has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 53 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. Walkthrough此拉取请求对 Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
WalkthroughThis pull request addresses an issue in Node.js 23 where Changes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
crates/mako/src/features/node.rs (1)
27-30
: 代码实现正确,建议补充注释说明代码变更正确解决了 Node.js 23 内置模块的解析问题。建议在注释中详细说明为什么需要两个独立的 ignore 模式:
- 第一个模式用于匹配已知的内置模块(无论是否带有 "node:" 前缀)
- 第二个模式用于匹配所有以 "node:" 开头的模块(包括未来可能新增的内置模块)
建议添加如下注释:
// If it starts with "node:", they are all built-in node modules. +// 这个模式用于处理所有以 "node:" 开头的模块,包括现有和未来的内置模块 +// 上面的模式用于向后兼容不带 "node:" 前缀的内置模块调用 config.ignores.push(format!( "^(node:)(/.+|$)", ));
45b1a3c
to
c592309
Compare
c592309
to
23e8fa8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1716 +/- ##
=======================================
Coverage 54.91% 54.91%
=======================================
Files 178 178
Lines 17840 17841 +1
=======================================
+ Hits 9797 9798 +1
Misses 8043 8043 ☔ View full report in Codecov by Sentry. |
求发个版本 |
This solution hides problems, such as the fact that this error is not reported at compile time when |
And, no testcases added. |
In Node.js 23,
node:sqlite
is built-in, but when usingrequire('sqlite')
alone, it should refer to the community package. Considering this scenario, all require statements starting withnode:
should be treated as using Node's built-in modules.https://nodejs.org/docs/latest/api/sqlite.html
Summary by CodeRabbit