Version Packages#22
Open
github-actions[bot] wants to merge 1 commit into
Open
Conversation
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
July 15, 2026 09:35
80c3d0b to
d4af562
Compare
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
@ingram-tech/nk-db@1.4.0
Minor Changes
8333445:
@ingram-tech/nk-db/id:uuidGenerateIdnow returns the brandedUuidtype(still a plain string at runtime), and two new helpers ship the sanctioned
string→
Uuidbless for trust boundaries:isUuid(narrowing guard, acceptsany RFC 9562 version) and
asUuid(the throwing variant). Together they letsites brand their Drizzle uuid columns (
.$type<Uuid>()) so a raw uuid can nolonger be cast into a public
Id<E>slot (or vice versa) without the compilerobjecting.
30668e6: The id codec is now isomorphic.
uuidGenerateIdusednode:crypto'srandomBytes, which made the whole of@ingram-tech/nk-db/idnode-only eventhough only minting needed it — every module touching an id inherited that, so a
Drizzle
schema.tscould not encode/decode without riskingnode:cryptoin aclient bundle, and sites resorted to dependency-injecting the codec around their
schema. Randomness now comes from Web Crypto (a global on Node 19+, Bun, Deno,
edge, browsers).
id.tshas zero imports, and a test keeps it that way.exportsnow resolve under CJS. Every subpath declared only an"import"condition, so any CJS resolver failed with
ERR_PACKAGE_PATH_NOT_EXPORTED—including drizzle-kit, which meant a
schema.tsimporting@ingram-tech/nk-db/idbrokedrizzle-kit generate. The conditions are now"default", which resolves under bothimportandrequire.New:
entityOf(registry, value)/decodeAnyId(registry, value). A publicid is self-describing — its prefix names its entity — so it can be resolved with
no surrounding context. That is the primitive behind polymorphic FK decoding,
raw-SQL id binding, and generic event payloads. Sites were hand-rolling the loop
over
decodeOrNull.New subpath:
@ingram-tech/nk-db/id/drizzle—createIdColumns(registry)returns
idColumn(entity)/polymorphicIdColumn(acustomTypewhosetoDriverdecodes a skinned id before it reaches Postgres, on WHERE values aswell as insert/update SET) plus
sqlUuid/sqlUuidArrayfor the raw-SQL andRPC args the column layer cannot reach.
dataTypestaysuuid, so adopting itneeds no DDL and produces no
drizzle-kitdiff. It pulls onlydrizzle-ormandthe codec, never
pg, because it is imported byschema.ts.