From 37cc9f567d9c2d8da1eeb630d13202e95a48cbed Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Tue, 17 Apr 2018 14:51:03 -0700 Subject: [PATCH] chore(deps): bump dependencies (#2397) Fixes #2394 --- lib/Page.js | 2 +- package.json | 6 +++--- test/golden-utils.js | 4 ++-- test/server/SimpleServer.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Page.js b/lib/Page.js index fee34258..5051addb 100644 --- a/lib/Page.js +++ b/lib/Page.js @@ -687,7 +687,7 @@ class Page extends EventEmitter { console.assert(options.type === 'png' || options.type === 'jpeg', 'Unknown options.type value: ' + options.type); screenshotType = options.type; } else if (options.path) { - const mimeType = mime.lookup(options.path); + const mimeType = mime.getType(options.path); if (mimeType === 'image/png') screenshotType = 'png'; else if (mimeType === 'image/jpeg') diff --git a/package.json b/package.json index 41793b71..83e27234 100644 --- a/package.json +++ b/package.json @@ -26,10 +26,10 @@ "author": "The Chromium Authors", "license": "Apache-2.0", "dependencies": { - "debug": "^2.6.8", + "debug": "^3.1.0", "extract-zip": "^1.6.5", "https-proxy-agent": "^2.1.0", - "mime": "^1.3.4", + "mime": "^2.0.3", "progress": "^2.0.0", "proxy-from-env": "^1.0.0", "rimraf": "^2.6.1", @@ -41,7 +41,7 @@ "devDependencies": { "@types/debug": "0.0.30", "@types/extract-zip": "^1.6.2", - "@types/mime": "^1.3.1", + "@types/mime": "^2.0.0", "@types/node": "^8.0.26", "@types/rimraf": "^2.0.2", "@types/ws": "^3.0.2", diff --git a/test/golden-utils.js b/test/golden-utils.js index bfa3d266..15813986 100644 --- a/test/golden-utils.js +++ b/test/golden-utils.js @@ -93,11 +93,11 @@ function compare(goldenPath, outputPath, actual, goldenName) { }; } const expected = fs.readFileSync(expectedPath); - const comparator = GoldenComparators[mime.lookup(goldenName)]; + const comparator = GoldenComparators[mime.getType(goldenName)]; if (!comparator) { return { pass: false, - message: 'Failed to find comparator with type ' + mime.lookup(goldenName) + ': ' + goldenName + message: 'Failed to find comparator with type ' + mime.getType(goldenName) + ': ' + goldenName }; } const result = comparator(actual, expected); diff --git a/test/server/SimpleServer.js b/test/server/SimpleServer.js index 9825d69d..473ed614 100644 --- a/test/server/SimpleServer.js +++ b/test/server/SimpleServer.js @@ -234,7 +234,7 @@ class SimpleServer { response.end(`File not found: ${filePath}`); return; } - response.setHeader('Content-Type', mime.lookup(filePath)); + response.setHeader('Content-Type', mime.getType(filePath)); response.end(data); }); }