@mui/internal-code-infra 0.0.4-canary.8 → 0.0.4-canary.81

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.
Files changed (140) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +19 -8
  3. package/build/babel-config.d.mts +5 -1
  4. package/build/brokenLinksChecker/crawlWorker.d.mts +1 -0
  5. package/build/brokenLinksChecker/index.d.mts +45 -2
  6. package/build/changelog/types.d.ts +1 -1
  7. package/build/cli/cmdArgosPush.d.mts +2 -2
  8. package/build/cli/cmdBuild.d.mts +3 -2
  9. package/build/cli/cmdCopyFiles.d.mts +2 -2
  10. package/build/cli/cmdExtractErrorCodes.d.mts +2 -2
  11. package/build/cli/cmdGenerateChangelog.d.mts +2 -2
  12. package/build/cli/cmdGithubAuth.d.mts +2 -2
  13. package/build/cli/cmdListWorkspaces.d.mts +6 -4
  14. package/build/cli/cmdNetlifyIgnore.d.mts +3 -2
  15. package/build/cli/cmdPublish.d.mts +4 -2
  16. package/build/cli/cmdPublishCanary.d.mts +3 -3
  17. package/build/cli/cmdPublishNewPackage.d.mts +4 -2
  18. package/build/cli/cmdSetVersionOverrides.d.mts +2 -2
  19. package/build/cli/cmdVale.d.mts +46 -0
  20. package/build/cli/cmdValidateBuiltTypes.d.mts +2 -2
  21. package/build/eslint/baseConfig.d.mts +3 -1
  22. package/build/eslint/mui/rules/disallow-react-api-in-server-components.d.mts +2 -2
  23. package/build/eslint/mui/rules/docgen-ignore-before-comment.d.mts +2 -2
  24. package/build/eslint/mui/rules/no-floating-cleanup.d.mts +5 -0
  25. package/build/eslint/mui/rules/no-guarded-throw.d.mts +31 -0
  26. package/build/eslint/mui/rules/no-presentation-role.d.mts +5 -0
  27. package/build/eslint/mui/rules/no-restricted-resolved-imports.d.mts +2 -2
  28. package/build/eslint/mui/rules/nodeEnvUtils.d.mts +18 -0
  29. package/build/remark/config.d.mts +43 -0
  30. package/build/remark/createLintTester.d.mts +10 -0
  31. package/build/remark/firstBlockHeading.d.mts +4 -0
  32. package/build/remark/gitDiff.d.mts +2 -0
  33. package/build/remark/noSpaceInLinks.d.mts +2 -0
  34. package/build/remark/straightQuotes.d.mts +2 -0
  35. package/build/remark/tableAlignment.d.mts +2 -0
  36. package/build/remark/terminalLanguage.d.mts +2 -0
  37. package/build/utils/babel.d.mts +1 -1
  38. package/build/utils/build.d.mts +56 -37
  39. package/build/utils/git.d.mts +7 -0
  40. package/build/utils/github.d.mts +1 -1
  41. package/build/utils/pnpm.d.mts +81 -2
  42. package/build/utils/testUtils.d.mts +7 -0
  43. package/build/utils/typescript.d.mts +6 -16
  44. package/package.json +66 -42
  45. package/src/babel-config.mjs +3 -1
  46. package/src/brokenLinksChecker/crawlWorker.mjs +240 -0
  47. package/src/brokenLinksChecker/index.mjs +263 -188
  48. package/src/changelog/fetchChangelogs.mjs +6 -2
  49. package/src/changelog/renderChangelog.mjs +1 -1
  50. package/src/changelog/types.ts +1 -1
  51. package/src/cli/cmdBuild.mjs +51 -85
  52. package/src/cli/cmdListWorkspaces.mjs +12 -27
  53. package/src/cli/cmdNetlifyIgnore.mjs +34 -93
  54. package/src/cli/cmdPublish.mjs +95 -20
  55. package/src/cli/cmdPublishCanary.mjs +128 -132
  56. package/src/cli/cmdPublishNewPackage.mjs +27 -6
  57. package/src/cli/cmdSetVersionOverrides.mjs +8 -9
  58. package/src/cli/cmdVale.mjs +513 -0
  59. package/src/cli/index.mjs +2 -0
  60. package/src/cli/packageJson.d.ts +1 -1
  61. package/src/eslint/baseConfig.mjs +51 -19
  62. package/src/eslint/docsConfig.mjs +2 -1
  63. package/src/eslint/mui/config.mjs +24 -4
  64. package/src/eslint/mui/index.mjs +6 -0
  65. package/src/eslint/mui/rules/no-floating-cleanup.mjs +187 -0
  66. package/src/eslint/mui/rules/no-guarded-throw.mjs +115 -0
  67. package/src/eslint/mui/rules/no-presentation-role.mjs +60 -0
  68. package/src/eslint/mui/rules/nodeEnvUtils.mjs +52 -0
  69. package/src/eslint/mui/rules/require-dev-wrapper.mjs +25 -40
  70. package/src/estree-typescript.d.ts +1 -1
  71. package/src/remark/config.mjs +157 -0
  72. package/src/remark/createLintTester.mjs +19 -0
  73. package/src/remark/firstBlockHeading.mjs +87 -0
  74. package/src/remark/gitDiff.mjs +43 -0
  75. package/src/remark/noSpaceInLinks.mjs +42 -0
  76. package/src/remark/straightQuotes.mjs +31 -0
  77. package/src/remark/tableAlignment.mjs +23 -0
  78. package/src/remark/terminalLanguage.mjs +19 -0
  79. package/src/untyped-plugins.d.ts +11 -11
  80. package/src/utils/build.mjs +604 -270
  81. package/src/utils/git.mjs +27 -7
  82. package/src/utils/pnpm.mjs +277 -10
  83. package/src/utils/testUtils.mjs +18 -0
  84. package/src/utils/typescript.mjs +23 -42
  85. package/vale/.vale.ini +1 -0
  86. package/vale/styles/MUI/CorrectReferenceAllCases.yml +42 -0
  87. package/vale/styles/MUI/CorrectRererenceCased.yml +14 -0
  88. package/vale/styles/MUI/GoogleLatin.yml +11 -0
  89. package/vale/styles/MUI/MuiBrandName.yml +22 -0
  90. package/vale/styles/MUI/NoBritish.yml +112 -0
  91. package/vale/styles/MUI/NoCompanyName.yml +17 -0
  92. package/build/markdownlint/duplicate-h1.d.mts +0 -56
  93. package/build/markdownlint/git-diff.d.mts +0 -11
  94. package/build/markdownlint/index.d.mts +0 -52
  95. package/build/markdownlint/straight-quotes.d.mts +0 -11
  96. package/build/markdownlint/table-alignment.d.mts +0 -11
  97. package/build/markdownlint/terminal-language.d.mts +0 -11
  98. package/src/brokenLinksChecker/__fixtures__/static-site/broken-links.html +0 -20
  99. package/src/brokenLinksChecker/__fixtures__/static-site/broken-targets.html +0 -22
  100. package/src/brokenLinksChecker/__fixtures__/static-site/example.md +0 -20
  101. package/src/brokenLinksChecker/__fixtures__/static-site/external-links.html +0 -21
  102. package/src/brokenLinksChecker/__fixtures__/static-site/ignored-page.html +0 -17
  103. package/src/brokenLinksChecker/__fixtures__/static-site/index.html +0 -28
  104. package/src/brokenLinksChecker/__fixtures__/static-site/known-targets.json +0 -5
  105. package/src/brokenLinksChecker/__fixtures__/static-site/nested/page.html +0 -21
  106. package/src/brokenLinksChecker/__fixtures__/static-site/orphaned-page.html +0 -20
  107. package/src/brokenLinksChecker/__fixtures__/static-site/page-with-api-links.html +0 -20
  108. package/src/brokenLinksChecker/__fixtures__/static-site/page-with-custom-targets.html +0 -24
  109. package/src/brokenLinksChecker/__fixtures__/static-site/page-with-ignored-content.html +0 -28
  110. package/src/brokenLinksChecker/__fixtures__/static-site/page-with-known-target-links.html +0 -19
  111. package/src/brokenLinksChecker/__fixtures__/static-site/unclosed-tags.html +0 -1
  112. package/src/brokenLinksChecker/__fixtures__/static-site/valid.html +0 -20
  113. package/src/brokenLinksChecker/__fixtures__/static-site/with-anchors.html +0 -31
  114. package/src/brokenLinksChecker/index.test.ts +0 -261
  115. package/src/changelog/categorizeCommits.test.ts +0 -319
  116. package/src/changelog/filterCommits.test.ts +0 -363
  117. package/src/changelog/parseCommitLabels.test.ts +0 -509
  118. package/src/changelog/renderChangelog.test.ts +0 -378
  119. package/src/changelog/sortSections.test.ts +0 -199
  120. package/src/eslint/mui/rules/add-undef-to-optional.test.mjs +0 -361
  121. package/src/eslint/mui/rules/consistent-production-guard.test.mjs +0 -162
  122. package/src/eslint/mui/rules/disallow-active-elements-as-key-event-target.test.mjs +0 -66
  123. package/src/eslint/mui/rules/disallow-react-api-in-server-components.test.mjs +0 -305
  124. package/src/eslint/mui/rules/docgen-ignore-before-comment.test.mjs +0 -52
  125. package/src/eslint/mui/rules/flatten-parentheses.test.mjs +0 -245
  126. package/src/eslint/mui/rules/mui-name-matches-component-name.test.mjs +0 -247
  127. package/src/eslint/mui/rules/no-empty-box.test.mjs +0 -40
  128. package/src/eslint/mui/rules/no-styled-box.test.mjs +0 -73
  129. package/src/eslint/mui/rules/require-dev-wrapper.test.mjs +0 -265
  130. package/src/eslint/mui/rules/rules-of-use-theme-variants.test.mjs +0 -149
  131. package/src/eslint/mui/rules/straight-quotes.test.mjs +0 -67
  132. package/src/markdownlint/duplicate-h1.mjs +0 -69
  133. package/src/markdownlint/git-diff.mjs +0 -31
  134. package/src/markdownlint/index.mjs +0 -62
  135. package/src/markdownlint/straight-quotes.mjs +0 -26
  136. package/src/markdownlint/table-alignment.mjs +0 -42
  137. package/src/markdownlint/terminal-language.mjs +0 -19
  138. package/src/utils/build.test.mjs +0 -705
  139. package/src/utils/template.test.mjs +0 -133
  140. package/src/utils/typescript.test.mjs +0 -380
