jest-haste-map
Advanced tools
Comparing version 19.0.0 to 19.0.1
@@ -302,4 +302,6 @@ /** | ||
const moduleMap = map[id]; | ||
const platform = | ||
getPlatformExtension(module[H.PATH]) || H.GENERIC_PLATFORM; | ||
const platform = getPlatformExtension( | ||
module[H.PATH], | ||
this._options.platforms) || | ||
H.GENERIC_PLATFORM; | ||
const existingModule = moduleMap[platform]; | ||
@@ -306,0 +308,0 @@ if (existingModule && existingModule[H.PATH] !== module[H.PATH]) { |
@@ -20,3 +20,6 @@ /** | ||
// Extract platform extension: index.ios.js -> ios | ||
function getPlatformExtension(file) { | ||
function getPlatformExtension( | ||
file, | ||
platforms) | ||
{ | ||
const last = file.lastIndexOf('.'); | ||
@@ -28,2 +31,6 @@ const secondToLast = file.lastIndexOf('.', last - 1); | ||
const platform = file.substring(secondToLast + 1, last); | ||
// If an overriding platform array is passed, check that first | ||
if (platforms && platforms.indexOf(platform) !== -1) { | ||
return platform; | ||
} | ||
return SUPPORTED_PLATFORM_EXTS[platform] ? platform : null; | ||
@@ -30,0 +37,0 @@ } |
{ | ||
"name": "jest-haste-map", | ||
"version": "19.0.0", | ||
"version": "19.0.1", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
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
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
38412
1166