@mui/internal-code-infra 0.0.3-canary.20 → 0.0.3-canary.22

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.20",
3
+ "version": "0.0.3-canary.22",
4
4
  "description": "Infra scripts and configs to be used across MUI repos.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -31,9 +31,9 @@
31
31
  "@babel/preset-env": "^7.28.3",
32
32
  "@babel/preset-react": "^7.27.1",
33
33
  "@babel/preset-typescript": "^7.27.1",
34
- "@eslint/compat": "^1.3.2",
34
+ "@eslint/compat": "^1.4.0",
35
35
  "@eslint/js": "^9.36.0",
36
- "@next/eslint-plugin-next": "^15.5.3",
36
+ "@next/eslint-plugin-next": "^15.5.4",
37
37
  "@octokit/auth-action": "^6.0.1",
38
38
  "@octokit/rest": "^22.0.0",
39
39
  "@pnpm/find-workspace-dir": "^1000.1.3",
@@ -47,11 +47,11 @@
47
47
  "eslint-module-utils": "^2.12.1",
48
48
  "eslint-plugin-import": "^2.32.0",
49
49
  "eslint-plugin-jsx-a11y": "^6.10.2",
50
- "eslint-plugin-mocha": "^11.1.0",
50
+ "eslint-plugin-mocha": "^11.2.0",
51
51
  "eslint-plugin-react": "^7.37.5",
52
52
  "eslint-plugin-react-compiler": "^19.1.0-rc.2",
53
- "eslint-plugin-react-hooks": "^6.0.0-rc1",
54
- "eslint-plugin-testing-library": "^7.10.0",
53
+ "eslint-plugin-react-hooks": "^6.1.0",
54
+ "eslint-plugin-testing-library": "^7.11.0",
55
55
  "execa": "^9.6.0",
56
56
  "git-url-parse": "^16.1.0",
57
57
  "globals": "^16.4.0",
@@ -62,11 +62,11 @@
62
62
  "resolve-pkg-maps": "^1.0.0",
63
63
  "semver": "^7.7.2",
64
64
  "stylelint-config-standard": "^39.0.0",
65
- "typescript-eslint": "^8.44.1",
65
+ "typescript-eslint": "^8.45.0",
66
66
  "yargs": "^18.0.0",
67
- "@mui/internal-babel-plugin-resolve-imports": "2.0.7-canary.23",
68
67
  "@mui/internal-babel-plugin-display-name": "1.0.4-canary.7",
69
- "@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.10"
68
+ "@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.10",
69
+ "@mui/internal-babel-plugin-resolve-imports": "2.0.7-canary.23"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "eslint": "^9.0.0",
@@ -81,11 +81,11 @@
81
81
  "@types/estree-jsx": "^1.0.5",
82
82
  "@types/regexp.escape": "^2.0.0",
83
83
  "@types/yargs": "^17.0.33",
84
- "@typescript-eslint/parser": "^8.44.1",
85
- "@typescript-eslint/rule-tester": "^8.44.1",
84
+ "@typescript-eslint/parser": "^8.45.0",
85
+ "@typescript-eslint/rule-tester": "^8.45.0",
86
86
  "eslint": "^9.36.0",
87
87
  "prettier": "^3.6.2",
88
- "typescript-eslint": "^8.44.1"
88
+ "typescript-eslint": "^8.45.0"
89
89
  },
90
90
  "files": [
91
91
  "bin",
@@ -97,7 +97,7 @@
97
97
  "publishConfig": {
98
98
  "access": "public"
99
99
  },
100
- "gitSha": "8ad4cd1aec96d0977bb91fd233e4fd7cd3ebd298",
100
+ "gitSha": "c9aa90f8db91be7b891ec34dab91937ebf8bb175",
101
101
  "scripts": {
102
102
  "typescript": "tsc -p tsconfig.json",
103
103
  "test": "pnpm -w test --project @mui/internal-code-infra",
@@ -63,8 +63,11 @@ export default /** @type {import('yargs').CommandModule<{}, Args>} */ ({
63
63
  const screenshots = await globby(`${folder}/**/*`, {
64
64
  onlyFiles: true,
65
65
  });
66
+ const threshold = process.env.ARGOS_THRESHOLD ? parseFloat(process.env.ARGOS_THRESHOLD) : 0.5;
66
67
 
67
- console.log(`Found ${screenshots.length} screenshots.`);
68
+ console.log(
69
+ `Found ${screenshots.length} screenshots. Uploading with threshold ${threshold}.`,
70
+ );
68
71
  if (verbose) {
69
72
  console.log('Screenshots found:');
70
73
  screenshots.forEach((screenshot) => {
@@ -99,14 +102,22 @@ export default /** @type {import('yargs').CommandModule<{}, Args>} */ ({
99
102
  commit: circleSha1,
100
103
  branch: circleBranch,
101
104
  token: argosToken,
105
+ threshold,
102
106
  parallel: {
103
107
  total: batches.length,
104
108
  nonce: circleBuildNum,
105
109
  },
106
110
  });
107
111
 
112
+ if (verbose) {
113
+ console.log('Screenshots uploaded:');
114
+ for (const screenshot of result.screenshots) {
115
+ console.log(`- ${screenshot.name}. Threshold: ${screenshot.threshold}.`);
116
+ }
117
+ }
118
+
108
119
  console.log(
109
- `Batch of ${batches[i].length} screenshots uploaded. Build URL: ${result.build.url}`,
120
+ `Batch of ${batches[i].length} screenshots uploaded. Threshold: ${threshold}. Build URL: ${result.build.url}`,
110
121
  );
111
122
  }
112
123
  } finally {
@@ -6,14 +6,14 @@ import importPlugin from 'eslint-plugin-import';
6
6
  import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
7
7
  import reactPlugin from 'eslint-plugin-react';
8
8
  import { configs as reactCompilerPluginConfigs } from 'eslint-plugin-react-compiler';
9
- import { configs as reactHookConfigs } from 'eslint-plugin-react-hooks';
9
+ import reactHooks from 'eslint-plugin-react-hooks';
10
10
  import globals from 'globals';
11
11
  import * as fs from 'node:fs';
12
12
  import * as path from 'node:path';
13
13
  import * as tseslint from 'typescript-eslint';
14
-
15
14
  import { createCoreConfig } from './material-ui/config.mjs';
16
15
  import muiPlugin from './material-ui/index.mjs';
16
+
17
17
  /**
18
18
  * @param {Object} [params]
19
19
  * @param {boolean} [params.enableReactCompiler] - Whether the config is for spec files.
@@ -43,7 +43,8 @@ export function createBaseConfig(
43
43
  importPlugin.flatConfigs.react,
44
44
  jsxA11yPlugin.flatConfigs.recommended,
45
45
  reactPlugin.configs.flat.recommended,
46
- reactHookConfigs.recommended,
46
+ // @ts-expect-error Types are messed up https://github.com/facebook/react/issues/34705
47
+ reactHooks.configs['flat/recommended'],
47
48
  tseslint.configs.recommended,
48
49
  importPlugin.flatConfigs.typescript,
49
50
  enableReactCompiler ? reactCompilerPluginConfigs.recommended : {},
@@ -47,7 +47,6 @@ export const baseSpecRules = {
47
47
  export function createTestConfig(options = {}) {
48
48
  const { useMocha = true } = options;
49
49
  return defineConfig(
50
- // @ts-expect-error The types don't make sense here.
51
50
  useMocha ? mochaPlugin.configs.recommended : {},
52
51
  testingLibrary.configs['flat/dom'],
53
52
  testingLibrary.configs['flat/react'],