Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serializr

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serializr - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

5

CHANGELOG.md

@@ -0,4 +1,7 @@

# 1.5.1
* Fixed make beforeDeserialize, afterDeserialize optional, see #94 by zeevl
# 1.5.0
* Introduced enhanced debug messages on invariant errors, see #68 by @chengjianhua
+ Fixed undefined should not throw error in Arraylike object, see #58
* Fixed undefined should not throw error in Arraylike object, see #58
* switched build and tests to Babel 7

@@ -5,0 +8,0 @@ * switched code compression to [Terser](https://github.com/terser-js/terser)

2

package.json
{
"name": "serializr",
"version": "1.5.0",
"version": "1.5.1",
"description": "Serialize and deserialize complex object graphs to JSON",

@@ -5,0 +5,0 @@ "main": "lib/serializr.js",

@@ -414,3 +414,3 @@ # Serializr

[src/serializr.js:52-52](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/serializr.js#L5-L51 "Source code on GitHub")
[src/serializr.js:52-52](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/serializr.js#L5-L51 "Source code on GitHub")

@@ -461,3 +461,3 @@ JSDOC type defintions for usage w/o typescript.

[src/api/createSimpleSchema.js:17-24](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/api/createSimpleSchema.js#L17-L24 "Source code on GitHub")
[src/api/createSimpleSchema.js:17-24](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/api/createSimpleSchema.js#L17-L24 "Source code on GitHub")

@@ -487,3 +487,3 @@ Creates a model schema that (de)serializes from / to plain javascript objects.

[src/api/createModelSchema.js:29-47](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/api/createModelSchema.js#L29-L47 "Source code on GitHub")
[src/api/createModelSchema.js:29-47](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/api/createModelSchema.js#L29-L47 "Source code on GitHub")

@@ -521,3 +521,3 @@ Creates a model schema that (de)serializes an object created by a constructor function (class).

[src/api/getDefaultModelSchema.js:9-18](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/api/getDefaultModelSchema.js#L9-L18 "Source code on GitHub")
[src/api/getDefaultModelSchema.js:9-18](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/api/getDefaultModelSchema.js#L9-L18 "Source code on GitHub")

@@ -534,3 +534,3 @@ Returns the standard model schema associated with a class / constructor function

[src/api/setDefaultModelSchema.js:15-18](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/api/setDefaultModelSchema.js#L15-L18 "Source code on GitHub")
[src/api/setDefaultModelSchema.js:15-18](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/api/setDefaultModelSchema.js#L15-L18 "Source code on GitHub")

@@ -553,3 +553,3 @@ Sets the default model schema for class / constructor function.

[src/api/serializable.js:93-103](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/api/serializable.js#L93-L103 "Source code on GitHub")
[src/api/serializable.js:93-103](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/api/serializable.js#L93-L103 "Source code on GitHub")

@@ -578,3 +578,3 @@ Decorator that defines a new property mapping on the default model schema for the class

[src/core/serialize.js:16-34](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/core/serialize.js#L16-L34 "Source code on GitHub")
[src/core/serialize.js:16-34](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/core/serialize.js#L16-L34 "Source code on GitHub")

@@ -594,3 +594,3 @@ Serializes an object (graph) into json using the provided model schema.

[src/core/serialize.js:89-100](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/core/serialize.js#L89-L100 "Source code on GitHub")
[src/core/serialize.js:89-100](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/core/serialize.js#L89-L100 "Source code on GitHub")

@@ -605,3 +605,3 @@ The `serializeAll` decorator can be used on a class to signal that all primitive properties should be serialized automatically.

[src/core/cancelDeserialize.js:12-18](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/core/cancelDeserialize.js#L12-L18 "Source code on GitHub")
[src/core/cancelDeserialize.js:12-18](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/core/cancelDeserialize.js#L12-L18 "Source code on GitHub")

@@ -616,3 +616,3 @@ Cancels an asynchronous deserialization or update operation for the specified target object.

[src/core/deserialize.js:45-63](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/core/deserialize.js#L45-L63 "Source code on GitHub")
[src/core/deserialize.js:45-63](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/core/deserialize.js#L45-L63 "Source code on GitHub")

@@ -640,3 +640,3 @@ Deserializes a json structure into an object graph.

[src/core/update.js:22-44](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/core/update.js#L22-L44 "Source code on GitHub")
[src/core/update.js:22-44](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/core/update.js#L22-L44 "Source code on GitHub")

@@ -659,3 +659,3 @@ Similar to deserialize, but updates an existing object instance.

[src/types/primitive.js:18-32](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/types/primitive.js#L18-L32 "Source code on GitHub")
[src/types/primitive.js:18-32](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/types/primitive.js#L18-L32 "Source code on GitHub")

@@ -683,3 +683,3 @@ Indicates that this field contains a primitive value (or Date) which should be serialized literally to json.

[src/types/identifier.js:43-66](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/types/identifier.js#L43-L66 "Source code on GitHub")
[src/types/identifier.js:43-66](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/types/identifier.js#L43-L66 "Source code on GitHub")

@@ -725,3 +725,3 @@ Similar to primitive, but this field will be marked as the identifier for the given Model type.

[src/types/date.js:9-26](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/types/date.js#L9-L26 "Source code on GitHub")
[src/types/date.js:9-26](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/types/date.js#L9-L26 "Source code on GitHub")

@@ -738,3 +738,3 @@ Similar to primitive, serializes instances of Date objects

[src/types/alias.js:20-33](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/types/alias.js#L20-L33 "Source code on GitHub")
[src/types/alias.js:20-33](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/types/alias.js#L20-L33 "Source code on GitHub")

@@ -764,3 +764,3 @@ Alias indicates that this model property should be named differently in the generated json.

[src/types/custom.js:60-75](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/types/custom.js#L60-L75 "Source code on GitHub")
[src/types/custom.js:60-75](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/types/custom.js#L60-L75 "Source code on GitHub")

@@ -830,3 +830,3 @@ Can be used to create simple custom propSchema. Multiple things can be done inside of a custom propSchema, like deserializing and serializing other (polymorphic) objects, skipping the serialization of something or checking the context of the obj being (de)serialized.

[src/types/object.js:35-55](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/types/object.js#L35-L55 "Source code on GitHub")
[src/types/object.js:35-55](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/types/object.js#L35-L55 "Source code on GitHub")

@@ -869,3 +869,3 @@ `object` indicates that this property contains an object that needs to be (de)serialized

[src/types/reference.js:66-105](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/types/reference.js#L66-L105 "Source code on GitHub")
[src/types/reference.js:66-105](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/types/reference.js#L66-L105 "Source code on GitHub")

@@ -935,3 +935,3 @@ `reference` can be used to (de)serialize references that point to other models.

[src/types/list.js:43-105](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/types/list.js#L43-L105 "Source code on GitHub")
[src/types/list.js:43-105](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/types/list.js#L43-L105 "Source code on GitHub")

@@ -975,3 +975,3 @@ List indicates that this property contains a list of things.

[src/types/map.js:14-65](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/types/map.js#L14-L65 "Source code on GitHub")
[src/types/map.js:14-65](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/types/map.js#L14-L65 "Source code on GitHub")

@@ -991,3 +991,3 @@ Similar to list, but map represents a string keyed dynamic collection.

[src/types/mapAsArray.js:19-66](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/types/mapAsArray.js#L19-L66 "Source code on GitHub")
[src/types/mapAsArray.js:19-66](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/types/mapAsArray.js#L19-L66 "Source code on GitHub")

@@ -1012,3 +1012,3 @@ Similar to map, mapAsArray can be used to serialize a map-like collection where the key is

[src/types/raw.js:18-29](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/types/raw.js#L18-L29 "Source code on GitHub")
[src/types/raw.js:18-29](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/types/raw.js#L18-L29 "Source code on GitHub")

@@ -1037,3 +1037,3 @@ Indicates that this field is only need to putted in the serialized json or

[src/constants.js:20-20](https://github.com/mobxjs/serializr/blob/f3d8441271009ff1818c2893e7a18da92bbde541/src/constants.js#L20-L20 "Source code on GitHub")
[src/constants.js:20-20](https://github.com/mobxjs/serializr/blob/9ab5501e7caee130bb2f67296bc9e259e4b64db8/src/constants.js#L20-L20 "Source code on GitHub")

@@ -1040,0 +1040,0 @@ In the event that a property needs to be deserialized, but not serialized, you can use the SKIP symbol to omit the property. This has to be used with the custom serializer.

@@ -23,4 +23,4 @@ // TODO: put this in the source files, and extract it, to preserve comments

deserializer(jsonValue: any, callback: (err: any, targetPropertyValue: any) => void, context: Context, currentPropertyValue: any): void;
beforeDeserialize: BeforeDeserializeFunc;
afterDeserialize: AfterDeserializeFunc;
beforeDeserialize?: BeforeDeserializeFunc;
afterDeserialize?: AfterDeserializeFunc;
}

@@ -27,0 +27,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc