Repository navigation
chore(release): version packages - #121
Merged
Merged
Conversation
This was referenced Nov 16, 2026
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
November 16, 2026 07:12
f5bf6c4 to
75dcbf5
Compare
commit: |
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
[email protected]
Minor Changes
1e0b85f: fix: correct stale comments and contracts that contradicted the code
nanoid(0)andnanoid({ length: 0 })returned an empty string while the JSDocadvertised
@throws Length must be between 0 and 2048and the CLI documented a1-256range. Length is now validated as an integer in1..2048with a singleLENGTH_OUT_OF_RANGEmessage.nanoid.isValid()cannot check a generated length, because a nanoid carries none.Its JSDoc and reference page now say so instead of leaving the gap implicit.
nanoidnow readsglobalThis.cryptolike every other module, instead of the barecryptoglobal.encodeBase62andencodeObjectIdHexaccepted inputs longer than the canonicallength and silently encoded only the leading bytes. They now require the exact
length, matching the public
fromBytes()wrappers.docs/STABILITY.mddescribed the ObjectID and XID counters as "always-incrementing".Both are 24-bit counters that wrap to zero after 2^24 values in the same second.
incrementBytesInPlacecomment, which credited KSUID with a callKSUID never makes, and the
objectid/hex.tsdecoding-table comment, which reported128 KiB for a 64 KiB allocation.
1e0b85f: fix(ulid): advance virtual time when the monotonic random portion overflows
ULID handled exhaustion of its 80-bit monotonic random portion by filling the
remaining random bytes with
0xffand throwingRANDOM_OVERFLOW, which left thegenerator failing for every later call in that millisecond. UUID v7 handled the
same situation by advancing its timestamp by one millisecond.
There is now one policy: both generators advance virtual time by one millisecond
and continue from a zeroed counter, so subsequent calls stay unique and
monotonic instead of throwing.
Neither generator guards that advance against the end of the 48-bit timestamp
field, which was a latent bug in both: at the maximum millisecond, uuidv7 wrote a
timestamp that silently wrapped to zero, and ULID emitted a string its own
isValid()rejects (or, through the buffer path, also wrapped the timestamp).Both now saturate and throw
TIMESTAMP_OUT_OF_RANGEinstead of emitting an IDwhose timestamp field overflowed.
RANDOM_OVERFLOWwas unreachable in practice (1 in 2^80 per millisecond) and isremoved from
ERROR_CODES. This is a pre-1.0 breaking change to the errorcatalog:
ERROR_CODESno longer contains it, and theULID_RANDOM_OVERFLOW→RANDOM_OVERFLOWrow is gone from the v1 migrationguide.
1e0b85f: fix(uuid): make
uuidv7.timestamp()reject values that are not UUID v7uuidv7.timestamp()parsed its argument with the version-agnostic byte codec, sopassing a UUID v4 or v5 returned the first six random bytes as a plausible-looking
creation time. It now requires the RFC 9562 version 7 and
10xxvariant bits, andthrows
InvalidInputErrorwith codeUUID_NOT_V7otherwise, matchingtypeid.timestamp(). TheNILandMAXsentinels keep working, since RFC 9562defines them without a version.
UUID_NOT_V7now reports bothuuidandtypeidas strategies.The shared
isUuidVersion7andisNilOrMaxBytespredicates live inuuid/common/uuid.tsso the UUID and TypeID readers cannot drift apart again.toBytes()is unchanged and still accepts any 128-bit UUID form, the wayuuid.parse()does: it is a byte codec, not a version guard. Its JSDoc now says soexplicitly, because
isValid()is version-specific.Patch Changes
128402c: fix(uuid): let
uniku/uuid/v4load in insecure browser contextsCrypto.randomUUIDis available only in secure contexts, whileCrypto.getRandomValuesis not. The module capturedglobalThis.crypto.randomUUID.bind(...)at module scope, so importinguniku/uuid/v4over plainhttp://on a non-localhost origin threwTypeError: Cannot read properties of undefined (reading 'bind')during moduleevaluation. That also took down
toBytes,fromBytes, andisValid, which donot touch randomness at all.
The no-argument generator now uses
crypto.randomUUID()when the runtimeprovides it and otherwise falls back to the shared CSPRNG pool plus the local
formatter, so the entry point works on any origin.
1e0b85f: docs(bench): report benchmark dispersion and stop overstating ratios
The performance guide published ratios to two significant figures without any
measure of uncertainty, which implied a precision the harness does not have. Two
runs of the same command on one machine move the small-ratio rows by up to 22%,
and a different machine moves the ULID row from 163x to about 85x.
bench-summarynow prints aSpreadcolumn computed from each row'swithinActionRme/crossActionRme, and labels a rowparity (within spread)when its deviation from 1x is smaller than the ratio's combined dispersion.
Snapshots without multi-run data show
—instead of a fabricated number.bench-results.tsgainsbenchmarkDispersion,combineDispersion, andisRatioWithinDispersion. Dispersion prefers multi-run figures over a singlerun's RME and combines in quadrature; the parity band is multiplicative
(
1 / (1 + s)to1 + s), because a relative dispersion scales with the value itdescribes. A symmetric absolute band would call
0.75xparity while calling itsreciprocal
1.33xfaster, and at 100% spread it would call even0.001xparity.states what each row does and does not compare. In particular the UUID v4 row
compares the same native primitive behind two different wrappers — uniku's cached
bound function against
[email protected]re-readingcrypto.randomUUIDon every call— so it measures wrapper overhead, not generation speed, and it is the row that
moved most between runs. The ULID row is qualified on both sides: the reference
re-detects its PRNG and draws 16 single bytes per call, while uniku draws once per
millisecond and increments the existing tail. Provenance of the range endpoints is
spelled out, including which ones are not published artefacts.
@uniku/[email protected]
Patch Changes