microsoft-graph 2.7.1 → 2.7.2
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 +652 -2
- package/tsconfig.cjs.json +2 -2
- package/update-exports.ts +12 -1
package/tsconfig.cjs.json
CHANGED
package/update-exports.ts
CHANGED
|
@@ -40,12 +40,23 @@ function walk(dir: string, currentRelPath = ''): void {
|
|
|
40
40
|
!isTestFile(entry) &&
|
|
41
41
|
!isTestDir(relPath)
|
|
42
42
|
) {
|
|
43
|
-
const
|
|
43
|
+
const normalizedPath = relPath.replace(/\.js$/, '').replace(/\\/g, '/');
|
|
44
|
+
const exportSubpath = './' + normalizedPath;
|
|
45
|
+
|
|
46
|
+
// Original export path with dist/ in the actual file paths
|
|
44
47
|
exportsMap[exportSubpath] = {
|
|
45
48
|
import: `./dist/esm/${relPath.replace(/\\/g, '/')}`,
|
|
46
49
|
require: `./dist/cjs/${relPath.replace(/\\/g, '/')}`,
|
|
47
50
|
types: `./dist/esm/${relPath.replace(/\.js$/, '.d.ts').replace(/\\/g, '/')}`
|
|
48
51
|
};
|
|
52
|
+
|
|
53
|
+
// Additional export path for allowing "dist/" in the import path
|
|
54
|
+
// This creates backwards compatibility with existing code
|
|
55
|
+
exportsMap['./dist/' + normalizedPath] = {
|
|
56
|
+
import: `./dist/esm/${relPath.replace(/\\/g, '/')}`,
|
|
57
|
+
require: `./dist/cjs/${relPath.replace(/\\/g, '/')}`,
|
|
58
|
+
types: `./dist/esm/${relPath.replace(/\.js$/, '.d.ts').replace(/\\/g, '/')}`
|
|
59
|
+
};
|
|
49
60
|
}
|
|
50
61
|
}
|
|
51
62
|
}
|