@mui/internal-code-infra 0.0.2-canary.59 → 0.0.2-canary.60

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": "@mui/internal-code-infra",
3
- "version": "0.0.2-canary.59",
3
+ "version": "0.0.2-canary.60",
4
4
  "description": "Infra scripts and configs to be used across MUI repos.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -57,9 +57,9 @@
57
57
  "semver": "^7.7.2",
58
58
  "typescript-eslint": "^8.40.0",
59
59
  "yargs": "^18.0.0",
60
- "@mui/internal-babel-plugin-display-name": "1.0.4-canary.6",
60
+ "@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.7",
61
61
  "@mui/internal-babel-plugin-resolve-imports": "2.0.7-canary.19",
62
- "@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.7"
62
+ "@mui/internal-babel-plugin-display-name": "1.0.4-canary.6"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "eslint": "^9.0.0",
@@ -90,7 +90,7 @@
90
90
  "publishConfig": {
91
91
  "access": "public"
92
92
  },
93
- "gitSha": "16df0b56f5666a8f493c1519eb0ea7d13657152c",
93
+ "gitSha": "ae50b3d2bcb6e0ae38fceaef6a3c9dec43de84d0",
94
94
  "scripts": {
95
95
  "typescript": "tsc -p tsconfig.json",
96
96
  "test": "pnpm -w test --project @mui/internal-code-infra",
@@ -209,6 +209,20 @@ async function writePackageJson({ packageJson, bundles, outputDir, cwd, addTypes
209
209
  }
210
210
  });
211
211
 
212
+ // default condition should come last
213
+ Object.keys(newExports).forEach((key) => {
214
+ const exportVal = newExports[key];
215
+ if (exportVal && typeof exportVal === 'object' && (exportVal.import || exportVal.require)) {
216
+ const defaultExport = exportVal.import || exportVal.require;
217
+ if (exportVal.import) {
218
+ delete exportVal.import;
219
+ } else if (exportVal.require) {
220
+ delete exportVal.require;
221
+ }
222
+ exportVal.default = defaultExport;
223
+ }
224
+ });
225
+
212
226
  packageJson.exports = newExports;
213
227
 
214
228
  await fs.writeFile(