Skip to content

Commit

Permalink
chore: upgrade dev dependencies
Browse files Browse the repository at this point in the history
- run lint only on node@6
  • Loading branch information
dignifiedquire authored Feb 20, 2017
1 parent e095411 commit 153880f
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 53 deletions.
11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ node_js:
- "0.12"
- 4
- 5
- 6
- 7

env:
global:
- SAUCE_USERNAME: karmarunnerbot
- secure: "bRVY+hYZwMf1SqVnMyZRJTLD0gN1hLx9/MwO8MM/qBiu3YNjXy49XElfMdzMKN6cZeKTmhcnjmZonbJuI1PQ2t+utGkyjnlVLJ/OlWptreKLzIlcbt4hrdPoTcjmUTwDWq9Ex9cVoYX8AzCasETttpczp3P+s3+vmOUj8z25JyU="
- CXX=g++-4.8
matrix:
fast_finish: true
include:
- node_js: "5"
env: VALIDATE_COMMIT_MSG=TRUE
- node_js: "6"
env: VALIDATE_COMMIT_MSG=true LINT=true

before_install:
- npm config set loglevel warn
Expand All @@ -36,6 +37,8 @@ before_script:
- sh -e /etc/init.d/xvfb start
- npm run init
- export $(openssl aes-256-cbc -pass env:CREDENTIALS_PASS -d -in credentials)
- 'if [ "$VALIDATE_COMMIT_MSG" == "true" ]; then npm run travis; else ./scripts/validate-commit-msg.sh $TRAVIS_COMMIT; fi'
- 'if [ "$LINT" == "true" ]; then npm run lint; fi'

