fix!: specify type of backing buffer when Uint8Arrays are returned#335
Merged
Conversation
Future-proofing against upcoming aegir upgrade that enables node.js type stripping to remove the need to build before testing.
lidel
reviewed
May 5, 2026
Member
lidel
left a comment
There was a problem hiding this comment.
lgtm, iiuc enables sync require() from CJS in Node 22+ which is welcome quality of life improvement
but i think should be marked as breaking change? (fix!: or feat!:) + also check two small (optional) nits below
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Member
Author
I was hoping to avoid that since most code has historically assumed In which case I'd like to get #337 in too, if we merge them at the same time only one major version bump would occur. |
github-actions Bot
pushed a commit
that referenced
this pull request
May 7, 2026
## [14.0.0](v13.4.2...v14.0.0) (2026-05-07) ### ⚠ BREAKING CHANGES * all `Hasher`s are now `MultihashHasher<Code>`s * Returned `Uint8Array`s are now `Uint8Array<ArrayBuffer>` ### Bug Fixes * identity hash is SyncMultihashHasher<0> ([#337](#337)) ([9b5b12b](9b5b12b)), closes [#313](#313) [#314](#314) * specify type of backing buffer when Uint8Arrays are returned ([#335](#335)) ([bac2da5](bac2da5))
|
🎉 This PR is included in version 14.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since microsoft/TypeScript#59417
Uint8Arrays are generic so update the types here to be explicit about what backing buffer is used by theUint8Arraythat is returned from operations, but be flexible enough to accept any type of backing buffer.Upgrades aegir to update
@types/nodeto 24.x (e.g. lts) and enables node.js type stripping to remove the need to build before testing.Uint8Arrays are returned, ensure they areUint8Array<ArrayBuffer>BREAKING CHANGE: Returned
Uint8Arrays are nowUint8Array<ArrayBuffer>