- Fix Callback for update function should be optional. (#138)
- Fix #135 Context args is private. (#137))
- #117 TypeScript conversion. Type definitions should now match behavior exactly. By @NaridaL
- BREAKING CHANGE:
@serializeAll("*": ModelSchema)is no longer valid. Instead you should pass@serializeAll("*": object(ModelSchema)). - BREAKING CHANGE:
{"*": object(...)}and{"x": object(...)}now behave the same when deserializing{"x": "str_not_object"}(result:{x: null}). Previously the"*"schema would have returned{}. - BREAKING CHANGE: Removed deprecated
refandchildfunctions. Usereferenceandobjectinstead. - BREAKING CHANGE: Removed undocumented and untested code which possibly retried deserialization on error.
- You can pass a
patternargument asAdditionalPropArgsinstead of having to manually assign it to a PropSchema:@serializeAll("*": list(primitive(), { pattern: /^_.*/ })). Note this only make sense together with the"*"property.
- #113: Fix interpolation problem with IE11 by @danfma
- #105: Support prop schemas for "*" properties by @pyrogenic
- #104: Add the
@optionaldecorator to skip properties not present in the serialized object by @pyrogenic - #99: Allow
serialize-ing plain objects by specifying constructor by @pyrogenic
- Fixed potential memory leak, fixes #95 through #100 by @svennergr
- Fixed make beforeDeserialize, afterDeserialize optional, see #94 by zeevl
- Introduced enhanced debug messages on invariant errors, see #68 by @chengjianhua
- Fixed undefined should not throw error in Arraylike object, see #58
- switched build and tests to Babel 7
- switched code compression to Terser
- Introduced beforeDeserialize and afterDeserialize lifecycle methods to support e.g. better error handling during deserialization by @1R053
- Introduced cancelDeserialize to stop async requests that get stuck, e.g. in case of unresolved waiting references by @1R053
- Added capability to deserialize arrays with empty entries by @1R053
- Fixed mapAsArray to always push elements to the serialized array by @1R053
- Introduced async ability into
custom(de)serializer, to support asynchronous custom deserialization by @1R053 - Fixed missed typescript export of
rawtype by @VChastinet - Documentation updates by @maslade and @razetdinov
- Introduced
rawtype, to allow for complex dynamic types to be deserialized
- Improved documentation examples, see #43 by @brikou
- Fixed
class constructor cannot be invoked without 'new'error, see #42 by @pinksquidhat - Introduced
mapAsArray, to support maps that serialize to arrays with objects with identifiers. And vice versa. By @vonovak. See #22
- Introduced
serializr.SKIP, the can be used to skip certain properties during deserialization when usingcustomserializers. #32 by @nathanstitt - Fixed #27: Skip non primitive primitive properties instead of throwing for
*decorator - Introduced
@serializeAlldecorator, see #27
- Schema was not correctly picked up for classes passed as first arg to deserialize. Fixed. See #36
- Fixed typings of deserialize for arrays. by @Podlas29
- Fixed #21 wrong export of
setDefaultModelSchemaexport, by @vonovak
- Added support for serializable constructor arguments (TypeScript only), by @bfsmith, see #11
- Fixed issue where custom arguments passed to
updatewhere not correctly handled, see #12, by @robclouth
- Fixed issue when deserializing deeply nested objects, see #10
- Avoid implicit any in typings (by @bnaya)
- Fixed UMD build issues
- Fixed package.json: d.ts files are now exported as well (#7)
Which should have been called 1.0...:-)
- the
lookupFunctionofrefis now optional, if it is not provided, serializr will try to resolve the reference within the current document. Types are respected while resolving refhas been renamed toreferencechildhas been renamed toobjectfalseis now also an acceptable value for propSchema's- the prop schema
"*": truenow has the special meaning that all enumerable, primitive fields will be serialized. Will throw on non-primitive fields - introduced
custom(serializer, deserializer) identifiernow supports an optional callback that can be used to register new instances in some store- circular dependency on default schema's for classes are now a bit better handled (but remain a fundamental JS problem, especially for classes)
Initial release