Skip to content

Commit 71b5ba6

Browse files
committed
v11.0.0
1 parent 1b6452e commit 71b5ba6

7 files changed

Lines changed: 137 additions & 96 deletions

File tree

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "socketcluster-client",
33
"main": "socketcluster.js",
4-
"version": "10.1.2",
4+
"version": "11.0.0",
55
"homepage": "https://github.com/SocketCluster/socketcluster-client",
66
"description": "SocketCluster JavaScript client",
77
"authors": [

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ module.exports.destroy = function (options) {
1818

1919
module.exports.clients = SCSocketCreator.clients;
2020

21-
module.exports.version = '10.1.2';
21+
module.exports.version = '11.0.0';

package-lock.json

Lines changed: 76 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "socketcluster-client",
33
"description": "SocketCluster JavaScript client",
4-
"version": "10.1.2",
4+
"version": "11.0.0",
55
"homepage": "http://socketcluster.io",
66
"contributors": [
77
{
@@ -48,7 +48,7 @@
4848
"gulp-uglify": "^2.1.2",
4949
"localStorage": "^1.0.3",
5050
"mocha": "3.0.2",
51-
"socketcluster-server": "^9.1.1",
51+
"socketcluster-server": "^11.0.0",
5252
"uglify-js": "^2.7.5",
5353
"vinyl-source-stream": "^1.1.0"
5454
}

socketcluster.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* SocketCluster JavaScript client v10.1.2
2+
* SocketCluster JavaScript client v11.0.0
33
*/
44
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.socketCluster = f()}})(function(){var define,module,exports;return (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){
55
var SCSocket = _dereq_('./lib/scsocket');
@@ -22,7 +22,7 @@ module.exports.destroy = function (options) {
2222

2323
module.exports.clients = SCSocketCreator.clients;
2424

25-
module.exports.version = '10.1.2';
25+
module.exports.version = '11.0.0';
2626

2727
},{"./lib/scsocket":4,"./lib/scsocketcreator":5,"component-emitter":12}],2:[function(_dereq_,module,exports){
2828
(function (global){
@@ -1218,17 +1218,28 @@ function create(options) {
12181218

12191219
options = options || {};
12201220

1221+
if (options.host && !options.host.match(/[^:]+:\d{2,5}/)) {
1222+
throw new InvalidArgumentsError('The host option should include both' +
1223+
' the hostname and the port number in the format "hostname:port"');
1224+
}
1225+
1226+
if (options.host && options.hostname) {
1227+
throw new InvalidArgumentsError('The host option should already include' +
1228+
' the hostname and the port number in the format "hostname:port"' +
1229+
' - Because of this, you should never use host and hostname options together');
1230+
}
1231+
12211232
if (options.host && options.port) {
1222-
throw new InvalidArgumentsError('The host option should already include the' +
1223-
' port number in the format hostname:port - Because of this, the host and port options' +
1224-
' cannot be specified together; use the hostname option instead');
1233+
throw new InvalidArgumentsError('The host option should already include' +
1234+
' the hostname and the port number in the format "hostname:port"' +
1235+
' - Because of this, you should never use host and port options together');
12251236
}
12261237

12271238
var isSecureDefault = isUrlSecure();
12281239

12291240
var opts = {
12301241
port: getPort(options, isSecureDefault),
1231-
hostname: global.location && location.hostname,
1242+
hostname: global.location && location.hostname || 'localhost',
12321243
path: '/socketcluster/',
12331244
secure: isSecureDefault,
12341245
autoConnect: true,

socketcluster.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)