Skip to content

Commit

Permalink
update-sockjs: Update sockjs from version 0.3.4 to 1.1.1.
Browse files Browse the repository at this point in the history
- Add browserify to npm dependencies.
- Add SockJS-client to npm dependencies.
- Add npm postinstall script to generate browser version of SockJS-client
  from npm package.
- Change deprecated SockJS object property 'protocol_whitelist' to
  'transports'.
- Fix settings.
  • Loading branch information
kkanahin authored and timabbott committed Dec 6, 2016
1 parent aa7f11d commit 7bf10ec
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 2,395 deletions.
5 changes: 0 additions & 5 deletions docs/THIRDPARTY
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,6 @@ Files: static/third/string-prototype-codepointat/*
Copyright: 2014 Mathias Bynens
License: Expat

Files: static/third/sockjs/sockjs-0.3.4.js
Copyright: 2011-2012 VMware, Inc.
2012 Douglas Crockford
License: Expat and public-domain

Files: static/third/sorttable/sorttable.js
Copyright: 2007 Stuart Langridge
License: X11
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"description": "",
"main": "",
"dependencies": {
"browserify": "13.1.1",
"handlebars": "1.3.0",
"i18next": "3.0.0",
"i18next-parser": "0.7.0",
Expand All @@ -13,6 +14,7 @@
"i18next-localstorage-cache": "0.3.0",
"jquery": "1.12.1",
"jquery-validation": "1.15.1",
"sockjs-client":"1.1.1",
"webpack": "1.12.2"
},
"devDependencies": {
Expand All @@ -28,6 +30,7 @@
"xmlhttprequest": "1.5.0"
},
"scripts": {
"postinstall": "browserify node_modules/sockjs-client/lib/entry.js --standalone SockJS > node_modules/sockjs-client/sockjs.js",
"lint": "eslint --quiet",
"lint-loud": "eslint static/js frontend_tests"
},
Expand Down
2 changes: 1 addition & 1 deletion static/js/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function Socket(url) {

Socket.prototype = {
_create_sockjs_object: function Socket__create_sockjs_object() {
this._sockjs = new SockJS(this.url, null, {protocols_whitelist: this._supported_protocols});
this._sockjs = new SockJS(this.url, null, {transports: this._supported_protocols});
this._setup_sockjs_callbacks(this._sockjs);
},

Expand Down
Loading

0 comments on commit 7bf10ec

Please sign in to comment.