@@ -1,62 +1,82 @@
1
1
  export type BundleType = 'esm' | 'cjs';
2
- /**
3
- * @typedef {'esm' | 'cjs'} BundleType
4
- */
2
+ export type BundleMeta = {
3
+ type: BundleType;
4
+ dir: string;
5
+ condition: 'import' | 'require';
6
+ outExtension: string;
7
+ typeOutExtension: string;
8
+ };
9
+ export declare const BASE_IGNORES: string[];
5
10
  /**
6
11
  * @param {BundleType} bundle
7
12
  * @param {Object} [options]
8
13
  * @param {boolean} [options.isType=false] - Whether to get the extension for type declaration files.
9
- * @param {boolean} [options.isFlat=false] - Whether to get the extension for a flat build structure.
10
14
  * @param {'module' | 'commonjs'} [options.packageType='commonjs'] - The package.json type field.
11
15
  * @returns {string}
12
16
  */
13
17
  export declare function getOutExtension(bundle: BundleType, options?: {
14
18
  isType?: boolean;
15
- isFlat?: boolean;
16
19
  packageType?: 'module' | 'commonjs';
17
20
  }): string;
18
21
  /**
19
- * @param {Object} param0
20
- * @param {import('../cli/packageJson').PackageJson['exports']} param0.exports
21
- * @param {{type: BundleType; dir: string}[]} param0.bundles
22
- * @param {string} param0.outputDir
23
- * @param {string} param0.cwd
24
- * @param {boolean} [param0.addTypes]
25
- * @param {boolean} [param0.isFlat]
26
- * @param {'module' | 'commonjs'} [param0.packageType]
22
+ * @param {import('../cli/packageJson').PackageJson['exports']} packageExports
23
+ * @param {Object} options
24
+ * @param {BundleType[]} options.bundles
25
+ * @param {string} options.outputDir
26
+ * @param {string} options.cwd
27
+ * @param {boolean} [options.addTypes]
28
+ * @param {boolean} [options.expand] - Whether to enumerate glob patterns into concrete entries.
29
+ * @param {'module' | 'commonjs'} [options.packageType]
27
30
  */
