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.
Files changed (2) hide show
  1. package/package.json +2 -652
  2. 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
- const normalizedPath = relPath.replace(/\.js$/, '').replace(/\\/g, '/');
44
- const exportSubpath = './' + normalizedPath;
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
- // Original export path with dist/ in the actual file paths
47
- exportsMap[exportSubpath] = {
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
- // 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, '/')}`
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
  }