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

colyseus.js

Package Overview
Dependencies
Maintainers
1
Versions
272
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

colyseus.js - npm Package Compare versions

Comparing version 0.7.0-alpha.3 to 0.7.0-alpha.4

18

MIGRATING.md

@@ -21,1 +21,19 @@ # Migration guide for colyseus.js

```
#### `room.listen()` signature has changed.
OLD
```typescript
room.listen("entities/:id/:attribute", "replace", (id, attribute, value) => {
console.log(id, attribute, value);
})
```
NEW
```typescript
room.listen("entities/:id/:attribute", (change) => {
console.log(change.path.id, change.path.attribute, change.value);
})
```

4

package.json
{
"name": "colyseus.js",
"version": "0.7.0-alpha.3",
"version": "0.7.0-alpha.4",
"description": "Multiplayer Game Client for the Browser",

@@ -30,3 +30,3 @@ "keywords": [

"clock.js": "^1.1.0",
"delta-listener": "^1.1.0",
"delta-listener": "^2.0.0",
"fossil-delta": "^0.2.5",

@@ -33,0 +33,0 @@ "msgpack-lite": "^0.1.20",

@@ -6,2 +6,3 @@ # ![colyseus.js](https://github.com/gamestdio/colyseus/blob/master/media/header.png?raw=true)

[![Join the chat at https://gitter.im/gamestdio/colyseus](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gamestdio/colyseus?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=N9C36SSE9ZCTS)
[![Build Status](https://secure.travis-ci.org/gamestdio/colyseus.js.png?branch=master)](http://travis-ci.org/gamestdio/colyseus.js)

@@ -8,0 +9,0 @@ [![Greenkeeper badge](https://badges.greenkeeper.io/gamestdio/colyseus.js.svg)](https://greenkeeper.io/)

@@ -49,14 +49,14 @@ const assert = require('chai').assert;

let patchCount = 0;
room.listen("players/:id/:attribute", "replace", (id, attribute, value) => {
room.listen("players/:id/:attribute", (change) => {
patchCount++
assert.equal(id, "one");
assert.equal(attribute, "hp");
assert.equal(value, 40);
assert.equal(change.path.id, "one");
assert.equal(change.path.attribute, "hp");
assert.equal(change.value, 40);
})
room.listen("players/:id/position/:axis", "replace", (id, axis, value) => {
room.listen("players/:id/position/:axis", (change) => {
patchCount++
assert.equal(id, "one");
assert.equal(axis, "y");
assert.equal(value, 100);
assert.equal(change.path.id, "one");
assert.equal(change.path.axis, "y");
assert.equal(change.value, 100);
})

@@ -63,0 +63,0 @@

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