metro-resolver
Advanced tools
Comparing version 0.77.0 to 0.78.0
{ | ||
"name": "metro-resolver", | ||
"version": "0.77.0", | ||
"version": "0.78.0", | ||
"description": "🚇 Implementation of Metro's resolution logic.", | ||
@@ -17,3 +17,6 @@ "main": "src", | ||
"node": ">=18" | ||
}, | ||
"devDependencies": { | ||
"metro": "0.78.0" | ||
} | ||
} |
@@ -20,6 +20,7 @@ "use strict"; | ||
*/ | ||
function createDefaultContext(context) { | ||
function createDefaultContext(context, dependency) { | ||
return { | ||
redirectModulePath: (modulePath) => | ||
(0, _PackageResolve.redirectModulePath)(context, modulePath), | ||
dependency, | ||
...context, | ||
@@ -26,0 +27,0 @@ }; |
@@ -435,3 +435,3 @@ /** | ||
} | ||
if (context.preferNativePlatform) { | ||
if (context.preferNativePlatform && sourceExt !== "") { | ||
const filePath = resolveSourceFileForExt(context, `.native${sourceExt}`); | ||
@@ -438,0 +438,0 @@ if (filePath) { |
@@ -11,2 +11,4 @@ /** | ||
import {TransformResultDependency} from 'metro'; | ||
export type Result<TResolution, TCandidates> = | ||
@@ -107,2 +109,9 @@ | {readonly type: 'resolved'; readonly resolution: TResolution} | ||
/** | ||
* The dependency descriptor, within the origin module, corresponding to the | ||
* current resolution request. This is provided for diagnostic purposes ONLY | ||
* and may not be used for resolution purposes. | ||
*/ | ||
readonly dependency?: TransformResultDependency; | ||
/** | ||
* The ordered list of fields to read in `package.json` to resolve a main | ||
@@ -115,3 +124,4 @@ * entry point based on the "browser" field spec. | ||
* Full path of the module that is requiring or importing the module to be | ||
* resolved. | ||
* resolved. This may not be the only place this dependency was found, | ||
* as resolutions can be cached. | ||
*/ | ||
@@ -118,0 +128,0 @@ readonly originModulePath: string; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
102608
1513
1