Skip to content

Commit 9344928

Browse files
authored
fix exports in package.json to work with ts's implementation of node16 moduleResolution (#549)
1 parent 98a0efb commit 9344928

File tree

21 files changed

+193
-79
lines changed

21 files changed

+193
-79
lines changed

packages/device-id/package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,19 @@
2323
],
2424
"license": "Apache-2.0",
2525
"main": "dist/index.js",
26+
"types": "./dist/index.d.ts",
2627
"exports": {
2728
".": {
28-
"require": "./dist/index.js",
29-
"import": "./dist/.esm-wrapper.mjs",
30-
"types": "./dist/index.d.ts"
29+
"require": {
30+
"default": "./dist/index.js",
31+
"types": "./dist/index.d.ts"
32+
},
33+
"import": {
34+
"default": "./dist/.esm-wrapper.mjs",
35+
"types": "./dist/index.d.ts"
36+
}
3137
}
3238
},
33-
"types": "./dist/index.d.ts",
3439
"scripts": {
3540
"bootstrap": "npm run compile",
3641
"prepublishOnly": "npm run compile",

packages/devtools-proxy-support/package.json

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,29 @@
2323
],
2424
"license": "Apache-2.0",
2525
"main": "dist/index.js",
26+
"types": "./dist/index.d.ts",
2627
"exports": {
2728
".": {
28-
"require": "./dist/index.js",
29-
"import": "./dist/.esm-wrapper.mjs",
30-
"types": "./dist/index.d.ts"
29+
"require": {
30+
"default": "./dist/index.js",
31+
"types": "./dist/index.d.ts"
32+
},
33+
"import": {
34+
"default": "./dist/.esm-wrapper.mjs",
35+
"types": "./dist/index.d.ts"
36+
}
3137
},
3238
"./proxy-options": {
33-
"require": "./dist/proxy-options-public.js",
34-
"import": "./dist/.esm-wrapper-po.mjs",
35-
"types": "./dist/proxy-options-public.d.ts"
39+
"require": {
40+
"default": "./dist/proxy-options-public.js",
41+
"types": "./dist/proxy-options-public.d.ts"
42+
},
43+
"import": {
44+
"default": "./dist/.esm-wrapper-po.mjs",
45+
"types": "./dist/proxy-options-public.d.ts"
46+
}
3647
}
3748
},
38-
"types": "./dist/index.d.ts",
3949
"scripts": {
4050
"bootstrap": "npm run compile",
4151
"prepublishOnly": "npm run compile",

packages/dl-center/package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@
2323
],
2424
"license": "Apache-2.0",
2525
"main": "dist/index.js",
26+
"types": "./dist/index.d.ts",
2627
"exports": {
27-
"require": "./dist/index.js",
28-
"import": "./dist/.esm-wrapper.mjs",
29-
"types": "./dist/index.d.ts"
28+
"require": {
29+
"default": "./dist/index.js",
30+
"types": "./dist/index.d.ts"
31+
},
32+
"import": {
33+
"default": "./dist/.esm-wrapper.mjs",
34+
"types": "./dist/index.d.ts"
35+
}
3036
},
31-
"types": "./dist/index.d.ts",
3237
"scripts": {
3338
"generate-config-from-schema": "json2ts -i src/download-center-config.schema.json -o src/download-center-config.ts --bannerComment \"/* AUTO-GENERATED DO NOT EDIT. */\"",
3439
"pretest": "npm run generate-config-from-schema && npm run reformat",

packages/download-url/package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,17 @@
2121
"reformat": "npm run prettier -- --write ."
2222
},
2323
"main": "lib/index.js",
24+
"types": "lib/index.d.ts",
2425
"exports": {
25-
"require": "./lib/index.js",
26-
"import": "./.esm-wrapper.mjs",
27-
"types": "./lib/index.d.ts"
26+
"require": {
27+
"default": "./lib/index.js",
28+
"types": "./lib/index.d.ts"
29+
},
30+
"import": {
31+
"default": "./.esm-wrapper.mjs",
32+
"types": "./lib/index.d.ts"
33+
}
2834
},
29-
"typings": "lib/index.d.ts",
3035
"bin": {
3136
"mongodb-download-url": "bin/mongodb-download-url.js"
3237
},

