Skip to content

Commit a37e8a5

Browse files
committed
Add exports to compat's package.json & make builder export in ESM style & add ts6 to local types tests
1 parent 0045740 commit a37e8a5

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

packages/core-js-builder/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ type Options = Pick<CompatOptions, "exclude" | "modules" | "targets"> & {
3030

3131
declare function builder(options?: Options): Promise<string>;
3232

33-
export = builder;
33+
export default builder;

packages/core-js-compat/package.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,28 @@
2828
"sideEffects": false,
2929
"main": "index.js",
3030
"types": "index.d.ts",
31+
"exports": {
32+
".": {
33+
"types": "./index.d.ts",
34+
"default": "./index.js"
35+
},
36+
"./index.js": {
37+
"types": "./index.d.ts",
38+
"default": "./index.js"
39+
},
40+
"./compat": {
41+
"types": "./compat.d.ts",
42+
"default": "./compat.js"
43+
},
44+
"./get-entries-list-for-target-version": {
45+
"types": "./get-entries-list-for-target-version.d.ts",
46+
"default": "./get-entries-list-for-target-version.js"
47+
},
48+
"./get-modules-list-for-target-version": {
49+
"types": "./get-modules-list-for-target-version.d.ts",
50+
"default": "./get-modules-list-for-target-version.js"
51+
}
52+
},
3153
"dependencies": {
3254
"browserslist": "^4.28.1"
3355
}

tests/type-definitions/runner.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const TYPE_SCRIPT_VERSIONS = ALL_TESTS ? [
2424
// '5.3',
2525
// '5.2',
2626
] : [
27+
'6.0.0-dev.20260208',
2728
'5.9',
2829
'5.6',
2930
];

0 commit comments

Comments
 (0)