New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@colyseus/schema

Package Overview
Dependencies
Maintainers
1
Versions
337
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@colyseus/schema - npm Package Compare versions

Comparing version 0.4.37 to 0.4.38

1

lib/Schema.d.ts

@@ -23,2 +23,3 @@ import { Definition, FilterCallback, Client, Context } from "./annotations";

static _descriptors: PropertyDescriptorMap & ThisType<any>;
static onError(e: any): void;
protected $changes: ChangeTree;

@@ -25,0 +26,0 @@ onChange?(changes: DataChange[]): any;

@@ -111,2 +111,5 @@ "use strict";

}
Schema.onError = function (e) {
console.error(e);
};
Object.defineProperty(Schema.prototype, "_schema", {

@@ -190,6 +193,16 @@ get: function () { return this.constructor._schema; },

if (itemRemoved && itemRemoved.onRemove) {
itemRemoved.onRemove();
try {
itemRemoved.onRemove();
}
catch (e) {
Schema.onError(e);
}
}
if (valueRef_1.onRemove) {
valueRef_1.onRemove(itemRemoved, newLength_1 + i);
try {
valueRef_1.onRemove(itemRemoved, newLength_1 + i);
}
catch (e) {
Schema.onError(e);
}
}

@@ -230,3 +243,8 @@ });

if (valueRef_1.onRemove) {
valueRef_1.onRemove(item, newIndex);
try {
valueRef_1.onRemove(item, newIndex);
}
catch (e) {
Schema.onError(e);
}
}

@@ -243,7 +261,17 @@ continue;

if (valueRef_1.onAdd) {
valueRef_1.onAdd(value[newIndex], newIndex);
try {
valueRef_1.onAdd(value[newIndex], newIndex);
}
catch (e) {
Schema.onError(e);
}
}
}
else if (valueRef_1.onChange) {
valueRef_1.onChange(value[newIndex], newIndex);
try {
valueRef_1.onChange(value[newIndex], newIndex);
}
catch (e) {
Schema.onError(e);
}
}

@@ -296,6 +324,16 @@ change.push(value[newIndex]);

if (item && item.onRemove) {
item.onRemove();
try {
item.onRemove();
}
catch (e) {
Schema.onError(e);
}
}
if (valueRef.onRemove) {
valueRef.onRemove(item, newKey);
try {
valueRef.onRemove(item, newKey);
}
catch (e) {
Schema.onError(e);
}
}

@@ -314,7 +352,17 @@ delete value[newKey];

if (valueRef.onAdd) {
valueRef.onAdd(item, newKey);
try {
valueRef.onAdd(item, newKey);
}
catch (e) {
Schema.onError(e);
}
}
}
else if (valueRef.onChange) {
valueRef.onChange(item, newKey);
try {
valueRef.onChange(item, newKey);
}
catch (e) {
Schema.onError(e);
}
}

@@ -343,3 +391,8 @@ }

if (this.onChange && changes.length > 0) {
this.onChange(changes);
try {
this.onChange(changes);
}
catch (e) {
Schema.onError(e);
}
}

@@ -567,3 +620,8 @@ return this;

}
this.onChange(changes);
try {
this.onChange(changes);
}
catch (e) {
Schema.onError(e);
}
};

@@ -570,0 +628,0 @@ Schema.prototype.toJSON = function () {

2

package.json
{
"name": "@colyseus/schema",
"version": "0.4.37",
"version": "0.4.38",
"description": "Schema-based binary serializer / de-serializer.",

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

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