You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR migrates the build tooling from unbuild to tsdown, bumps TypeScript from 5.8 to 6.0, and extracts shared buffer-coercion logic into a new src/bytes.ts helper (toBufferSource and toUint8Array) that all crypto/encoding modules now import.
tsdown.config.mts mirrors the old build.config.ts entry list; unbundle: true keeps each entry as a separate emitted file so bytes.ts is naturally emitted as a shared chunk without needing an explicit entry.
bytes.ts correctly handles the SharedArrayBuffer-backed view edge case (WebCrypto rejects SharedArrayBuffer), and its JSDoc documents the ArrayBuffer-vs-TypedArray memory semantics noted in a prior review thread.
TypeScript 6 defaults types to [], no longer auto-including @types/node; password.node.ts uses Buffer as an ambient type that won't be in scope without \"types\": [\"node\"] in tsconfig.json.
Confidence Score: 4/5
Safe to merge once the tsconfig types omission is addressed; all other changes are mechanical refactors with no behavioral regressions.
The TypeScript 6 bump changes the default for types to an empty array, meaning @types/node ambient globals (specifically Buffer, used as a return-type annotation in password.node.ts) are no longer auto-included. This would make tsc --noEmit fail on the password.node.ts entry. Everything else looks correct.
Files Needing Attention: tsconfig.json needs types: [node] added to compilerOptions to keep @types/node ambient globals available under TypeScript 6.
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
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.
Replaces unbuild with tsdown, bumps TypeScript to 6, and centralizes buffer coercion in a shared
byteshelper