Repository navigation
is-kit v1.17.1 is out! ππΈ
This release focuses on making is-kit more reliable, predictable, and easier to understand.
We received 10 community contributions from 7 contributors, including 6 new contributors joining us for the first time! π
It's wonderful to see more developers helping us improve is-kit, one small contribution at a time.
π οΈ More Reliable Record Validation
recordOf now validates all own string-keyed properties, including non-enumerable properties.
import { isString, isNumber, recordOf } from 'is-kit';
const isNumberRecord = recordOf(isString, isNumber);
const value = { id: 1 };
Object.defineProperty(value, 'hidden', {
value: 'not a number',
enumerable: false
});
isNumberRecord(value);
// Before: true
// Now: falsePreviously, non-enumerable properties could bypass validation even though they remained accessible through the narrowed record type.
This fix makes runtime validation more consistent with the type contract.
Compatibility note: Objects containing non-enumerable string-keyed properties that fail either guard are now rejected. Symbol-keyed properties remain outside the validation scope.
Thanks to @tylrcc for continuing to improve the reliability of is-kit! πΈπ
π¦ Understanding Our Bundle Size
How much does importing an is-kit guard actually add to your production bundle?
Thanks to @geekgod382, we now have reproducible bundle-size measurements for common import patterns using esbuild and Rollup + Terser.
Here are some of the measured results for is-kit v1.17.0:
| Import pattern | esbuild (gzip) | Rollup + Terser (gzip) |
|---|---|---|
isString |
1,023 B | 338 B |
or(isString, isNumber) |
1,026 B | 417 B |
refineKey('value', isString) |
1,041 B | 370 B |
struct + safeParse |
1,559 B | 920 B |
| All runtime exports | 3,614 B | 3,350 B |
These are measured fixture bundle sizes, not package download sizes. Actual application bundle sizes may vary depending on your bundler, configuration, target, and usage.
The investigation also identified interesting opportunities to improve tree-shaking, which we can explore in future releases.
Small. Simple. Useful. And hopefully even smaller in the future! π
π Clearer Documentation and Stronger Tests
Small runtime guarantees matter.
Knowing when a guard runs, when validation stops, and how exceptions propagate helps developers use is-kit with confidence.
This release improves documentation and regression coverage for:
hasKeyandhasKeysproperty-presence semantics.assertvalidation failures and guard exceptions.and,andAll, andoneOfevaluation behavior.typedStructand its exact option.safeParseandsafeParseWithexception propagation.isPlainObjectprototype and cross-realm behavior.- Error propagation across all five nullish wrappers.
We also improved our contributor onboarding guide and introduced automated type-checking for a selected documentation example.
Welcome, New Contributors! ππΈ
A very warm welcome to our 6 new contributors!
-
@ACatNight improved our contributor onboarding experience and introduced automated type-checking for a documentation example.
Thank you for making it easier for future contributors to get started!
-
@s1reyash contributed an amazing 4 documentation improvements, making several important runtime behaviors much easier to understand!
-
@Divyanshgupta2580 documented the
typedStructexact option with clear examples of default and exact validation behavior. -
@chsousaa clarified the distinction between validation failures and guard exceptions in
safeParseandsafeParseWith. -
@ansonlam23 added regression tests for all five nullish wrappers, carefully verifying that the original error instance propagates unchanged.
-
@geekgod382 investigated production bundle impact and tree-shaking behavior, giving us reproducible measurements and valuable insights for future improvements.
And a big thank you to our returning contributor, @tylrcc, for the recordOf bug fix and regression tests!
Whether you're improving documentation, writing tests, fixing bugs, or investigating performance, every contribution matters.
Thank you for spending your time and sharing your knowledge with us.
Welcome to is-kit and the Necoz-OSS community! ππ
We're happy to have you here, and we look forward to building more small, simple, and useful things together!
What's Changed
- docs(changelog): 1.17.0 by @github-actions[bot] in #487
- docs: improve contributor onboarding and type-check guide examples by @ACatNight in #488
- docs: document oneOf evaluation behavior by @nyaomaru in #489
- fix: validate non-enumerable own properties in recordOf by @tylrcc in #429
- docs: clarify hasKey and hasKeys presence-only checks by @s1reyash in #490
- docs: clarify assert failure and guard-error behavior by @s1reyash in #491
- docs: clarify and and andAll short-circuit behavior by @s1reyash in #492
- docs: document typedStruct exact option by @Divyanshgupta2580 in #501
- docs(parse): clarify guard error propagation in safeParse and safeParseWith by @chsousaa in #502
- chore: remove obsolete Prettier formatting skill by @nyaomaru in #496
- test: verify nullish wrappers propagate inner guard errors unchanged by @ansonlam23 in #503
- docs: clarify isPlainObject prototype and cross-realm behavior by @s1reyash in #505
- Added a small script to measure reproducible bundle size by @geekgod382 in #504
- Release: 1.17.1 by @github-actions[bot] in #506
New Contributors
- @ACatNight made their first contribution in #488
- @s1reyash made their first contribution in #490
- @Divyanshgupta2580 made their first contribution in #501
- @chsousaa made their first contribution in #502
- @ansonlam23 made their first contribution in #503
- @geekgod382 made their first contribution in #504
Full Changelog: v1.17.0...v1.17.1