refactor(codegen): remove Buffer dependency from source maps (#25914)
## Summary - replace Node.js `Buffer` storage with `Uint8Array` in the source-map encoder - use `TextDecoder` to create the final mappings string - use `Uint8Array#set` when growing the mappings buffer - remove the `node:buffer` runtime dependency This makes source-map generation runtime-neutral and removes a blocker for browser support for the codegen package. ## Performance Indexed access, copying, and ASCII decoding have comparable performance. `Uint8Array` allocation requires zero-initialization, unlike `Buffer.allocUnsafe`, but the expected end-to-end impact is small.
C
camc314 committed
8e2b3bebcc9749fa6bda3d26b485635b93616cfe
Parent: cc2fab6