@putout/plugin-esm 7.7.1 → 8.0.0
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.
|
@@ -104,7 +104,7 @@ const createGetPackageType = (importsCache = new Map()) => (file) => {
|
|
|
104
104
|
if (importsCache.has(dir))
|
|
105
105
|
return importsCache.get(dir);
|
|
106
106
|
|
|
107
|
-
const
|
|
107
|
+
const packagePath = findFileUp(file, 'package.json');
|
|
108
108
|
|
|
109
109
|
if (!packagePath) {
|
|
110
110
|
importsCache.set(dir, 'commonjs');
|
|
@@ -29,7 +29,7 @@ export const createGetPrivateImports = (importsCache = new Map(), emptyMap = new
|
|
|
29
29
|
if (importsCache.has(dir))
|
|
30
30
|
return importsCache.get(dir);
|
|
31
31
|
|
|
32
|
-
const
|
|
32
|
+
const packagePath = findFileUp(file, 'package.json');
|
|
33
33
|
|
|
34
34
|
if (!packagePath) {
|
|
35
35
|
importsCache.set(dir, emptyMap);
|
|
@@ -45,6 +45,7 @@ export const createGetPrivateImports = (importsCache = new Map(), emptyMap = new
|
|
|
45
45
|
return emptyMap;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
const packageDirectory = dirname(getFilename(packagePath));
|
|
48
49
|
const {imports = {}} = packageJson;
|
|
49
50
|
const importsEntries = new Map();
|
|
50
51
|
|
package/package.json
CHANGED