script:
- 'if [ "${VALIDATE_COMMIT_MSG}" != "TRUE" ]; then npm run travis; else ./scripts/validate-commit-msg.sh "${TRAVIS_COMMIT}"; fi'
- npm run travis
1 change: 0 additions & 1 deletion gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ module.exports = function (grunt) {

grunt.registerTask('build', ['browserify:client'])
grunt.registerTask('default', ['build', 'test', 'lint'])
grunt.registerTask('lint', ['eslint'])
grunt.registerTask('test-appveyor', ['test:unit', 'test:client'])

grunt.registerTask('release', 'Build, bump and publish to NPM.', function (type) {
Expand Down
2 changes: 1 addition & 1 deletion lib/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports.isDefined = function (value) {
}
var parser = function (pattern, out) {
if (pattern.length === 0) return out
var p = /^(\[[^\]]*\]|[\*\+@\?]\((.+?)\))/g
var p = /^(\[[^\]]*\]|[*+@?]\((.+?)\))/g
var matches = p.exec(pattern)
if (!matches) {
var c = pattern[0]
Expand Down
2 changes: 1 addition & 1 deletion lib/middleware/strip_host.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
var createStripHostMiddleware = function () {
return function (request, response, next) {
function stripHostFromUrl (url) {
return url.replace(/^http[s]?:\/\/([a-z\-\.:\d]+)\//, '/')
return url.replace(/^http[s]?:\/\/([a-z\-.:\d]+)\//, '/')
}

request.normalizedUrl = stripHostFromUrl(request.url) || request.url
Expand Down
6 changes: 3 additions & 3 deletions lib/watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ var DIR_SEP = require('path').sep
// Get parent folder, that be watched (does not contain any special globbing character)
var baseDirFromPattern = function (pattern) {
return pattern
.replace(/[\/\\][^\/\\]*\*.*$/, '') // remove parts with *
.replace(/[\/\\][^\/\\]*[!\+]\(.*$/, '') // remove parts with !(...) and +(...)
.replace(/[\/\\][^\/\\]*\)\?.*$/, '') || DIR_SEP // remove parts with (...)?
.replace(/[/\\][^/\\]*\*.*$/, '') // remove parts with *
.replace(/[/\\][^/\\]*[!+]\(.*$/, '') // remove parts with !(...) and +(...)
.replace(/[/\\][^/\\]*\)\?.*$/, '') || DIR_SEP // remove parts with (...)?
}

var watchPatterns = function (patterns, watcher) {
Expand Down
46 changes: 22 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,11 @@
],
"dependencies": {
"bluebird": "^3.3.0",
"body-parser": "^1.12.4",
"body-parser": "^1.16.1",
"chokidar": "^1.4.1",
"colors": "^1.1.0",
"combine-lists": "^1.0.0",
"connect": "^3.3.5",
"connect": "^3.6.0",
"core-js": "^2.2.0",
"di": "^0.0.1",
"dom-serialize": "^2.2.0",
Expand All @@ -331,28 +331,28 @@
"optimist": "^0.6.1",
"qjobs": "^1.1.4",
"range-parser": "^1.2.0",
"rimraf": "^2.3.3",
"rimraf": "^2.6.0",
"safe-buffer": "^5.0.1",
"socket.io": "1.7.2",
"socket.io": "1.7.3",
"source-map": "^0.5.3",
"tmp": "0.0.28",
"useragent": "^2.1.10"
"tmp": "0.0.31",
"useragent": "^2.1.12"
},
"devDependencies": {
"LiveScript": "^1.3.0",
"babel": "^6.5.2",
"babel-preset-es2015": "^6.9.0",
"babel-register": "^6.9.0",
"babel": "^6.23.0",
"babel-preset-es2015": "^6.22.0",
"babel-register": "^6.23.0",
"chai": "^3.3.0",
"chai-as-promised": "^5.0.0",
"chai-as-promised": "^6.0.0",
"chai-subset": "^1.2.2",
"coffee-script": "^1.12.1",
"coffee-script": "^1.12.4",
"cucumber": "^1.2.0",
"eslint": "^3.12.1",
"eslint-config-standard": "^5.1.0",
"eslint-plugin-promise": "^1.0.8",
"eslint-plugin-react": "^6.9.0",
"eslint-plugin-standard": "^1.3.1",
"eslint": "^3.15.0",
"eslint-config-standard": "^6.2.1",
"eslint-plugin-promise": "^3.4.2",
"eslint-plugin-react": "^6.10.0",
"eslint-plugin-standard": "^2.0.1",
"grunt": "^1.0.0",
"grunt-auto-release": "^0.0.7",
"grunt-browserify": "^5.0.0",
Expand All @@ -362,8 +362,7 @@
"grunt-conventional-changelog": "^6.0.1",
"grunt-conventional-github-releaser": "^1.0.0",
"grunt-cucumberjs": "^0.10.2",
"grunt-eslint": "^18.0.0",
"grunt-mocha-test": "^0.12.7",
"grunt-mocha-test": "^0.13.2",
"grunt-npm": "0.0.2",
"http2": "^3.3.6",
"husky": "^0.13.1",
Expand Down Expand Up @@ -395,15 +394,14 @@
"mocha": "^3.2.0",
"mocks": "^0.0.15",
"phantomjs-prebuilt": "^2.1.3",
"proxyquire": "^1.5.0",
"proxyquire": "^1.7.11",
"qunitjs": "^2.1.1",
"requirejs": "^2.1.20",
"sinon": "^1.17.5",
"sinon-chai": "^2.7.0",
"supertest": "^3.0.0",
"supertest-as-promised": "^3.0.0",
"timer-shim": "^0.3.0",
"validate-commit-msg": "^2.4.1",
"validate-commit-msg": "^2.11.1",
"which": "^1.1.1"
},
"main": "./lib/index",
Expand All @@ -416,7 +414,7 @@
"version": "1.4.1",
"license": "MIT",
"scripts": {
"lint": "grunt lint",
"lint": "eslint client/**/*.js common/**/*.js context/**/*.js gruntfile.js wallaby.js lib/**/*.js test/**/*.js static/debug.js",
"test": "grunt test",
"build": "grunt build",
"test:appveyor": "grunt test-appveyor",
Expand All @@ -425,8 +423,8 @@
"unlink": "node --eval \"require('fs').unlinkSync(require('path').resolve(__dirname, 'node_modules', 'karma'))\"",
"init": "rm -rf node_modules/karma && cd node_modules && ln -nsf ../ karma && cd ../",
"init:windows": "(IF EXIST node_modules\\karma (rmdir node_modules\\karma /S /q)) && npm run link",
"appveyor": "npm run lint && npm run build && npm run test:appveyor",
"travis": "npm run lint && npm run build && npm test && npm run test:integration",
"appveyor": "npm run build && npm run test:appveyor",
"travis": "npm run build && npm test && npm run test:integration",
"commitmsg": "validate-commit-msg",
"precommit": "npm run lint"
}
Expand Down
12 changes: 8 additions & 4 deletions test/unit/config.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,10 @@ describe('config', () => {
it('should normalize preprocessors to an array', () => {
var config = normalizeConfigWithDefaults({
basePath: '',
preprocessors: {'/*.coffee': 'coffee',
'/*.html': 'html2js'}
preprocessors: {
'/*.coffee': 'coffee',
'/*.html': 'html2js'
}
})

expect(config.preprocessors[resolveWinPath('/*.coffee')]).to.deep.equal(['coffee'])
Expand All @@ -351,8 +353,10 @@ describe('config', () => {
it('should resolve relative preprocessor patterns', () => {
var config = normalizeConfigWithDefaults({
basePath: '/some/base',
preprocessors: {'*.coffee': 'coffee',
'/**/*.html': 'html2js'}
preprocessors: {
'*.coffee': 'coffee',
'/**/*.html': 'html2js'
}
})

expect(config.preprocessors).to.have.property(resolveWinPath('/some/base/*.coffee'))
Expand Down
2 changes: 1 addition & 1 deletion test/unit/middleware/source_files.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import http from 'http'
import mocks from 'mocks'
import request from 'supertest-as-promised'
import request from 'supertest'
import helper from '../../../lib/helper'
import File from '../../../lib/file'
import {createServeFile} from '../../../lib/middleware/common'
Expand Down
23 changes: 12 additions & 11 deletions test/unit/server.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@ describe('server', () => {

doneSpy = sinon.spy()

mockConfig =
{frameworks: [],
port: 9876,
autoWatch: true,
listenAddress: '127.0.0.1',
hostname: 'localhost',
urlRoot: '/',
browsers: ['fake'],
singleRun: true,
logLevel: 'OFF',
browserDisconnectTolerance: 0}
mockConfig = {
frameworks: [],
port: 9876,
autoWatch: true,
listenAddress: '127.0.0.1',
hostname: 'localhost',
urlRoot: '/',
browsers: ['fake'],
singleRun: true,
logLevel: 'OFF',
browserDisconnectTolerance: 0
}

server = new Server(mockConfig, doneSpy)

Expand Down
11 changes: 8 additions & 3 deletions test/unit/web-server.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require('core-js')
import {EventEmitter} from 'events'
import request from 'supertest-as-promised'
import request from 'supertest'
import di from 'di'
import mocks from 'mocks'
import fs from 'fs'
Expand Down Expand Up @@ -217,8 +217,13 @@ describe('web-server', () => {
emitter = new EventEmitter()

var injector = new di.Injector([{
config: ['value', {basePath: '/base/path', urlRoot: '/', protocol: 'https:', httpsServerOptions: credentials,
client: {useIframe: true, useSingleWindow: false}}],
config: ['value', {
basePath: '/base/path',
urlRoot: '/',
protocol: 'https:',
httpsServerOptions: credentials,
client: {useIframe: true, useSingleWindow: false}
}],
customFileHandlers: ['value', customFileHandlers],
emitter: ['value', emitter],
fileList: ['value', {files: {served: [], included: []}}],
Expand Down

0 comments on commit 153880f

Please sign in to comment.