Releases: lukeed/klona
v2.0.6
Patches
- Add
"types"
condition to"exports"
map for TypeScript"nodenext"
support (#41)
Thank you @jakebailey
Full Changelog: v2.0.5...v2.0.6
v2.0.5
Patches
- Handle
Object.assign
within class constructors (#31): 7650274
This fix is only relevant to theklona
andklona/lite
modules.
Thank you @tripodsgames~!
Chores
- Update
uvu
version: 635e339
Full Changelog: v2.0.4...v2.0.5
v2.0.4
v2.0.3
v2.0.2
v2.0.0
Breaking
-
Migrated from
default
to named export: 11034e1ESM/TypeScript
- import klona from 'klona'; + import { klona } from 'klona';
CommonJS
- const klona = require('klona'); + const { klona } = require('klona');
Features
-
Added
klona/json
mode: 1762c15
Only supports JSON data types. -
Added
klona/lite
mode: 8cb217a
Supports JSON data types, Dates, RegExps, and custom classes. -
Added DataView, ArrayBuffer, and TypedArray support to
klona
main entry: 04c176b -
Added
klona/full
mode: 1a85948
Extendsklona
with support for Symbol properties and non-enumerable properties. -
Added native ESM support via
exports
mapping: 9ae0093
Allows for Node.jsimport
statements to work within native ESM resolvers.
Chores
- (test) Extract tests into reusable files for composition: 0e8b82b
- (test) Ensure each "mode" has full test coverage: a64c3fd, 58f4491, 0110463
- (test) Add class inheritance tests: 4fc79fd
- (bench): Rework benchmarks for multi-mode fixtures and validations: 46cc9ed
- (bench): Print benchmark results with explainer: 1a73cd8
- (readme): Update documentation with
Modes
comparison section: 3949d6b, d8a44da - (meta) Enable GitHub Sponsors button 🙇: 5cb032c
v1.1.2
Fixes
-
Clone custom class instances (#14): c873e9e, 8089f11
klona now correctly returns a fresh copy of your custom class -
(types): Allow CommonJS type inference: 0d324fe
Chores
- Remove unnecessary parentheses: ca11a5a, e8c1f6b
- Add addition
pollution
andclass/instance
tests: cb3efdc, bbcb404, 6bcfcb9 - Update README badges and links: 04c7f5a, d6eae41
- Update benchmark results: 72a460d, dd9ae63
- Update test runner: 77051f8, 74622f5
- Update module size: de1e954, f14dea6
- Update builder: 6801a6a