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

@colyseus/schema

Package Overview
Dependencies
Maintainers
2
Versions
313
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 1.0.43 to 1.0.44

7

lib/codegen/parser.js

@@ -87,6 +87,7 @@ "use strict";

var hasExpression = (_c = prop === null || prop === void 0 ? void 0 : prop.expression) === null || _c === void 0 ? void 0 : _c.arguments;
var hasDecorator = ((propDecorator === null || propDecorator === void 0 ? void 0 : propDecorator.length) > 0);
/**
* neither a `@type()` decorator or `type()` call. skip.
*/
if (!propDecorator && !hasExpression) {
if (!hasDecorator && !hasExpression) {
break;

@@ -208,2 +209,3 @@ }

// TypeScript 4.7 and below
// @ts-ignore
if (node.decorators) {

@@ -213,6 +215,9 @@ return node.decorators;

// TypeScript 4.8 and above
// @ts-ignore
if (ts.canHaveDecorators && ts.canHaveDecorators(node)) {
// @ts-ignore
var decorators = ts.getDecorators(node);
return decorators ? Array.from(decorators) : undefined;
}
// @ts-ignore
return (_a = node.modifiers) === null || _a === void 0 ? void 0 : _a.filter(ts.isDecorator);

@@ -219,0 +224,0 @@ }

2

package.json
{
"name": "@colyseus/schema",
"version": "1.0.43",
"version": "1.0.44",
"description": "Binary state serializer with delta encoding for games",

@@ -5,0 +5,0 @@ "bin": {

@@ -102,2 +102,3 @@ import * as ts from "typescript";

const hasExpression = prop?.expression?.arguments;
const hasDecorator = (propDecorator?.length > 0);

@@ -107,3 +108,3 @@ /**

*/
if (!propDecorator && !hasExpression) {
if (!hasDecorator && !hasExpression) {
break;

@@ -264,6 +265,9 @@ }

// TypeScript 4.7 and below
// @ts-ignore
if (node.decorators) { return node.decorators; }
// TypeScript 4.8 and above
// @ts-ignore
if (ts.canHaveDecorators && ts.canHaveDecorators(node)) {
// @ts-ignore
const decorators = ts.getDecorators(node);

@@ -273,3 +277,4 @@ return decorators ? Array.from(decorators) : undefined;

// @ts-ignore
return node.modifiers?.filter(ts.isDecorator);
}

Sorry, the diff of this file is not supported yet

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