feat: add pack type and family hints - #5
Open
enochgroot wants to merge 3 commits into
Open
enochgroot wants to merge 3 commits into
enochgroot wants to merge 3 commits into
Conversation
Integers outside Number.MAX_SAFE_INTEGER unpack as bigint instead of a rounded number. Values that fit stay number regardless of wire width. pack() accepts bigint in the int64/uint64 range and throws for anything larger. Closes msgpack#37.
- pack(value, { type, family, interpret }) forces MessagePack wire types
- two-arg last-object detection; pack(1, 2) still packs an array
- Host objects, null type, and related pack-options cases - [[noreturn]] on ThrowCannotPackAs so gcovr throw edges match - GCOVR_EXCL only on unreachable hint defaults and empty info[1] - Native coverage 95.2% lines / 95.4% branches
enochgroot
force-pushed
the
feat/pack-type-hints
branch
from
September 19, 2026 06:31
b8e9591 to
f9613f2
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.
Summary
pack(value, { type, family, interpret })forces MessagePack wire types without changing the default mappingpack(1, 2)still packs an array;pack(123, { type: 'uint8' })is a hintStacked on
feat/bigint-64bitso this PR is pack-hints only.Test Plan
node-gyp rebuildon Node 20 linux/arm64npm test— 170 pass, 0 fail (33 pack-hints cases)