-
Notifications
You must be signed in to change notification settings - Fork 98
chore(deps): upgrade base-x to v5 #897
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
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Comment |
…code Co-authored-by: fengmk2 <[email protected]>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #897 +/- ##
==========================================
- Coverage 95.37% 95.25% -0.12%
==========================================
Files 197 197
Lines 22100 22102 +2
Branches 2444 2049 -395
==========================================
- Hits 21077 21054 -23
- Misses 1023 1048 +25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| return crcBytes.readUInt32BE(0) === crc32(bytes); | ||
| // base-x v5 returns Uint8Array instead of Buffer, use DataView to read UInt32BE | ||
| const dataView = new DataView(crcBytes.buffer, crcBytes.byteOffset, crcBytes.byteLength); | ||
| return dataView.getUint32(0, false) === crc32(bytes); |
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.
@copilot 这样修改后性能会变差吗?能否加一个 benchmark 对比一下性能?
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.
Ran a benchmark comparing Buffer.from() + readUInt32BE() vs DataView:
Testing with 10000 tokens
Buffer.from + readUInt32BE: 32.44ms (308,222 ops/sec)
DataView: 29.44ms (339,714 ops/sec)
Difference: -9.27% (DataView is FASTER)
The DataView approach is actually ~9% faster because it operates directly on the Uint8Array buffer without creating a new Buffer object (which involves memory allocation overhead).
[skip ci] ## <small>4.13.3 (2025-12-06)</small> * fix: zero copy to create a new Buffer (#916) ([683ee1d](683ee1d)), closes [#916](#916) [hi#level](https://github.com/hi/issues/level) * chore(deps): update mime-types to v3 (#899) ([0a5c90c](0a5c90c)), closes [#899](#899) [#865](#865) * chore(deps): upgrade base-x to v5 (#897) ([d3e4fae](d3e4fae)), closes [#897](#897) [#864](#864)
|
🎉 This PR is included in version 4.13.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Addresses #864 - upgrades
base-xfrom v3 to v5.Breaking Change
base-xv5 returnsUint8Arrayfromdecode()instead ofBuffer. TheBuffer.readUInt32BE()method doesn't exist onUint8Array.Changes
base-x^3.0.11→^5.0.0DataViewto read the CRC32 value from decoded bytesWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com//advisories/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.