@mui/internal-code-infra 0.0.3-canary.60 → 0.0.3-canary.62

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.3-canary.60",
3
+ "version": "0.0.3-canary.62",
4
4
  "description": "Infra scripts and configs to be used across MUI repos.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -88,7 +88,7 @@
88
88
  "eslint-plugin-react": "^7.37.5",
89
89
  "eslint-plugin-react-compiler": "^19.1.0-rc.2",
90
90
  "eslint-plugin-react-hooks": "^7.0.1",
91
- "eslint-plugin-testing-library": "^7.13.3",
91
+ "eslint-plugin-testing-library": "^7.13.5",
92
92
  "execa": "^9.6.1",
93
93
  "git-url-parse": "^16.1.0",
94
94
  "globals": "^16.5.0",
@@ -101,11 +101,11 @@
101
101
  "resolve-pkg-maps": "^1.0.0",
102
102
  "semver": "^7.7.3",
103
103
  "stylelint-config-standard": "^39.0.1",
104
- "typescript-eslint": "^8.46.3",
104
+ "typescript-eslint": "^8.49.0",
105
105
  "yargs": "^18.0.0",
106
- "@mui/internal-babel-plugin-display-name": "1.0.4-canary.8",
106
+ "@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.13",
107
107
  "@mui/internal-babel-plugin-resolve-imports": "2.0.7-canary.28",
108
- "@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.13"
108
+ "@mui/internal-babel-plugin-display-name": "1.0.4-canary.8"
109
109
  },
110
110
  "peerDependencies": {
111
111
  "@next/eslint-plugin-next": "*",
@@ -124,13 +124,13 @@
124
124
  "@types/estree-jsx": "^1.0.5",
125
125
  "@types/regexp.escape": "^2.0.0",
126
126
  "@types/yargs": "^17.0.35",
127
- "@typescript-eslint/parser": "^8.46.3",
128
- "@typescript-eslint/rule-tester": "^8.46.3",
127
+ "@typescript-eslint/parser": "^8.49.0",
128
+ "@typescript-eslint/rule-tester": "^8.49.0",
129
129
  "eslint": "^9.39.1",
130
130
  "get-port": "^7.1.0",
131
- "prettier": "~3.7.4",
131
+ "prettier": "3.7.4",
132
132
  "serve": "^14.2.5",
133
- "typescript-eslint": "^8.46.3"
133
+ "typescript-eslint": "^8.49.0"
134
134
  },
135
135
  "files": [
136
136
  "bin",
@@ -142,7 +142,7 @@
142
142
  "publishConfig": {
143
143
  "access": "public"
144
144
  },
145
- "gitSha": "6b3d5d685430c855b51214a5a6d756d3207380eb",
145
+ "gitSha": "d9cf3df228aa4a3e7a7b1663bad0d7167f40d22c",
146
146
  "scripts": {
147
147
  "build": "tsc -p tsconfig.build.json",
148
148
  "typescript": "tsc -p tsconfig.json",
@@ -5,7 +5,20 @@ import { defineConfig } from 'eslint/config';
5
5
  * @returns {import('eslint').Linter.Config[]}
6
6
  */
7
7
  export function createDocsConfig() {
8
- return defineConfig(nextjs.flatConfig.recommended, {
8
+ /**
9
+ * @type {any}
10
+ */
11
+ const nextjsAlias = nextjs;
12
+
13
+ // `nextjs.flatConfig.recommended` for Next.js v15 supports.
14
+ // `nextjs.configs.recommended` for Next.js v16 support
15
+ // See https://github.com/vercel/next.js/pull/83763 for the breaking change details
16
+ // TODO Migrate to Next.js 16+ so we can remove `nextjs.flatConfig`.
17
+ const recommendedConfig = nextjs.flatConfig
18
+ ? nextjsAlias.flatConfig.recommended
19
+ : nextjsAlias.configs.recommended;
20
+
21
+ return defineConfig(recommendedConfig, {
9
22
  settings: {
10
23
  next: {
11
24
  rootDir: 'docs',
@@ -144,9 +144,16 @@ export default async function extractErrorCodes(args) {
144
144
  Object.entries(existingErrorCodes).map(([key, value]) => [value, Number(key)]),
145
145
  );
146
146
  const originalErrorCount = inverseLookupCode.size;
147
+ let newErrorCodeStart = Math.max(...Array.from(inverseLookupCode.values()));
148
+ if (newErrorCodeStart !== originalErrorCount) {
149
+ console.warn(
150
+ `⚠️ Warning: Detected a gap in the error codes. Current max code is ${newErrorCodeStart}, but there are only ${originalErrorCount} existing codes.\nThis can happen when codes have been removed. New codes will continue from the highest existing code.`,
151
+ );
152
+ }
147
153
  Array.from(errors).forEach((error) => {
148
154
  if (!inverseLookupCode.has(error)) {
149
- inverseLookupCode.set(error, inverseLookupCode.size + 1);
155
+ inverseLookupCode.set(error, newErrorCodeStart + 1);
156
+ newErrorCodeStart += 1;
150
157
  }
151
158
  });
152
159
  const finalErrorCodes = Array.from(inverseLookupCode.entries()).reduce((acc, [message, code]) => {