packages/get-os-info/package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,14 @@
2424
"license": "Apache-2.0",
2525
"main": "dist/index.js",
2626
"exports": {
27-
"require": "./dist/index.js",
28-
"import": "./dist/.esm-wrapper.mjs",
29-
"types": "./dist/index.d.ts"
27+
"require": {
28+
"default": "./dist/index.js",
29+
"types": "./dist/index.d.ts"
30+
},
31+
"import": {
32+
"default": "./dist/.esm-wrapper.mjs",
33+
"types": "./dist/index.d.ts"
34+
}
3035
},
3136
"types": "./dist/index.d.ts",
3237
"scripts": {

packages/mongodb-cloud-info/package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@
2323
],
2424
"license": "Apache-2.0",
2525
"main": "dist/index.js",
26+
"types": "./dist/index.d.ts",
2627
"exports": {
27-
"require": "./dist/index.js",
28-
"import": "./dist/.esm-wrapper.mjs",
29-
"types": "./dist/index.d.ts"
28+
"require": {
29+
"default": "./dist/index.js",
30+
"types": "./dist/index.d.ts"
31+
},
32+
"import": {
33+
"default": "./dist/.esm-wrapper.mjs",
34+
"types": "./dist/index.d.ts"
35+
}
3036
},
31-
"types": "./dist/index.d.ts",
3237
"scripts": {
3338
"bootstrap": "npm run compile",
3439
"prepublishOnly": "npm run compile",

packages/mongodb-constants/package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@
2323
],
2424
"license": "Apache-2.0",
2525
"main": "dist/index.js",
26+
"types": "./dist/index.d.ts",
2627
"exports": {
27-
"require": "./dist/index.js",
28-
"import": "./dist/.esm-wrapper.mjs",
29-
"types": "./dist/index.d.ts"
28+
"require": {
29+
"default": "./dist/index.js",
30+
"types": "./dist/index.d.ts"
31+
},
32+
"import": {
33+
"default": "./dist/.esm-wrapper.mjs",
34+
"types": "./dist/index.d.ts"
35+
}
3036
},
31-
"types": "./dist/index.d.ts",
3237
"scripts": {
3338
"bootstrap": "npm run compile",
3439
"prepublishOnly": "npm run compile",

packages/mongodb-downloader/package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@
2323
],
2424
"license": "Apache-2.0",
2525
"main": "dist/index.js",
26+
"types": "./dist/index.d.ts",
2627
"exports": {
27-
"require": "./dist/index.js",
28-
"import": "./dist/.esm-wrapper.mjs",
29-
"types": "./dist/index.d.ts"
28+
"require": {
29+
"default": "./dist/index.js",
30+
"types": "./dist/index.d.ts"
31+
},
32+
"import": {
33+
"default": "./dist/.esm-wrapper.mjs",
34+
"types": "./dist/index.d.ts"
35+
}
3036
},
31-
"types": "./dist/index.d.ts",
3237
"scripts": {
3338
"bootstrap": "npm run compile",
3439
"prepublishOnly": "npm run compile",

packages/mongodb-redact/package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@
2323
],
2424
"license": "Apache-2.0",
2525
"main": "dist/index.js",
26+
"types": "./dist/index.d.ts",
2627
"exports": {
27-
"require": "./dist/index.js",
28-
"import": "./dist/.esm-wrapper.mjs",
29-
"types": "./dist/index.d.ts"
28+
"require": {
29+
"default": "./dist/index.js",
30+
"types": "./dist/index.d.ts"
31+
},
32+
"import": {
33+
"default": "./dist/.esm-wrapper.mjs",
34+
"types": "./dist/index.d.ts"
35+
}
3036
},
31-
"types": "./dist/index.d.ts",
3237
"scripts": {
3338
"bootstrap": "npm run compile",
3439
"prepublishOnly": "npm run compile",

packages/mongodb-runner/package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,17 @@
2727
},
2828
"license": "Apache-2.0",
2929
"main": "dist/index.js",
30+
"types": "./dist/index.d.ts",
3031
"exports": {
31-
".": {
32-
"require": "./dist/index.js",
33-
"import": "./dist/.esm-wrapper.mjs",
32+
"require": {
33+
"default": "./dist/index.js",
34+
"types": "./dist/index.d.ts"
35+
},
36+
"import": {
37+
"default": "./dist/.esm-wrapper.mjs",
3438
"types": "./dist/index.d.ts"
3539
}
3640
},
37-
"types": "./dist/index.d.ts",
3841
"scripts": {
3942
"bootstrap": "npm run compile",
4043
"prepublishOnly": "npm run compile",

packages/mongodb-ts-autocomplete/package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@
2323
],
2424
"license": "Apache-2.0",
2525
"main": "dist/index.js",
26+
"types": "./dist/index.d.ts",
2627
"exports": {
27-
"require": "./dist/index.js",
28-
"import": "./dist/.esm-wrapper.mjs",
29-
"types": "./dist/index.d.ts"
28+
"require": {
29+
"default": "./dist/index.js",
30+
"types": "./dist/index.d.ts"
31+
},
32+
"import": {
33+
"default": "./dist/.esm-wrapper.mjs",
34+
"types": "./dist/index.d.ts"
35+
}
3036
},
31-
"types": "./dist/index.d.ts",
3237
"scripts": {
3338
"bootstrap": "npm run compile",
3439
"prepublishOnly": "npm run compile",

packages/mql-typescript/package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,22 @@
2727
},
2828
"license": "Apache-2.0",
2929
"main": "dist/index.js",
30+
"types": "./dist/index.d.ts",
3031
"exports": {
32+
".": {
33+
"require": {
34+
"default": "./dist/index.js",
35+
"types": "./dist/index.d.ts"
36+
},
37+
"import": {
38+
"default": "./dist/.esm-wrapper.mjs",
39+
"types": "./dist/index.d.ts"
40+
}
41+
},
3142
"./schema": {
3243
"types": "./out/schema.d.ts"
3344
}
3445
},
35-
"types": "./dist/index.d.ts",
3646
"scripts": {
3747
"bootstrap": "npm run compile",
3848
"prepublishOnly": "npm run compile",

packages/native-machine-id/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@
2828
},
2929
"license": "Apache-2.0",
3030
"exports": {
31-
".": {
32-
"require": "./dist/index.js",
33-
"import": "./dist/.esm-wrapper.mjs",
31+
"require": {
32+
"default": "./dist/index.js",
33+
"types": "./dist/index.d.ts"
34+
},
35+
"import": {
36+
"default": "./dist/.esm-wrapper.mjs",
3437
"types": "./dist/index.d.ts"
3538
}
3639
},

packages/oidc-http-server-pages/package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@
2323
],
2424
"license": "Apache-2.0",
2525
"main": "dist/index.js",
26+
"types": "./dist/index.d.ts",
2627
"exports": {
27-
"require": "./dist/index.js",
28-
"import": "./dist/.esm-wrapper.mjs",
29-
"types": "./dist/index.d.ts"
28+
"require": {
29+
"default": "./dist/index.js",
30+
"types": "./dist/index.d.ts"
31+
},
32+
"import": {
33+
"default": "./dist/.esm-wrapper.mjs",
34+
"types": "./dist/index.d.ts"
35+
}
3036
},
31-
"types": "./dist/index.d.ts",
3237
"scripts": {
3338
"bootstrap": "npm run compile",
3439
"prepublishOnly": "npm run compile",

packages/oidc-mock-provider/package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,17 @@
2828
},
2929
"license": "Apache-2.0",
3030
"main": "dist/index.js",
31+
"types": "./dist/index.d.ts",
3132
"exports": {
32-
"require": "./dist/index.js",
33-
"import": "./dist/.esm-wrapper.mjs",
34-
"types": "./dist/index.d.ts"
33+
"require": {
34+
"default": "./dist/index.js",
35+
"types": "./dist/index.d.ts"
36+
},
37+
"import": {
38+
"default": "./dist/.esm-wrapper.mjs",
39+
"types": "./dist/index.d.ts"
40+
}
3541
},
36-
"types": "./dist/index.d.ts",
3742
"scripts": {
3843
"bootstrap": "npm run compile",
3944
"prepublishOnly": "npm run compile",

packages/query-parser/package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@
2323
],
2424
"license": "Apache-2.0",
2525
"main": "dist/index.js",
26+
"types": "./dist/index.d.ts",
2627
"exports": {
27-
"require": "./dist/index.js",
28-
"import": "./dist/.esm-wrapper.mjs",
29-
"types": "./dist/index.d.ts"
28+
"require": {
29+
"default": "./dist/index.js",
30+
"types": "./dist/index.d.ts"
31+
},
32+
"import": {
33+
"default": "./dist/.esm-wrapper.mjs",
34+
"types": "./dist/index.d.ts"
35+
}
3036
},
31-
"types": "./dist/index.d.ts",
3237
"scripts": {
3338
"bootstrap": "npm run compile",
3439
"prepublishOnly": "npm run compile",

packages/sbom-tools/package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,17 @@
2626
],
2727
"license": "Apache-2.0",
2828
"main": "dist/index.js",
29+
"types": "./dist/index.d.ts",
2930
"exports": {
30-
"require": "./dist/index.js",
31-
"import": "./dist/.esm-wrapper.mjs",
32-
"types": "./dist/index.d.ts"
31+
"require": {
32+
"default": "./dist/index.js",
33+
"types": "./dist/index.d.ts"
34+
},
35+
"import": {
36+
"default": "./dist/.esm-wrapper.mjs",
37+
"types": "./dist/index.d.ts"
38+
}
3339
},
34-
"types": "./dist/index.d.ts",
3540
"scripts": {
3641
"bootstrap": "npm run compile",
3742
"prepublishOnly": "npm run compile",

0 commit comments

Comments
 (0)