Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ node_modules
/ssl/*.pem
.idea/
.DS_Store
.nyc_output
59 changes: 49 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,59 @@
sudo: false

git:
depth: 10

branches:
only:
- master
- next
- v2

language: node_js

cache:
directories:
- node_modules
- $HOME/.npm

matrix:
fast_finish: true
include:
- env: JOB_PART=lint
node_js: 11
- &linux
env: JOB_PART=test
node_js: 11
- <<: *linux
node_js: 10
- <<: *linux
node_js: 8
- <<: *linux
node_js: 6
- &osx
os: 'osx'
env: JOB_PART=test
node_js: 11
- <<: *osx
node_js: 10
- <<: *osx
node_js: 8
- <<: *osx
node_js: 6

before_install:
- npm i -g npm@latest

language:
node_js
install:
- npm ci

node_js:
- '10'
- '8'
- '6'
- '4'
before_script:
- node --version
- npm --version

script:
npm run ci
- npm run $JOB_PART

after_success:
- cat ./coverage/coverage.json | node_modules/codecov.io/bin/codecov.io.js
- rm -rf ./coverage
- npm i codecov
- $(npm bin)/codecov
38 changes: 38 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
build: 'off'

branches:
only:
- master
- next
- v2

init:
- git config --global core.autocrlf input

cache:
- node_modules
- '%APPDATA%\npm-cache'

environment:
matrix:
- nodejs_version: '11'
webpack_version: latest
- nodejs_version: '10'
webpack_version: latest
- nodejs_version: '8'
webpack_version: latest
- nodejs_version: '6'
webpack_version: latest

matrix:
fast_finish: true

install:
- ps: Install-Product node $env:nodejs_version x64
- npm i -g npm@latest
- npm ci

test_script:
- node --version
- npm --version
- cmd: npm test
2 changes: 1 addition & 1 deletion lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const optionsSchema = require('./optionsSchema.json');
// eslint-disable-next-line global-require
const SockjsSession = require('sockjs/lib/transport').Session;
const decorateConnection = SockjsSession.prototype.decorateConnection;
SockjsSession.prototype.decorateConnection = function(req) {
SockjsSession.prototype.decorateConnection = function (req) {
decorateConnection.call(this, req);
const connection = this.connection;
if (connection.headers && !('origin' in connection.headers) && 'origin' in req.headers) {
Expand Down