microsoft-graph 2.7.2 → 2.7.3
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.
- package/package.json +2 -652
- package/update-exports.ts +9 -14
package/update-exports.ts
CHANGED
|
@@ -40,22 +40,17 @@ function walk(dir: string, currentRelPath = ''): void {
|
|
|
40
40
|
!isTestFile(entry) &&
|
|
41
41
|
!isTestDir(relPath)
|
|
42
42
|
) {
|
|
43
|
-
|
|
44
|
-
const
|
|
43
|
+
// Create a clean path without 'dist/esm' or 'dist/cjs'
|
|
44
|
+
const cleanRelPath = relPath.replace(/\\/g, '/');
|
|
45
|
+
const moduleBasePath = cleanRelPath.replace(/\.js$/, '');
|
|
45
46
|
|
|
46
|
-
//
|
|
47
|
-
|
|
48
|
-
import: `./dist/esm/${relPath.replace(/\\/g, '/')}`,
|
|
49
|
-
require: `./dist/cjs/${relPath.replace(/\\/g, '/')}`,
|
|
50
|
-
types: `./dist/esm/${relPath.replace(/\.js$/, '.d.ts').replace(/\\/g, '/')}`
|
|
51
|
-
};
|
|
47
|
+
// Create a clean export path for the module (without dist)
|
|
48
|
+
const exportPath = `./${moduleBasePath}`;
|
|
52
49
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
require: `./dist/cjs/${relPath.replace(/\\/g, '/')}`,
|
|
58
|
-
types: `./dist/esm/${relPath.replace(/\.js$/, '.d.ts').replace(/\\/g, '/')}`
|
|
50
|
+
exportsMap[exportPath] = {
|
|
51
|
+
import: `./dist/esm/${cleanRelPath}`,
|
|
52
|
+
require: `./dist/cjs/${cleanRelPath}`,
|
|
53
|
+
types: `./dist/esm/${cleanRelPath.replace(/\.js$/, '.d.ts')}`
|
|
59
54
|
};
|
|
60
55
|
}
|
|
61
56
|
}
|