Commit d3e4fae
chore(deps): upgrade base-x to v5 (#897)
Addresses #864 - upgrades `base-x` from v3 to v5.
## Breaking Change
`base-x` v5 returns `Uint8Array` from `decode()` instead of `Buffer`.
The `Buffer.readUInt32BE()` method doesn't exist on `Uint8Array`.
## Changes
- **package.json**: `base-x` `^3.0.11` → `^5.0.0`
- **app/common/UserUtil.ts**: Use `DataView` to read the CRC32 value
from decoded bytes
```typescript
// Before (v3 - Buffer)
return crcBytes.readUInt32BE(0) === crc32(bytes);
// After (v5 - Uint8Array)
const dataView = new DataView(crcBytes.buffer, crcBytes.byteOffset, crcBytes.byteLength);
return dataView.getUint32(0, false) === crc32(bytes);
```
> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `https://api.github.com//advisories`
> - Triggering command:
`/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:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/cnpm/cnpmcore/settings/copilot/coding_agent)
(admins only)
>
> </details>
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
> fix #864, upgrade base-x to v5
</details>
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 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](https://gh.io/copilot-coding-agent-tips) in the docs.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: fengmk2 <[email protected]>
Co-authored-by: MK (fengmk2) <[email protected]>1 parent 520238b commit d3e4fae
2 files changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
0 commit comments