express-negotiator
Advanced tools
Comparing version 0.5.0 to 1.0.0
@@ -216,2 +216,9 @@ var fs = require('fs'), | ||
var userAgentInfo = mario(userAgentString) || {}; | ||
// If we have IE on device other than phone always show desktop version | ||
// We do not want IE 11 on windows surface device to get touch version | ||
if (userAgentInfo.explorer && !userAgentInfo.windowsPhone) { | ||
userAgentInfo.touch = false; | ||
} | ||
userAgentTypes.forEach(function (userAgentType) { | ||
@@ -218,0 +225,0 @@ if (!userAgentInfo[userAgentType]) { |
@@ -25,3 +25,3 @@ { | ||
], | ||
"version": "0.5.0", | ||
"version": "1.0.0", | ||
"engines": { | ||
@@ -32,3 +32,3 @@ "node": "*" | ||
"async": "0.2.8", | ||
"mario": "1.4.1", | ||
"mario": "1.8.0", | ||
"memoizeasync": "0.9.0", | ||
@@ -43,3 +43,3 @@ "memoizesync": "0.5.0", | ||
"mocha": "1.13.0", | ||
"unexpected": "1.0.1" | ||
"unexpected": "^10.26.3" | ||
}, | ||
@@ -46,0 +46,0 @@ "main": "lib/expressNegotiator.js", |
@@ -81,3 +81,4 @@ var Path = require('path'), | ||
createTest('/baz Accept: */html, a non-touch user agent and userAgent:true', {url: '/baz', headers: {accept: '*/html', 'user-agent': 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)'}}, '/baz.nontouch.html', {userAgent: true}); | ||
createTest('/baz Accept: */html, a touch user agent and userAgent:true', {url: '/baz', headers: {accept: '*/html', 'user-agent': 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0; Touch)'}}, '/baz.touch.html', {userAgent: true}); | ||
createTest('/baz Accept: */html, a touch user agent and userAgent:true', {url: '/baz', headers: {accept: '*/html', 'user-agent': 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 820)'}}, '/baz.touch.html', {userAgent: true}); | ||
createTest('/baz Accept: */html, a windows touch surface user agent and userAgent:true', {url: '/baz', headers: {accept: '*/html', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko'}}, '/baz.nontouch.html', {userAgent: true}); | ||
@@ -84,0 +85,0 @@ createTest('a non-locale id and non-mario extension in the request url should be honored, and if a variant has it, it should be preferred', {url: '/index.nocdn', headers: {accept: '*/html'}}, '/index.nocdn.en_US.html'); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
41683
505
1
2
+ Addedmario@1.8.0(transitive)
- Removedmario@1.4.1(transitive)
Updatedmario@1.8.0