28
- export declare function createPackageExports({ exports: packageExports, bundles, outputDir, cwd, addTypes, isFlat, packageType }: {
29
- exports: import('../cli/packageJson').PackageJson['exports'];
30
- bundles: {
31
- type: BundleType;
32
- dir: string;
33
- }[];
31
+ export declare function createPackageExports(packageExports: import('../cli/packageJson').PackageJson['exports'], { bundles, outputDir, cwd, addTypes, expand, packageType }: {
32
+ bundles: BundleType[];
34
33
  outputDir: string;
35
34
  cwd: string;
36
35
  addTypes?: boolean;
37
- isFlat?: boolean;
36
+ expand?: boolean;
38
37
  packageType?: 'module' | 'commonjs';
39
38
  }): Promise<{
40
- main?: string | undefined;
41
- types?: string | undefined;
42
- exports: import("../cli/packageJson").PackageJson.ExportConditions;
39
+ main?: string;
40
+ types?: string;
41
+ exports: import('../cli/packageJson').PackageJson.ExportConditions;
43
42
  }>;
44
43
  /**
45
- * @param {Object} param0
46
- * @param {import('../cli/packageJson').PackageJson['bin']} param0.bin
47
- * @param {{type: BundleType; dir: string}[]} param0.bundles
48
- * @param {string} param0.cwd
49
- * @param {boolean} [param0.isFlat]
50
- * @param {'module' | 'commonjs'} [param0.packageType]
44
+ * Generates the package.json `imports` field for the built package, rewriting
45
+ * internal subpath imports (keys starting with `#`) that point at source files
46
+ * into their built equivalents with `import`/`require`/`types` conditions.
47
+ *
48
+ * Mirrors {@link createPackageExports} but without the `.` / `package.json` /
49
+ * `main` / `types` index handling that only applies to public exports. Entries
50
+ * that resolve to bare specifiers (e.g. an external package) are passed through
51
+ * unchanged, since the `imports` field commonly aliases dependencies.
52
+ * @param {import('../cli/packageJson').PackageJson['imports']} packageImports
53
+ * @param {Object} options
54
+ * @param {BundleType[]} options.bundles
55
+ * @param {string} options.cwd
56
+ * @param {string} [options.outputDir] - Used to verify non-source passthrough paths exist in the build output.
57
+ * @param {boolean} [options.addTypes]
58
+ * @param {boolean} [options.expand] - Whether to enumerate glob patterns into concrete entries.
59
+ * @param {'module' | 'commonjs'} [options.packageType]
60
+ * @returns {Promise<import('../cli/packageJson').PackageJson.Imports | undefined>}
61
+ */
62
+ export declare function createPackageImports(packageImports: import('../cli/packageJson').PackageJson['imports'], { bundles, cwd, outputDir, addTypes, expand, packageType }: {
63
+ bundles: BundleType[];
64
+ cwd: string;
65
+ outputDir?: string;
66
+ addTypes?: boolean;
67
+ expand?: boolean;
68
+ packageType?: 'module' | 'commonjs';
69
+ }): Promise<import('../cli/packageJson').PackageJson.Imports | undefined>;
70
+ /**
71
+ * @param {import('../cli/packageJson').PackageJson['bin']} bin
72
+ * @param {Object} options
73
+ * @param {BundleType[]} options.bundles
74
+ * @param {string} options.cwd
75
+ * @param {'module' | 'commonjs'} [options.packageType]
51
76
  */
52
- export declare function createPackageBin({ bin, bundles, cwd, isFlat, packageType }: {
53
- bin: import('../cli/packageJson').PackageJson['bin'];
54
- bundles: {
55
- type: BundleType;
56
- dir: string;
57
- }[];
77
+ export declare function createPackageBin(bin: import('../cli/packageJson').PackageJson['bin'], { bundles, cwd, packageType }: {
78
+ bundles: BundleType[];
58
79
  cwd: string;
59
- isFlat?: boolean;
60
80
  packageType?: 'module' | 'commonjs';
61
81
  }): Promise<string | Record<string, string> | undefined>;
62
82
  /**
@@ -84,7 +104,6 @@ export declare function markFn<F extends () => Promise<any>>(label: string, fn:
84
104
  * @param {string} label
85
105
  */
86
106
  export declare function measureFn(label: string): PerformanceMeasure;
87
- export declare const BASE_IGNORES: string[];
88
107
  /**
89
108
  * A utility to map a function over an array of items in a worker pool.
90
109
  *
@@ -20,3 +20,10 @@ export declare function getRepositoryInfo(cwd?: string): Promise<RepoInfo>;
20
20
  * @returns {Promise<string>} Current git commit SHA
21
21
  */
22
22
  export declare function getCurrentGitSha(): Promise<string>;
23
+ /**
24
+ * Check whether a tag already exists on the origin remote
25
+ * @param {string} tagName - Tag name to check (e.g. `v1.2.3`)
26
+ * @param {string} [cwd=process.cwd()]
27
+ * @returns {Promise<boolean>} True if the tag exists on origin
28
+ */
29
+ export declare function remoteGitTagExists(tagName: string, cwd?: string): Promise<boolean>;
@@ -20,7 +20,7 @@ export type GitHubAppAuthenticationWithRefreshToken = {
20
20
  * @property {string} [refreshTokenExpiresAt] - ISO string when the refresh token expires
21
21
  */
22
22
  export declare function persistentAuthStrategy(): {
23
- hook: (request: import("@octokit/types").RequestInterface<object>, route: string, parameters: import("@octokit/types").RequestParameters) => Promise<import("@octokit/types").OctokitResponse<any, number>>;
23
+ hook: (request: import('@octokit/types').RequestInterface, route: import('@octokit/types').Route, parameters: import('@octokit/types').RequestParameters) => Promise<import("@octokit/types").OctokitResponse<any, number>>;
24
24
  };
25
25
  /**
26
26
  * @param {Object} [options]
@@ -31,6 +31,7 @@ export type GetWorkspacePackagesOptions = {
31
31
  publicOnly?: boolean;
32
32
  nonPublishedOnly?: boolean;
33
33
  cwd?: string;
34
+ filter?: string[];
34
35
  };
35
36
  export declare function getWorkspacePackages(options?: {
36
37
  publicOnly: true;
@@ -49,13 +50,78 @@ export declare function getWorkspacePackages(options?: GetWorkspacePackagesOptio
49
50
  * @returns {Promise<VersionInfo>} Version information
50
51
  */
51
52
  export declare function getPackageVersionInfo(packageName: string, baseVersion: string): Promise<VersionInfo>;
53
+ export type PublishSummaryEntry = {
54
+ name: string;
55
+ version: string;
56
+ };
57
+ /**
58
+ * @typedef {Object} PublishSummaryEntry
59
+ * @property {string} name
60
+ * @property {string} version
61
+ */
52
62
  /**
53
63
  * Publish packages with the given options
54
64
  * @param {PublicPackage[]} packages - Packages to publish
55
65
  * @param {PublishOptions} [options={}] - Publishing options
56
- * @returns {Promise<void>}
66
+ * @returns {Promise<PublishSummaryEntry[]>}
67
+ */
68
+ export declare function publishPackages(packages: PublicPackage[], options?: PublishOptions): Promise<PublishSummaryEntry[]>;
69
+ export type GetTransitiveDependenciesOptions = {
70
+ workspacePathByName?: Map<string, string>;
71
+ includeDev?: boolean;
72
+ };
73
+ /**
74
+ * @typedef {Object} GetTransitiveDependenciesOptions
75
+ * @property {Map<string, string>} [workspacePathByName] - Map of workspace package name to directory path
76
+ * @property {boolean} [includeDev=true] - Whether to include devDependencies in the traversal
57
77
  */
58
- export declare function publishPackages(packages: PublicPackage[], options?: PublishOptions): Promise<void>;
78
+ /**
79
+ * Get all transitive workspace dependencies for a set of packages.
80
+ *
81
+ * Only follows deps whose version spec starts with `workspace:` (e.g. `workspace:*`
82
+ * or `workspace:^`), meaning they are sourced directly from the monorepo. Pinned
83
+ * external versions (e.g. `^1.0.0`) are ignored even when the package name exists
84
+ * in the workspace. Traverses `dependencies` and optionally `devDependencies`.
85
+ * Results are cached per package so each package is read from disk at most once
86
+ * regardless of how many roots depend on it.
87
+ *
88
+ * @param {string[]} packageNames - Package names to start the traversal from
89
+ * @param {GetTransitiveDependenciesOptions} [options]
90
+ * @returns {Promise<Set<string>>} All reachable workspace package names, including the input packages themselves
91
+ */
92
+ export declare function getTransitiveDependencies(packageNames: string[], options?: GetTransitiveDependenciesOptions): Promise<Set<string>>;
93
+ /**
94
+ * Pure validation logic: given a publish set and workspace maps, checks that all
95
+ * transitive hard workspace dependencies are covered and none are private.
96
+ *
97
+ * A hard dependency is one listed in `dependencies` (not `peerDependencies` or
98
+ * `devDependencies`) using a `workspace:` version specifier (e.g. `workspace:*` or
99
+ * `workspace:^`). Peer dependencies are never bundled and dev dependencies are not installed
100
+ * on consumer devices - both are excluded regardless of version specifier. Pinned-version
101
+ * references in `dependencies` are also excluded - they resolve from the registry and do
102
+ * not need to be co-published.
103
+ *
104
+ * @param {PublicPackage[]} packages - The packages intended for publishing
105
+ * @param {Map<string, PublicPackage | PrivatePackage>} workspacePackageByName - All workspace packages by name
106
+ * @param {Map<string, string>} workspacePathByName - Map of workspace package name to directory path
107
+ * @returns {Promise<{issues: string[]}>}
108
+ * List of human-readable issue strings. Empty when the dependency set is valid.
109
+ * @internal
110
+ */
111
+ export declare function checkPublishDependencies(packages: PublicPackage[], workspacePackageByName: Map<string, PublicPackage | PrivatePackage>, workspacePathByName: Map<string, string>): Promise<{
112
+ issues: string[];
113
+ }>;
114
+ /**
115
+ * Validate that a set of packages covers all of their transitive hard workspace dependencies,
116
+ * and that none of those dependencies are private (which would make them unpublishable).
117
+ *
118
+ * @param {PublicPackage[]} packages - The packages intended for publishing
119
+ * @returns {Promise<{issues: string[]}>}
120
+ * List of human-readable issue strings. Empty when the dependency set is valid.
121
+ */
122
+ export declare function validatePublishDependencies(packages: PublicPackage[]): Promise<{
123
+ issues: string[];
124
+ }>;
59
125
  /**
60
126
  * Read package.json from a directory
61
127
  * @param {string} packagePath - Path to package directory
@@ -69,6 +135,19 @@ export declare function readPackageJson(packagePath: string): Promise<import('..
69
135
  * @returns {Promise<void>}
70
136
  */
71
137
  export declare function writePackageJson(packagePath: string, packageJson: Object): Promise<void>;
138
+ /**
139
+ * Write the computed overrides into whichever manifest already defines
140
+ * overrides — preferring pnpm-workspace.yaml, falling back to package.json
141
+ * `pnpm.overrides`, defaulting to pnpm-workspace.yaml — and persist the result.
142
+ * A missing pnpm-workspace.yaml is treated as empty, so a fresh file is created
143
+ * with just the `overrides:` block. Rejects a `resolutions` field in
144
+ * package.json because pnpm 11 silently ignores it.
145
+ *
146
+ * @param {string} workspaceDir - Workspace root directory
147
+ * @param {Record<string, string>} overrides - Overrides to apply
148
+ * @returns {Promise<void>}
149
+ */
150
+ export declare function writeOverridesToWorkspace(workspaceDir: string, overrides: Record<string, string>): Promise<void>;
72
151
  /**
73
152
  * Resolve a package@version specifier to an exact version
74
153
  * @param {string} packageSpec - Package specifier in format "package@version"
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Creates a temporary directory and registers an `onTestFinished` hook to
3
+ * remove it automatically when the current test ends — even if the test throws.
4
+ *
5
+ * @returns {Promise<string>} The path of the created temporary directory.
6
+ */
7
+ export declare function makeTempDir(): Promise<string>;
@@ -22,19 +22,14 @@ export declare function copyDeclarations(sourceDirectory: string, destinationDir
22
22
  * @param {Object} param0
23
23
  * @param {string} param0.inputDir
24
24
  * @param {string} param0.buildDir
25
- * @param {{type: import('../utils/build.mjs').BundleType, dir: string}[]} param0.bundles
26
- * @param {boolean} [param0.isFlat]
25
+ * @param {import('../utils/build.mjs').BundleType[]} param0.bundles
27
26
  * @param {'module' | 'commonjs'} [param0.packageType]
28
27
  * @returns
29
28
  */
30
- export declare function moveAndTransformDeclarations({ inputDir, buildDir, bundles, isFlat, packageType }: {
29
+ export declare function moveAndTransformDeclarations({ inputDir, buildDir, bundles, packageType }: {
31
30
  inputDir: string;
32
31
  buildDir: string;
33
- bundles: {
34
- type: import('../utils/build.mjs').BundleType;
35
- dir: string;
36
- }[];
37
- isFlat?: boolean;
32
+ bundles: import('../utils/build.mjs').BundleType[];
38
33
  packageType?: 'module' | 'commonjs';
39
34
  }): Promise<void>;
40
35
  /**
@@ -43,9 +38,8 @@ export declare function moveAndTransformDeclarations({ inputDir, buildDir, bundl
43
38
  * After copying, babel transformations are applied to the copied files because they need to be alongside the actual js files for proper resolution.
44
39
  *
45
40
  * @param {Object} param0
46
- * @param {boolean} [param0.isFlat = false] - Whether to place generated declaration files in a flattened directory.
47
41
  * @param {boolean} [param0.verbose = false] - Whether to log additional information while generating and moving declaration files.
48
- * @param {{type: import('../utils/build.mjs').BundleType, dir: string}[]} param0.bundles - The bundles to create declarations for.
42
+ * @param {import('../utils/build.mjs').BundleType[]} param0.bundles - The bundles to create declarations for.
49
43
  * @param {string} param0.srcDir - The source directory.
50
44
  * @param {string} param0.buildDir - The build directory.
51
45
  * @param {string} param0.cwd - The current working directory.
@@ -53,13 +47,9 @@ export declare function moveAndTransformDeclarations({ inputDir, buildDir, bundl
53
47
  * @param {boolean} [param0.useTsgo=false] - Whether to build types using typescript native (tsgo).
54
48
  * @param {'module' | 'commonjs'} [param0.packageType] - The package.json type field.
55
49
  */
56
- export declare function createTypes({ bundles, srcDir, buildDir, cwd, skipTsc, useTsgo, isFlat, packageType, verbose }: {
57
- isFlat?: boolean;
50
+ export declare function createTypes({ bundles, srcDir, buildDir, cwd, skipTsc, useTsgo, packageType, verbose, }: {
58
51
  verbose?: boolean;
59
- bundles: {
60
- type: import('../utils/build.mjs').BundleType;
61
- dir: string;
62
- }[];
52
+ bundles: import('../utils/build.mjs').BundleType[];
63
53
  srcDir: string;
64
54
  buildDir: string;
65
55
  cwd: string;
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@mui/internal-code-infra",
3
- "version": "0.0.4-canary.8",
3
+ "version": "0.0.4-canary.81",
4
+ "author": "MUI Team",
4
5
  "description": "Infra scripts and configs to be used across MUI repos.",
5
- "type": "module",
6
6
  "license": "MIT",
7
+ "type": "module",
7
8
  "repository": {
8
9
  "type": "git",
9
10
  "url": "git+https://github.com/mui/mui-public.git",
@@ -28,9 +29,9 @@
28
29
  "types": "./build/utils/github.d.mts",
29
30
  "default": "./src/utils/github.mjs"
30
31
  },
31
- "./markdownlint": {
32
- "types": "./build/markdownlint/index.d.mts",
33
- "default": "./src/markdownlint/index.mjs"
32
+ "./remark": {
33
+ "types": "./build/remark/config.d.mts",
34
+ "default": "./src/remark/config.mjs"
34
35
  },
35
36
  "./prettier": {
36
37
  "types": "./build/prettier.d.mts",
@@ -52,28 +53,28 @@
52
53
  "code-infra": "./bin/code-infra.mjs"
53
54
  },
54
55
  "dependencies": {
55
- "@argos-ci/core": "^5.1.1",
56
+ "@argos-ci/core": "^6.0.0",
56
57
  "@babel/cli": "^7.28.6",
57
58
  "@babel/core": "^7.29.0",
58
59
  "@babel/plugin-syntax-jsx": "^7.28.6",
59
60
  "@babel/plugin-syntax-typescript": "^7.28.6",
60
61
  "@babel/plugin-transform-runtime": "^7.29.0",
61
- "@babel/preset-env": "^7.29.0",
62
+ "@babel/preset-env": "^7.29.5",
62
63
  "@babel/preset-react": "^7.28.5",
63
64
  "@babel/preset-typescript": "^7.28.5",
64
- "@eslint/compat": "^2.0.3",
65
+ "@eslint/compat": "^2.1.0",
65
66
  "@eslint/js": "^10.0.1",
66
- "@eslint/json": "^1.1.0",
67
- "@inquirer/confirm": "^6.0.8",
68
- "@inquirer/select": "^5.1.0",
69
- "@napi-rs/keyring": "^1.2.0",
67
+ "@eslint/json": "^1.2.0",
68
+ "@inquirer/confirm": "^6.0.13",
69
+ "@inquirer/select": "^5.1.5",
70
+ "@napi-rs/keyring": "^1.3.0",
70
71
  "@octokit/auth-action": "^6.0.2",
71
72
  "@octokit/oauth-methods": "^6.0.2",
72
73
  "@octokit/rest": "^22.0.1",
73
- "@pnpm/find-workspace-dir": "^1000.1.4",
74
- "@typescript-eslint/types": "^8.57.0",
75
- "@typescript-eslint/utils": "^8.57.0",
76
- "@vitest/eslint-plugin": "^1.6.11",
74
+ "@pnpm/find-workspace-dir": "^1000.1.5",
75
+ "@typescript-eslint/types": "^8.59.3",
76
+ "@typescript-eslint/utils": "^8.59.3",
77
+ "@vitest/eslint-plugin": "^1.6.17",
77
78
  "babel-plugin-optimize-clsx": "^2.6.2",
78
79
  "babel-plugin-react-compiler": "^1.0.0",
79
80
  "babel-plugin-transform-import-meta": "^2.3.3",
@@ -82,50 +83,68 @@
82
83
  "babel-plugin-transform-remove-imports": "^1.8.1",
83
84
  "chalk": "^5.6.2",
84
85
  "clipboardy": "^5.3.1",
85
- "content-type": "^1.0.5",
86
+ "content-type": "^2.0.0",
86
87
  "env-ci": "^11.2.0",
88
+ "es-toolkit": "^1.49.0",
87
89
  "eslint-config-prettier": "^10.1.8",
88
90
  "eslint-import-resolver-typescript": "^4.4.4",
89
- "eslint-module-utils": "^2.12.1",
90
- "eslint-plugin-compat": "^7.0.1",
91
+ "eslint-module-utils": "^2.13.0",
92
+ "eslint-plugin-compat": "^7.0.2",
91
93
  "eslint-plugin-import": "^2.32.0",
92
94
  "eslint-plugin-jsx-a11y": "^6.10.2",
95
+ "eslint-plugin-mdx": "^3.7.0",
93
96
  "eslint-plugin-mocha": "^11.2.0",
94
97
  "eslint-plugin-react": "^7.37.5",
95
98
  "eslint-plugin-react-compiler": "^19.1.0-rc.2",
96
- "eslint-plugin-react-hooks": "^7.0.1",
97
- "eslint-plugin-testing-library": "^7.16.0",
98
- "es-toolkit": "^1.45.1",
99
+ "eslint-plugin-react-hooks": "^7.1.1",
100
+ "eslint-plugin-testing-library": "^7.16.2",
99
101
  "execa": "^9.6.1",
100
102
  "git-url-parse": "^16.1.0",
101
- "globals": "^17.4.0",
102
- "globby": "^16.1.1",
103
- "minimatch": "^10.2.4",
104
- "node-html-parser": "^7.1.0",
103
+ "globals": "^17.7.0",
104
+ "globby": "^16.2.0",
105
+ "html-validate": "^10.17.0",
106
+ "minimatch": "^10.2.5",
107
+ "node-html-parser": "^8.0.4",
105
108
  "open": "^11.0.0",
106
109
  "postcss-styled-syntax": "^0.7.1",
107
110
  "regexp.escape": "^2.0.1",
108
111
  "rehype-slug": "^6.0.0",
109
112
  "rehype-stringify": "^10.0.1",
113
+ "remark-frontmatter": "^5.0.0",
110
114
  "remark-gfm": "^4.0.1",
115
+ "remark-lint": "^10.0.1",
116
+ "remark-lint-code-block-style": "^4.0.1",
117
+ "remark-lint-fenced-code-flag": "^4.2.0",
118
+ "remark-lint-heading-increment": "^4.0.1",
119
+ "remark-lint-heading-style": "^4.0.1",
120
+ "remark-lint-no-duplicate-headings": "^4.0.1",
121
+ "remark-lint-no-empty-url": "^4.0.1",
122
+ "remark-lint-no-heading-punctuation": "^4.0.1",
123
+ "remark-lint-no-multiple-toplevel-headings": "^4.0.1",
124
+ "remark-lint-no-undefined-references": "^5.0.2",
125
+ "remark-lint-no-unused-definitions": "^4.0.2",
126
+ "remark-lint-table-pipes": "^5.0.1",
111
127
  "remark-parse": "^11.0.0",
112
128
  "remark-rehype": "^11.1.2",
113
129
  "resolve-pkg-maps": "^1.0.0",
114
- "semver": "^7.7.4",
130
+ "semver": "^7.8.0",
115
131
  "stylelint-config-standard": "^40.0.0",
116
- "typescript-eslint": "^8.57.0",
132
+ "typescript-eslint": "^8.59.3",
117
133
  "unified": "^11.0.5",
134
+ "unified-lint-rule": "^3.0.1",
135
+ "unist-util-visit": "^5.1.0",
136
+ "yaml": "^2.9.0",
118
137
  "yargs": "^18.0.0",
119
- "@mui/internal-babel-plugin-display-name": "1.0.4-canary.14",
120
- "@mui/internal-babel-plugin-resolve-imports": "2.0.7-canary.33",
121
- "@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.24"
138
+ "@mui/internal-babel-plugin-display-name": "1.0.4-canary.21",
139
+ "@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.28",
140
+ "@mui/internal-babel-plugin-resolve-imports": "2.0.7-canary.38"
122
141
  },
123
142
  "peerDependencies": {
124
143
  "@next/eslint-plugin-next": "*",
125
144
  "@typescript/native-preview": ">=7.0.0-dev.0",
126
145
  "eslint": "^9.0.0 || ^10.0.0",
127
146
  "prettier": "^3.0.0",
128
- "typescript": "^5.0.0"
147
+ "typescript": "^5.0.0 || ^6.0.0"
129
148
  },
130
149
  "peerDependenciesMeta": {
131
150
  "@typescript/native-preview": {
@@ -139,32 +158,37 @@
139
158
  "@octokit/types": "16.0.0",
140
159
  "@types/babel__core": "7.20.5",
141
160
  "@types/babel__preset-env": "7.10.0",
142
- "@types/content-type": "1.1.9",
143
161
  "@types/env-ci": "3.1.4",
144
162
  "@types/eslint-plugin-jsx-a11y": "6.10.1",
145
- "@types/estree": "1.0.8",
163
+ "@types/estree": "1.0.9",
146
164
  "@types/estree-jsx": "1.0.5",
165
+ "@types/mdast": "4.0.4",
147
166
  "@types/regexp.escape": "2.0.0",
148
167
  "@types/yargs": "17.0.35",
149
- "@typescript-eslint/parser": "8.57.0",
150
- "@typescript-eslint/rule-tester": "8.57.0",
151
- "eslint": "10.0.3",
152
- "get-port": "7.1.0",
153
- "prettier": "3.8.1",
168
+ "@typescript-eslint/parser": "8.59.3",
169
+ "@typescript-eslint/rule-tester": "8.59.4",
170
+ "eslint": "10.4.0",
171
+ "get-port": "7.2.0",
172
+ "prettier": "3.8.3",
173
+ "remark": "15.0.1",
174
+ "remark-mdx": "3.1.1",
154
175
  "serve": "14.2.6",
155
- "typescript-eslint": "8.57.0"
176
+ "typescript-eslint": "8.59.3"
156
177
  },
157
178
  "files": [
158
179
  "bin",
159
180
  "build",
160
181
  "src",
182
+ "vale",
161
183
  "README.md",
162
- "LICENSE"
184
+ "LICENSE",
185
+ "!src/**/__fixtures__/**",
186
+ "!src/**/*.test.*"
163
187
  ],
164
188
  "publishConfig": {
165
189
  "access": "public"
166
190
  },
167
- "gitSha": "c74ccaf59b03596a384bffd60cf3588965a258da",
191
+ "gitSha": "e0ced763c41115813b44793a91ed3a66bd971dff",
168
192
  "scripts": {
169
193
  "build": "tsgo -p tsconfig.build.json",
170
194
  "typescript": "tsgo -noEmit",
@@ -25,6 +25,7 @@ import pluginRemovePropTypes from 'babel-plugin-transform-react-remove-prop-type
25
25
  * @param {string} param0.runtimeVersion
26
26
  * @param {string} [param0.reactCompilerReactVersion]
27
27
  * @param {ReactCompilationMode} [param0.reactCompilerMode]
28
+ * @param {{ allowedCallees?: Record<string, string[]> }} [param0.displayName] - Options for the display name plugin.
28
29
  * @returns {import('@babel/core').TransformOptions} The base Babel configuration.
29
30
  */
30
31
  export function getBaseConfig({
@@ -37,6 +38,7 @@ export function getBaseConfig({
37
38
  outExtension,
38
39
  reactCompilerReactVersion,
39
40
  reactCompilerMode,
41
+ displayName,
40
42
  }) {
41
43
  /**
42
44
  * @type {import('@babel/preset-env').Options}
@@ -61,7 +63,7 @@ export function getBaseConfig({
61
63
  },
62
64
  '@babel/plugin-transform-runtime',
63
65
  ],
64
- [pluginDisplayName, {}, '@mui/internal-babel-plugin-display-name'],
66
+ [pluginDisplayName, { ...displayName }, '@mui/internal-babel-plugin-display-name'],
65
67
  [
66
68
  pluginTransformInlineEnvVars,
67
69
  {