Skip to content

Commit c646847

Browse files
resolutions
1 parent 79a5351 commit c646847

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@
4545
"agent-base": "^6.0.2",
4646
"socks": "^2.8.7"
4747
},
48+
"./HttpsProxySocket": {
49+
"require": "./lib/cjs/HttpsProxySocket.cjs",
50+
"import": "./lib/esm/HttpsProxySocket.mjs"
51+
},
52+
"./tediousPatch": {
53+
"require": "./lib/cjs/tediousPatch.cjs",
54+
"import": "./lib/esm/tediousPatch.mjs"
55+
},
56+
"./mongoPatch": {
57+
"require": "./lib/cjs/mongoPatch.cjs",
58+
"import": "./lib/esm/mongoPatch.mjs"
59+
},
4860
"files": [
4961
"/README.md",
5062
"/lib"

scripts/build.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ import { execSync } from 'child_process';
22
import { readdirSync, renameSync } from 'fs';
33
import { join } from 'path';
44

5-
// Compile ESM
65
execSync('tsc -p tsconfig.esm.json', { stdio: 'inherit' });
7-
8-
// Compile CJS
96
execSync('tsc -p tsconfig.cjs.json', { stdio: 'inherit' });
107

118
// Rename .js -> .cjs in CJS folder
@@ -18,14 +15,4 @@ readdirSync(cjsDir).forEach((file) => {
1815
}
1916
});
2017

21-
// Rename .js -> .mjs in ESM folder
22-
const esmDir = join(process.cwd(), 'lib/esm');
23-
readdirSync(esmDir).forEach((file) => {
24-
if (file.endsWith('.js')) {
25-
const oldPath = join(esmDir, file);
26-
const newPath = join(esmDir, file.replace(/\.js$/, '.mjs'));
27-
renameSync(oldPath, newPath);
28-
}
29-
});
30-
3118
console.log('✅ Build complete: ESM (.js) + CJS (.cjs)');

0 commit comments

Comments
 (0)