@ms-cloudpack/config
Advanced tools
Comparing version 0.28.3 to 0.28.4
/** | ||
* Resolve a module specifier to a file path. Throws if it can't be resolved. | ||
* @returns - The resolved file path | ||
* Resolve a module specifier to a file url (with protocol ie: file:). Throws if it can't be resolved. | ||
* @returns - The resolved file url as a string. | ||
*/ | ||
@@ -5,0 +5,0 @@ export declare function resolveModule(params: { |
import { moduleResolve } from 'import-meta-resolve'; | ||
import { pathToFileURL, fileURLToPath } from 'url'; | ||
import { pathToFileURL } from 'url'; | ||
// Conditions used for resolution if the package has an exports map. | ||
@@ -7,4 +7,4 @@ // More could be added later if desired ("default" is implicitly included). | ||
/** | ||
* Resolve a module specifier to a file path. Throws if it can't be resolved. | ||
* @returns - The resolved file path | ||
* Resolve a module specifier to a file url (with protocol ie: file:). Throws if it can't be resolved. | ||
* @returns - The resolved file url as a string. | ||
*/ | ||
@@ -14,4 +14,4 @@ export function resolveModule(params) { | ||
const resolvedUrl = moduleResolve(importSpecifier, pathToFileURL(parentUrl), conditions); | ||
return fileURLToPath(resolvedUrl); | ||
return resolvedUrl.toString(); | ||
} | ||
//# sourceMappingURL=resolveModule.js.map |
@@ -0,1 +1,2 @@ | ||
import { fileURLToPath } from 'url'; | ||
import { resolveModule } from './resolveModule.js'; | ||
@@ -9,3 +10,3 @@ /** | ||
try { | ||
return resolveModule({ importSpecifier, parentUrl: params.configPath }); | ||
return fileURLToPath(resolveModule({ importSpecifier, parentUrl: params.configPath })); | ||
} | ||
@@ -12,0 +13,0 @@ catch (err) { |
{ | ||
"name": "@ms-cloudpack/config", | ||
"version": "0.28.3", | ||
"version": "0.28.4", | ||
"description": "Configuration handling for cloudpack.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
131833
1105