[Pkg-javascript-commits] [sockjs-client] 281/350: [dist] 1.0.0-beta.10

tonnerre at ancient-solutions.com tonnerre at ancient-solutions.com
Fri Aug 5 01:04:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.

commit 50e58d8c70ebcd2117d51d305d745f6f05424b47
Author: Bryce Kahle <bkahle at gmail.com>
Date:   Wed Dec 17 16:15:00 2014 -0500

    [dist] 1.0.0-beta.10
---
 Changelog.md                                       |  5 ++
 ...kjs-1.0.0-beta.9.js => sockjs-1.0.0-beta.10.js} | 76 ++++++++++++----------
 ...0-beta.9.min.js => sockjs-1.0.0-beta.10.min.js} |  4 +-
 lib/version.js                                     |  2 +-
 package.json                                       |  2 +-
 5 files changed, 49 insertions(+), 40 deletions(-)

diff --git a/Changelog.md b/Changelog.md
index d5c73b5..8c01aa8 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,8 @@
+1.0.0-beta.10
+====
+
+ * Upgrade `url-parse` to 0.2.3 to fix #222
+
 1.0.0-beta.9
 ====
 
diff --git a/dist/sockjs-1.0.0-beta.9.js b/dist/sockjs-1.0.0-beta.10.js
similarity index 98%
rename from dist/sockjs-1.0.0-beta.9.js
rename to dist/sockjs-1.0.0-beta.10.js
index 3294e59..f6d62d1 100755
--- a/dist/sockjs-1.0.0-beta.9.js
+++ b/dist/sockjs-1.0.0-beta.10.js
@@ -1,4 +1,4 @@
-/* sockjs-client v1.0.0-beta.9 | http://sockjs.org | MIT license */
+/* sockjs-client v1.0.0-beta.10 | http://sockjs.org | MIT license */
 !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.SockJS=e()}}(function(){var define,module,exports;return (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 fin [...]
 (function (global){
 'use strict';
@@ -3632,7 +3632,7 @@ module.exports = {
 
 }).call(this,{ env: {} })
 },{"debug":53,"url-parse":58}],52:[function(require,module,exports){
-module.exports = '1.0.0-beta.9';
+module.exports = '1.0.0-beta.10';
 },{}],53:[function(require,module,exports){
 
 /**
@@ -5034,39 +5034,9 @@ var required = require('requires-port')
 
 var keys = ',,protocol,username,password,host,hostname,port,pathname,query,hash'.split(',')
   , inherit = { protocol: 1, host: 1, hostname: 1 }
+  , relativere = /^\/(?!\/)/
   , parts = keys.length;
 
-//
-// Story time children:
-//
-// FireFox 34 has some problems with their Regular Expression engine and
-// executing a RegExp can cause a `too much recursion` error. We initially fixed
-// this by moving the Regular Expression in the URL constructor so it's created
-// every single time. This fixed it for some URL's but the more complex the
-// URL's get the easier it is to trigger. Complexer URL like:
-//
-//   https://www.mozilla.org/en-US/firefox/34.0/whatsnew/?oldversion=33.1
-//
-// Still triggered the recursion error. After talking with Chrome and FireFox
-// engineers it seemed to be caused by:
-//
-//   https://code.google.com/p/v8/issues/detail?id=430
-//
-// As FireFox started using Chrome's RegExp engine. After testing various of
-// workarounds I finally stumbled upon this gem, use new RegExp as it sometimes
-// behaves different then a RegExp literal.
-//
-// Steps for compiling the new RegExp:
-//
-// 1. Take the regular RegExp as seen below.
-// 2. Escape the RegExp using XRegExp.escape from http://xregexp.com/tests/
-// 3. ??
-// 4. Profit.
-//
-// RegExp source: /^(?:(?:(([^:\/#\?]+:)?(?:(?:\/\/)(?:(?:(?:([^:@\/#\?]+)(?:\:([^:@\/#\?]*))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/
-//
-var regexp = new RegExp('\^\(\?:\(\?:\(\(\[\^:\\/\#\\\?\]\+:\)\?\(\?:\(\?:\\/\\/\)\(\?:\(\?:\(\?:\(\[\^:@\\/\#\\\?\]\+\)\(\?:\\:\(\[\^:@\\/\#\\\?\]\*\)\)\?\)@\)\?\(\(\[\^:\\/\#\\\?\\\]\\\[\]\+\|\\\[\[\^\\/\\\]@\#\?\]\+\\\]\)\(\?:\\:\(\[0\-9\]\+\)\)\?\)\)\?\)\?\)\?\(\(\?:\\/\?\(\?:\[\^\\/\\\?\#\]\+\\/\+\)\*\)\(\?:\[\^\\\?\#\]\*\)\)\)\?\(\\\?\[\^\#\]\+\)\?\)\(\#\.\*\)\?');
-
 /**
  * The actual URL instance. Instead of returning an object we've opted-in to
  * create an actual constructor as it's much more memory efficient and
@@ -5083,11 +5053,45 @@ function URL(address, location, parser) {
     return new URL(address, location, parser);
   }
 
-  var bits = regexp.exec(address)
+  //
+  // Story time children:
+  //
+  // FireFox 34 has some problems with their Regular Expression engine and
+  // executing a RegExp can cause a `too much recursion` error. We initially fixed
+  // this by moving the Regular Expression in the URL constructor so it's created
+  // every single time. This fixed it for some URL's but the more complex the
+  // URL's get the easier it is to trigger. Complexer URL like:
+  //
+  //   https://www.mozilla.org/en-US/firefox/34.0/whatsnew/?oldversion=33.1
+  //
+  // Still triggered the recursion error. After talking with Chrome and FireFox
+  // engineers it seemed to be caused by:
+  //
+  //   https://code.google.com/p/v8/issues/detail?id=430
+  //
+  // As FireFox started using Chrome's RegExp engine. After testing various of
+  // workarounds I finally stumbled upon this gem, use new RegExp as it sometimes
+  // behaves different then a RegExp literal. The biggest problem with this
+  // FireFox problem is that it's super hard to reproduce as our "normal" test
+  // suite doesn't catch it. The only way to reproduce it was run the parser in
+  // jsperf.com (uses the benchmark module from npm) and supply it the URL
+  // mentioned above as URL to parse.
+  //
+  // Steps for compiling the new RegExp:
+  //
+  // 1. Take the regular RegExp as seen below.
+  // 2. Escape the RegExp using XRegExp.escape from http://xregexp.com/tests/
+  // 3. ??
+  // 4. Profit.
+  //
+  // RegExp source: /^(?:(?:(([^:\/#\?]+:)?(?:(?:\/\/)(?:(?:(?:([^:@\/#\?]+)(?:\:([^:@\/#\?]*))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/
+  //
+  var regexp = new RegExp('\^\(\?:\(\?:\(\(\[\^:\\/\#\\\?\]\+:\)\?\(\?:\(\?:\\/\\/\)\(\?:\(\?:\(\?:\(\[\^:@\\/\#\\\?\]\+\)\(\?:\\:\(\[\^:@\\/\#\\\?\]\*\)\)\?\)@\)\?\(\(\[\^:\\/\#\\\?\\\]\\\[\]\+\|\\\[\[\^\\/\\\]@\#\?\]\+\\\]\)\(\?:\\:\(\[0\-9\]\+\)\)\?\)\)\?\)\?\)\?\(\(\?:\\/\?\(\?:\[\^\\/\\\?\#\]\+\\/\+\)\*\)\(\?:\[\^\\\?\#\]\*\)\)\)\?\(\\\?\[\^\#\]\+\)\?\)\(\#\.\*\)\?')
+    , relative = relativere.test(address)
+    , bits = regexp.exec(address)
     , type = typeof location
     , url = this
     , i = 0
-    , bits
     , key;
 
   //
@@ -5115,7 +5119,7 @@ function URL(address, location, parser) {
   for (; i < parts; key = keys[++i]) {
     if (!key) continue;
 
-    url[key] = bits[i] || (key in inherit ? location[key] || '' : '');
+    url[key] = bits[i] || (key in inherit || ('port' === key && relative) ? location[key] || '' : '');
 
     //
     // The protocol, host, host name should always be lower cased even if they
diff --git a/dist/sockjs-1.0.0-beta.9.min.js b/dist/sockjs-1.0.0-beta.10.min.js
similarity index 81%
rename from dist/sockjs-1.0.0-beta.9.min.js
rename to dist/sockjs-1.0.0-beta.10.min.js
index 00e66cd..135e953 100755
--- a/dist/sockjs-1.0.0-beta.9.min.js
+++ b/dist/sockjs-1.0.0-beta.10.min.js
@@ -1,3 +1,3 @@
-/* sockjs-client v1.0.0-beta.9 | http://sockjs.org | MIT license */
+/* sockjs-client v1.0.0-beta.10 | http://sockjs.org | MIT license */
 !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.SockJS=t()}}(function(){var t;return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");th [...]
-},{"../../utils/browser":44,"../../utils/iframe":47,"../../utils/random":49,"../../utils/url":51,debug:void 0,events:3,inherits:53}],32:[function(t,e){"use strict";function n(t,e){i.call(this);var n=this;this.bufferPosition=0,this.xo=new e("POST",t,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",function(t,e){n._chunkHandler(t,e),n.xo=null;var r=200===t?"network":"permanent";n.emit("close",null,r),n._cleanup()})}var r=t("inherits"),i=t("events").EventEmitter [...]
\ No newline at end of file
+},{"../../utils/browser":44,"../../utils/iframe":47,"../../utils/random":49,"../../utils/url":51,debug:void 0,events:3,inherits:53}],32:[function(t,e){"use strict";function n(t,e){i.call(this);var n=this;this.bufferPosition=0,this.xo=new e("POST",t,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",function(t,e){n._chunkHandler(t,e),n.xo=null;var r=200===t?"network":"permanent";n.emit("close",null,r),n._cleanup()})}var r=t("inherits"),i=t("events").EventEmitter [...]
\ No newline at end of file
diff --git a/lib/version.js b/lib/version.js
index 246fe5b..20cf516 100644
--- a/lib/version.js
+++ b/lib/version.js
@@ -1 +1 @@
-module.exports = '1.0.0-beta.9';
\ No newline at end of file
+module.exports = '1.0.0-beta.10';
\ No newline at end of file
diff --git a/package.json b/package.json
index c641777..7bc3afe 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "name": "sockjs-client",
   "description": "SockJS-client is a browser JavaScript library that provides a WebSocket-like object. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server.",
-  "version": "1.0.0-beta.9",
+  "version": "1.0.0-beta.10",
   "author": "Bryce Kahle",
   "browser": {
     "./lib/transport/driver/websocket.js": "./lib/transport/browser/websocket.js",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list