chore(deps): bump dependencies (#2397)

Fixes #2394
This commit is contained in:
Andrey Lushnikov 2018-04-17 14:51:03 -07:00 committed by GitHub
parent ed4be10ae3
commit 37cc9f567d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -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')

View File

@ -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",

View File

@ -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);

View File

@ -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);
});
}