jimexist opened a new pull request, #3527:
URL: https://github.com/apache/thrift/pull/3527
## Summary
Replaces the `uuid` npm package with a tiny in-tree helper. The runtime was
only using `parse()` and `stringify()` from the library in two protocol files —
trivial hex/UUID conversions that don't justify an external dependency.
## Changes
- Add [`lib/nodejs/lib/thrift/uuid.js`](lib/nodejs/lib/thrift/uuid.js) —
native `parse` (validating UUID string → 16-byte `Uint8Array`) and `stringify`
(16 bytes → canonical lowercase UUID string). Both throw `TypeError` on invalid
input, matching the library's behavior at the call sites.
- Update [`binary_protocol.js`](lib/nodejs/lib/thrift/binary_protocol.js)
and [`compact_protocol.js`](lib/nodejs/lib/thrift/compact_protocol.js) to
`require("./uuid")`.
- Remove `uuid` from `package.json` dependencies and regenerate
`package-lock.json`. (The transitive `[email protected]` pulled in by
`istanbul-lib-processinfo` remains — it's a devDep we don't control.)
`lib/nodejs/test/package-lock.json` is left untouched; it has been stale
across recent uuid bumps and is out of scope here.
## Why
One fewer supply-chain surface for a built-in capability. Node has no native
UUID parse/stringify, but the implementations are short enough to live in-tree.
## Checklist
- [x] No JIRA ticket — trivial dependency cleanup, in line with previous
"Bump uuid" commits.
- [x] Single squashed commit.
- [x] `Client:` tag included in commit message.
- [x] AI authorship labeled via `Co-Authored-By:`.
- [ ] Tests: no behavior change; existing protocol tests cover read/write
round-trips. Verified parse/stringify round-trip and validation behavior
locally.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]