microsoft-graph 2.7.1 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microsoft-graph",
3
- "version": "2.7.1",
3
+ "version": "2.7.3",
4
4
  "description": "Microsoft GraphAPI SDK for NodeJS",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -10,8 +10,8 @@
10
10
  "fix": "biome check --fix",
11
11
  "typecheck": "tsc --noEmit",
12
12
  "build:esm": "tsc -p tsconfig.esm.json",
13
- "build:cjs": "tsc -p tsconfig.cjs.json --skipLibCheck",
14
- "build": "npm run check && echo 'Building for ESM...' && npm run build:esm && echo 'Building for CJS...' && npm run build:cjs && npx tsx update-exports.ts",
13
+ "build:cjs": "tsc -p tsconfig.cjs.json",
14
+ "build": "npm run check && npx tsx update-exports.ts && echo 'Building for ESM...' && npm run build:esm && echo 'Building for CJS...' && npm run build:cjs",
15
15
  "release": "npm run build && npm publish --access public",
16
16
  "test": "vitest --bail=3",
17
17
  "update": "npm-check-updates -u && npm install"
package/tsconfig.cjs.json CHANGED
@@ -3,8 +3,8 @@
3
3
  "compilerOptions": {
4
4
  "outDir": "./dist/cjs",
5
5
  "module": "CommonJS",
6
- "moduleResolution": "Node10",
6
+ "moduleResolution": "node",
7
7
  "skipLibCheck": true,
8
8
  "esModuleInterop": true
9
- },
9
+ }
10
10
  }
package/update-exports.ts CHANGED
@@ -40,11 +40,17 @@ function walk(dir: string, currentRelPath = ''): void {
40
40
  !isTestFile(entry) &&
41
41
  !isTestDir(relPath)
42
42
  ) {
43
- const exportSubpath = './' + relPath.replace(/\.js$/, '').replace(/\\/g, '/');
44
- exportsMap[exportSubpath] = {
45
- import: `./dist/esm/${relPath.replace(/\\/g, '/')}`,
46
- require: `./dist/cjs/${relPath.replace(/\\/g, '/')}`,
47
- types: `./dist/esm/${relPath.replace(/\.js$/, '.d.ts').replace(/\\/g, '/')}`
43
+ // Create a clean path without 'dist/esm' or 'dist/cjs'
44
+ const cleanRelPath = relPath.replace(/\\/g, '/');
45
+ const moduleBasePath = cleanRelPath.replace(/\.js$/, '');
46
+
47
+ // Create a clean export path for the module (without dist)
48
+ const exportPath = `./${moduleBasePath}`;
49
+
50
+ exportsMap[exportPath] = {
51
+ import: `./dist/esm/${cleanRelPath}`,
52
+ require: `./dist/cjs/${cleanRelPath}`,
53
+ types: `./dist/esm/${cleanRelPath.replace(/\.js$/, '.d.ts')}`
48
54
  };
49
55
  }
50
56
  }