Permalink
Browse files

[chore] Release 3.1.1

  • Loading branch information...
1 parent 11f3fdd commit b949abc6e11e507449b0063c7e45b29eb1b6d1f5 @darrachequesne darrachequesne committed May 19, 2017
Showing with 52 additions and 43 deletions.
  1. +6 −0 History.md
  2. +45 −42 engine.io.js
  3. +1 −1 package.json
View
@@ -1,4 +1,10 @@
+3.1.1 / 2017-05-19
+===================
+
+ * [test] Launch browser tests on localhost by default (#571)
+ * [chore] Unpin debug version (#568)
+
3.1.0 / 2017-04-28
===================
View
@@ -3364,20 +3364,20 @@ return /******/ (function(modules) { // webpackBootstrap
// NB: In an Electron preload script, document will be defined but not fully
// initialized. Since we know we're in Chrome, we'll just detect this case
// explicitly
- if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {
+ if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
return true;
}
// is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
- return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
// is firebug? http://stackoverflow.com/a/398120/376773
- (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
// is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
- (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
// double check webkit in userAgent just in case we are in a worker
- (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
}
/**
@@ -3916,11 +3916,11 @@ return /******/ (function(modules) { // webpackBootstrap
* Helpers.
*/
- var s = 1000
- var m = s * 60
- var h = m * 60
- var d = h * 24
- var y = d * 365.25
+ var s = 1000;
+ var m = s * 60;
+ var h = m * 60;
+ var d = h * 24;
+ var y = d * 365.25;
/**
* Parse or format the given `val`.
@@ -3936,18 +3936,19 @@ return /******/ (function(modules) { // webpackBootstrap
* @api public
*/
- module.exports = function (val, options) {
- options = options || {}
- var type = typeof val
+ module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
if (type === 'string' && val.length > 0) {
- return parse(val)
+ return parse(val);
} else if (type === 'number' && isNaN(val) === false) {
- return options.long ?
- fmtLong(val) :
- fmtShort(val)
+ return options.long ? fmtLong(val) : fmtShort(val);
}
- throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val))
- }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+ };
/**
* Parse the given `str` and return milliseconds.
@@ -3958,53 +3959,55 @@ return /******/ (function(modules) { // webpackBootstrap
*/
function parse(str) {
- str = String(str)
- if (str.length > 10000) {
- return
+ str = String(str);
+ if (str.length > 100) {
+ return;
}
- var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str)
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
+ str
+ );
if (!match) {
- return
+ return;
}
- var n = parseFloat(match[1])
- var type = (match[2] || 'ms').toLowerCase()
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
switch (type) {
case 'years':
case 'year':
case 'yrs':
case 'yr':
case 'y':
- return n * y
+ return n * y;
case 'days':
case 'day':
case 'd':
- return n * d
+ return n * d;
case 'hours':
case 'hour':
case 'hrs':
case 'hr':
case 'h':
- return n * h
+ return n * h;
case 'minutes':
case 'minute':
case 'mins':
case 'min':
case 'm':
- return n * m
+ return n * m;
case 'seconds':
case 'second':
case 'secs':
case 'sec':
case 's':
- return n * s
+ return n * s;
case 'milliseconds':
case 'millisecond':
case 'msecs':
case 'msec':
case 'ms':
- return n
+ return n;
default:
- return undefined
+ return undefined;
}
}
@@ -4018,18 +4021,18 @@ return /******/ (function(modules) { // webpackBootstrap
function fmtShort(ms) {
if (ms >= d) {
- return Math.round(ms / d) + 'd'
+ return Math.round(ms / d) + 'd';
}
if (ms >= h) {
- return Math.round(ms / h) + 'h'
+ return Math.round(ms / h) + 'h';
}
if (ms >= m) {
- return Math.round(ms / m) + 'm'
+ return Math.round(ms / m) + 'm';
}
if (ms >= s) {
- return Math.round(ms / s) + 's'
+ return Math.round(ms / s) + 's';
}
- return ms + 'ms'
+ return ms + 'ms';
}
/**
@@ -4045,7 +4048,7 @@ return /******/ (function(modules) { // webpackBootstrap
plural(ms, h, 'hour') ||
plural(ms, m, 'minute') ||
plural(ms, s, 'second') ||
- ms + ' ms'
+ ms + ' ms';
}
/**
@@ -4054,12 +4057,12 @@ return /******/ (function(modules) { // webpackBootstrap
function plural(ms, n, name) {
if (ms < n) {
- return
+ return;
}
if (ms < n * 1.5) {
- return Math.floor(ms / n) + ' ' + name
+ return Math.floor(ms / n) + ' ' + name;
}
- return Math.ceil(ms / n) + ' ' + name + 's'
+ return Math.ceil(ms / n) + ' ' + name + 's';
}
View
@@ -2,7 +2,7 @@
"name": "engine.io-client",
"description": "Client for the realtime Engine",
"license": "MIT",
- "version": "3.1.0",
+ "version": "3.1.1",
"homepage": "https://github.com/socketio/engine.io-client",
"contributors": [
{

0 comments on commit b949abc

Please sign in to comment.