Skip to content

Commit 6df7f26

Browse files
committed
Sort exports
1 parent f7d84ba commit 6df7f26

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

packages/core-js-types/package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,40 +40,40 @@
4040
}
4141
},
4242
"exports": {
43-
"./es": {
44-
"types@>=5.6": "./dist/56/es.d.ts",
45-
"types": "./dist/52/es.d.ts",
46-
"default": "./dist/56/es.d.ts"
47-
},
48-
"./stable": {
49-
"types@>=5.6": "./dist/56/stable.d.ts",
50-
"types": "./dist/52/stable.d.ts",
51-
"default": "./dist/56/stable.d.ts"
52-
},
53-
"./actual": {
43+
".": {
5444
"types@>=5.6": "./dist/56/actual.d.ts",
5545
"types": "./dist/52/actual.d.ts",
5646
"default": "./dist/56/actual.d.ts"
5747
},
58-
".": {
48+
"./actual": {
5949
"types@>=5.6": "./dist/56/actual.d.ts",
6050
"types": "./dist/52/actual.d.ts",
6151
"default": "./dist/56/actual.d.ts"
6252
},
53+
"./es": {
54+
"types@>=5.6": "./dist/56/es.d.ts",
55+
"types": "./dist/52/es.d.ts",
56+
"default": "./dist/56/es.d.ts"
57+
},
6358
"./full": {
6459
"types@>=5.6": "./dist/56/full.d.ts",
6560
"types": "./dist/52/full.d.ts",
6661
"default": "./dist/56/full.d.ts"
6762
},
63+
"./proposals/*": {
64+
"types@>=5.6": "./dist/56/proposals/*.d.ts",
65+
"types": "./dist/52/proposals/*.d.ts",
66+
"default": "./dist/56/proposals/*.d.ts"
67+
},
6868
"./pure": {
6969
"types@>=5.6": "./dist/56/pure.d.ts",
7070
"types": "./dist/52/pure.d.ts",
7171
"default": "./dist/56/pure.d.ts"
7272
},
73-
"./proposals/*": {
74-
"types@>=5.6": "./dist/56/proposals/*.d.ts",
75-
"types": "./dist/52/proposals/*.d.ts",
76-
"default": "./dist/56/proposals/*.d.ts"
73+
"./stable": {
74+
"types@>=5.6": "./dist/56/stable.d.ts",
75+
"types": "./dist/52/stable.d.ts",
76+
"default": "./dist/56/stable.d.ts"
7777
}
7878
}
7979
}

scripts/build-types/index.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ async function buildPackageJson(breakpoints, namespaces) {
180180
packageJson.exports['.'] = packageJson.exports[namespaceKey];
181181
}
182182
});
183+
const exportsKeys = Object.keys(packageJson.exports).sort();
184+
const exports = {};
185+
exportsKeys.forEach(key => {
186+
exports[key] = packageJson.exports[key];
187+
});
188+
packageJson.exports = exports;
183189
writeJson(path.join(config.packageDir, 'package.json'), packageJson, { spaces: 2 });
184190
}
185191

0 commit comments

Comments
 (0)