vue-docgen-api
Advanced tools
Comparing version 4.75.1 to 4.76.0
@@ -18,6 +18,10 @@ "use strict"; | ||
var path_1 = require("path"); | ||
var esm_resolve_1 = __importDefault(require("esm-resolve")); | ||
var missing_files_cache_1 = __importDefault(require("./missing-files-cache")); | ||
// fix issues with babel bundles in cjs | ||
var esmResolve = ('default' in esm_resolve_1.default ? esm_resolve_1.default.default : esm_resolve_1.default); | ||
var SUFFIXES = ['', '.js', '.ts', '.vue', '.jsx', '.tsx']; | ||
function resolvePathFrom(path, from) { | ||
var e_1, _a; | ||
var _b; | ||
var finalPath = null; | ||
@@ -82,3 +86,13 @@ try { | ||
catch (e) { | ||
// eat the error | ||
// if the error is about the package.json not being found, | ||
// try to resolve the path naturally | ||
if (e.code === 'ERR_PACKAGE_PATH_NOT_EXPORTED') { | ||
try { | ||
finalPath = (_b = esmResolve(from[0])(path)) !== null && _b !== void 0 ? _b : null; | ||
} | ||
catch (e) { | ||
// dismiss the error | ||
} | ||
} | ||
// else dismiss the error | ||
} | ||
@@ -85,0 +99,0 @@ if (!finalPath) { |
{ | ||
"name": "vue-docgen-api", | ||
"version": "4.75.1", | ||
"version": "4.76.0", | ||
"description": "Toolbox to extract information from Vue component files for documentation generation purposes.", | ||
@@ -40,2 +40,3 @@ "homepage": "https://vue-styleguidist.github.io", | ||
"ast-types": "^0.16.1", | ||
"esm-resolve": "^1.0.8", | ||
"hash-sum": "^2.0.0", | ||
@@ -42,0 +43,0 @@ "lru-cache": "^8.0.3", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
810064
12630
11
13
+ Addedesm-resolve@^1.0.8
+ Addedesm-resolve@1.0.11(transitive)
- Removedpicocolors@1.0.1(transitive)