@putout/plugin-esm 7.7.0 → 7.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,13 +27,13 @@ export const createGetPrivateImports = (importsCache = new Map(), emptyMap = new
|
|
|
27
27
|
const {aliasBased = false} = options;
|
|
28
28
|
|
|
29
29
|
if (importsCache.has(dir))
|
|
30
|
-
return
|
|
30
|
+
return importsCache.get(dir);
|
|
31
31
|
|
|
32
32
|
const [packageDirectory, packagePath] = findFileUp(file, 'package.json');
|
|
33
33
|
|
|
34
34
|
if (!packagePath) {
|
|
35
35
|
importsCache.set(dir, emptyMap);
|
|
36
|
-
return
|
|
36
|
+
return emptyMap;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
const packageContent = readFileContent(packagePath);
|
|
@@ -42,7 +42,7 @@ export const createGetPrivateImports = (importsCache = new Map(), emptyMap = new
|
|
|
42
42
|
if (error) {
|
|
43
43
|
importsCache.set(dir, emptyMap);
|
|
44
44
|
|
|
45
|
-
return
|
|
45
|
+
return emptyMap;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
const {imports = {}} = packageJson;
|
|
@@ -62,9 +62,9 @@ export const createGetPrivateImports = (importsCache = new Map(), emptyMap = new
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
importsCache.set(
|
|
65
|
+
importsCache.set(dir, importsEntries);
|
|
66
66
|
|
|
67
|
-
return
|
|
67
|
+
return importsEntries;
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
function parseProperty(property) {
|
package/package.json
CHANGED