Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade some deps #2997

Closed
wants to merge 7 commits into from
Closed
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: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ language: node_js
node_js:
- 6
- 8
- 9
- 10

env:
Expand Down
6 changes: 3 additions & 3 deletions lib/middleware/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function createServeFile (fs, directory, config) {

// serve from cache
if (content && !doNotCache) {
response.setHeader('Content-Type', mime.lookup(filepath, 'text/plain'))
response.setHeader('Content-Type', mime.getType(filepath, 'text/plain'))

// call custom transform fn to transform the data
responseData = (transform && transform(content)) || content
Expand All @@ -108,7 +108,7 @@ function createServeFile (fs, directory, config) {
cache[filepath] = data.toString()
}

response.setHeader('Content-Type', mime.lookup(filepath, 'text/plain'))
response.setHeader('Content-Type', mime.getType(filepath, 'text/plain'))

// call custom transform fn to transform the data
responseData = (transform && transform(data.toString())) || data
Expand Down Expand Up @@ -136,7 +136,7 @@ function initializeMimeTypes (config) {
_.forEach(config.mime, function (value, key) {
const map = {}
map[key] = value
mime.define(map)
mime.define(map, true)
})
}
}
Expand Down
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@
"body-parser": "^1.16.1",
"chokidar": "^2.0.3",
"colors": "^1.1.0",
"combine-lists": "^1.0.0",
"combine-lists": "^1.0.1",
"connect": "^3.6.0",
"core-js": "^2.2.0",
"di": "^0.0.1",
Expand All @@ -372,9 +372,10 @@
"graceful-fs": "^4.1.2",
"http-proxy": "^1.13.0",
"isbinaryfile": "^3.0.0",
"lodash": "^4.17.4",
"lodash": "^4.17.10",
"mime": "^2.3.1",
"log4js": "^3.0.0",
"mime": "^1.3.4",
"mime": "^2.3.1",
"minimatch": "^3.0.2",
"optimist": "^0.6.1",
"qjobs": "^1.1.4",
Expand All @@ -384,30 +385,30 @@
"socket.io": "2.1.1",
"source-map": "^0.6.1",
"tmp": "0.0.33",
"useragent": "2.2.1"
"useragent": "2.3.0"
},
"devDependencies": {
"LiveScript": "^1.3.0",
"browserify": "^14.5.0",
"browserify": "^16.2.2",
"chai": "^4.1.2",
"chai-as-promised": "^7.1.1",
"chai-subset": "^1.2.2",
"coffeescript": "^1.12.7",
"cucumber": "^3.1.0",
"eslint": "^4.11.0",
"eslint-config-standard": "^10.2.1",
"eslint": "^4.19.1",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.4.2",
"eslint-plugin-react": "^7.0.1",
"eslint-plugin-standard": "^3.0.1",
"grunt": "^1.0.0",
"grunt-auto-release": "^0.0.7",
"grunt-browserify": "^5.0.0",
"grunt-bump": "^0.8.0",
"grunt-cli": "^1.1.0",
"grunt-check-clean": "^0.1.2",
"grunt-contrib-watch": "^1.0.0",
"grunt-cli": "^1.1.0",
"grunt-contrib-watch": "^1.0.1",
"grunt-conventional-changelog": "^6.0.1",
"grunt-conventional-github-releaser": "^1.0.0",
"grunt-cucumberjs": "^2.0.2",
Expand All @@ -416,7 +417,7 @@
"grunt-npm": "0.0.2",
"http2": "^3.3.6",
"husky": "^0.14.3",
"jasmine-core": "^2.3.4",
"jasmine-core": "^3.1.0",
"json3": "^3.3.2",
"karma-browserify": "^5.0.1",
"karma-browserstack-launcher": "^1.0.0",
Expand All @@ -439,12 +440,12 @@
"karma-requirejs": "*",
"karma-sauce-launcher": "*",
"karma-script-launcher": "^1.0.0",
"load-grunt-tasks": "^3.1.0",
"load-grunt-tasks": "^3.5.2",
"mkdirp": "^0.5.0",
"mocha": "^4.0.1",
"mocks": "^0.0.15",
"phantomjs-prebuilt": "^2.1.3",
"proxyquire": "^1.7.11",
"proxyquire": "^2.0.1",
"qunitjs": "^2.1.1",
"requirejs": "^2.1.20",
"sinon": "^3.0.0",
Expand Down
8 changes: 4 additions & 4 deletions test/unit/helper.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,31 +75,31 @@ describe('helper', () => {
'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; ' +
'.NET CLR 2.0.50727; .NET4.0C; .NET4.0E)'
)
.to.be.equal('IE 7.0.0 (Windows Vista 0.0.0)')
.to.be.equal('IE 7.0.0 (Windows Vista.0.0)')
})

it('should parse IE8', () => {
expecting(
'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; ' +
'SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3)"'
)
.to.be.equal('IE 8.0.0 (Windows 7 0.0.0)')
.to.be.equal('IE 8.0.0 (Windows 7.0.0)')
})

it('should parse IE9', () => {
expecting(
'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; ' +
'.NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)'
)
.to.be.equal('IE 9.0.0 (Windows 7 0.0.0)')
.to.be.equal('IE 9.0.0 (Windows 7.0.0)')
})

it('should parse IE10', () => {
expecting(
'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; ' +
'.NET4.0E; .NET4.0C)'
)
.to.be.equal('IE 10.0.0 (Windows 8 0.0.0)')
.to.be.equal('IE 10.0.0 (Windows 8.0.0)')
})

it('should parse PhantomJS', () => {
Expand Down
4 changes: 2 additions & 2 deletions test/unit/web-server.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ describe('web-server', () => {
})

it('should setup mime', () => {
expect(mime.lookup('/my.custom')).to.equal('custom/custom')
expect(mime.getType('/my.custom')).to.equal('custom/custom')
})

it('should keep default mimes', () => {
expect(mime.lookup('/my.html')).to.equal('text/html')
expect(mime.getType('/my.html')).to.equal('text/html')
})

it('should serve client.html', () => {
Expand Down
1 change: 0 additions & 1 deletion wallaby.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

module.exports = function (wallaby) {
return {
files: [
Expand Down
Loading