Compare commits

...

12 Commits
1.5.0 ... 1.5.1

Author SHA1 Message Date
Damien Arrachequesne
fdf64cc38f [chore] Release 1.5.1 (#2735) 2016-10-24 03:31:32 +02:00
Damien Arrachequesne
5badb6436e [chore] Bump socket.io-parser to 2.3.1 (#2734) 2016-10-24 03:23:03 +02:00
Damien Arrachequesne
c20e0b26c9 [chore] Bump engine.io to 1.7.2 (#2729) 2016-10-24 03:21:11 +02:00
bananaapple
5c10c5439b [test] Use client function to unify client in test script (#2731) 2016-10-24 02:35:01 +02:00
Damien Arrachequesne
8182ecc61c [chore] Add Github issue and PR templates (#2733) 2016-10-22 09:19:08 +02:00
Feram Bot
ccd3376627 [docs] Minor fixes (#2526) 2016-10-21 03:21:45 +02:00
Damien Arrachequesne
58a73d39e9 [chore] Bump socket.io-parser to 2.3.0 (#2730) 2016-10-21 03:18:49 +02:00
Tom Atkinson
e60bd5a4da [fix] Avoid swallowing exceptions thrown by user event handlers (#2682) 2016-10-21 03:16:36 +02:00
Paul Meinhardt
21dffa4b58 [docs] Link readme npm package badge to npm registry page (#2612) 2016-10-21 03:10:33 +02:00
Marcio Puga
94852e3d23 [docs] Fix typo (#2724) 2016-10-21 03:06:59 +02:00
davidlondono
b8c60506a6 [docs] Fix JSDoc of optional parameters (#2465)
Making proper optional Docs for socketIO
2016-10-21 03:02:59 +02:00
syuilo⭐️
ecc76f48bc [docs] Add link to LICENSE (#2221) 2016-10-21 03:00:38 +02:00
9 changed files with 78 additions and 23 deletions

25
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,25 @@
*Note*: for support questions, please use one of these channels: [stackoverflow](http://stackoverflow.com/questions/tagged/socket.io) or [slack](https://socketio.slack.com)
### You want to:
* [x] report a *bug*
* [ ] request a *feature*
### Current behaviour
### Steps to reproduce (if the current behaviour is a bug)
### Expected behaviour
### Setup
- OS:
- browser:
- socket.io version:
### Other information (e.g. stacktraces, related issues, suggestions how to fix)

18
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,18 @@
### The kind of change this PR does introduce
* [x] a bug fix
* [ ] a new feature
* [ ] an update to the documentation
* [ ] a code change that improves performance
* [ ] other
### Current behaviour
### New behaviour
### Other information (e.g. related issues)

View File

@@ -1,4 +1,19 @@
1.5.1 / 2016-10-24
==================
* [fix] Avoid swallowing exceptions thrown by user event handlers (#2682)
* [test] Use client function to unify `client` in test script (#2731)
* [docs] Add link to LICENSE (#2221)
* [docs] Fix JSDoc of optional parameters (#2465)
* [docs] Fix typo (#2724)
* [docs] Link readme npm package badge to npm registry page (#2612)
* [docs] Minor fixes (#2526)
* [chore] Bump socket.io-parser to 2.3.0 (#2730)
* [chore] Add Github issue and PR templates (#2733)
* [chore] Bump engine.io to 1.7.2 (#2729)
* [chore] Bump socket.io-parser to 2.3.1 (#2734)
1.5.0 / 2016-10-06
==================

View File

@@ -4,7 +4,7 @@
[![Build Status](https://secure.travis-ci.org/socketio/socket.io.svg?branch=master)](https://travis-ci.org/socketio/socket.io)
[![Dependency Status](https://david-dm.org/socketio/socket.io.svg)](https://david-dm.org/socketio/socket.io)
[![devDependency Status](https://david-dm.org/socketio/socket.io/dev-status.svg)](https://david-dm.org/socketio/socket.io#info=devDependencies)
![NPM version](https://badge.fury.io/js/socket.io.svg)
[![NPM version](https://badge.fury.io/js/socket.io.svg)](https://www.npmjs.com/package/socket.io)
![Downloads](https://img.shields.io/npm/dm/socket.io.svg?style=flat)
[![](http://slack.socket.io/badge.svg?)](http://slack.socket.io)
@@ -317,7 +317,7 @@ server.listen(3000);
A reference to the underlying `Client` transport connection (engine.io
`Socket` object). This allows access to the IO transport layer, which
still (mostly) asbtracts the actual TCP/IP socket.
still (mostly) abstracts the actual TCP/IP socket.
### Socket#request:Request
@@ -462,4 +462,4 @@ The `gulp` task `test` will always transpile the source code into es5 and export
## License
MIT
[MIT](LICENSE)

View File

@@ -191,7 +191,9 @@ Client.prototype.ondecoded = function(packet) {
} else {
var socket = this.nsps[packet.nsp];
if (socket) {
socket.onpacket(packet);
process.nextTick(function() {
socket.onpacket(packet);
});
} else {
debug('no socket for namespace %s', packet.nsp);
}

View File

@@ -30,7 +30,7 @@ var clientSource = read(require.resolve('socket.io-client/socket.io.js'), 'utf-8
* Server constructor.
*
* @param {http.Server|Number|Object} srv http server, port or options
* @param {Object} opts
* @param {Object} [opts]
* @api public
*/
@@ -109,7 +109,7 @@ var oldSettings = {
};
/**
* Backwards compatiblity.
* Backwards compatibility.
*
* @api public
*/
@@ -322,7 +322,7 @@ Server.prototype.onconnection = function(conn){
* Looks up a namespace.
*
* @param {String} name nsp name
* @param {Function} fn optional, nsp `connection` ev handler
* @param {Function} [fn] optional, nsp `connection` ev handler
* @api public
*/

View File

@@ -281,7 +281,7 @@ Socket.prototype.leaveAll = function(){
};
/**
* Called by `Namespace` upon succesful
* Called by `Namespace` upon successful
* middleware execution (ie: authorization).
*
* @api private

View File

@@ -1,6 +1,6 @@
{
"name": "socket.io",
"version": "1.5.0",
"version": "1.5.1",
"description": "node.js realtime framework server",
"keywords": [
"realtime",
@@ -24,9 +24,9 @@
"test": "gulp test"
},
"dependencies": {
"engine.io": "1.7.0",
"socket.io-parser": "2.2.6",
"socket.io-client": "1.5.0",
"engine.io": "1.7.2",
"socket.io-parser": "2.3.1",
"socket.io-client": "1.5.1",
"socket.io-adapter": "0.4.0",
"has-binary": "0.1.7",
"debug": "2.2.0"

View File

@@ -1546,9 +1546,7 @@ describe('socket.io', function(){
var srv = http();
var sio = io(srv);
srv.listen(function() {
var addr = srv.listen().address();
var url = 'ws://localhost:' + addr.port + '?key1=1&key2=2';
var socket = ioc(url);
var socket = client(srv, {query: {key1: 1, key2: 2}});
sio.on('connection', function(s) {
var parsed = require('url').parse(s.request.url);
var query = require('querystring').parse(parsed.query);
@@ -1562,10 +1560,8 @@ describe('socket.io', function(){
it('should see query parameters sent from secondary namespace connections in handshake object', function(done){
var srv = http();
var sio = io(srv);
var addr = srv.listen().address();
var url = 'ws://localhost:' + addr.port;
var client1 = ioc(url);
var client2 = ioc(url + '/connection2', {query: {key1: 'aa', key2: '&=bb'}});
var client1 = client(srv);
var client2 = client(srv, '/connection2', {query: {key1: 'aa', key2: '&=bb'}});
sio.on('connection', function(s){
});
sio.of('/connection2').on('connection', function(s){
@@ -1647,11 +1643,10 @@ describe('socket.io', function(){
var clientSocket = client(srv, { reconnectionAttempts: 10, reconnectionDelay: 100 });
clientSocket.once('connect', function(){
srv.close(function(){
srv.listen(port, function(){
clientSocket.on('reconnect', function(){
clientSocket.emit('ev', 'payload');
});
clientSocket.on('reconnect', function(){
clientSocket.emit('ev', 'payload');
});
sio.listen(port);
});
});
});