@mui/internal-code-infra 0.0.4-canary.7 → 0.0.4-canary.8
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/build/babel-config.d.mts +6 -2
- package/package.json +2 -2
- package/src/babel-config.mjs +6 -2
package/build/babel-config.d.mts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export type ReactCompilationMode = 'annotation' | 'syntax' | 'infer' | 'all';
|
|
2
|
+
/**
|
|
3
|
+
* @typedef {'annotation' | 'syntax' | 'infer' | 'all'} ReactCompilationMode
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* @param {Object} param0
|
|
3
7
|
* @param {boolean} [param0.debug]
|
|
@@ -8,7 +12,7 @@
|
|
|
8
12
|
* @param {string | null} param0.outExtension - Specify the output file extension.
|
|
9
13
|
* @param {string} param0.runtimeVersion
|
|
10
14
|
* @param {string} [param0.reactCompilerReactVersion]
|
|
11
|
-
* @param {
|
|
15
|
+
* @param {ReactCompilationMode} [param0.reactCompilerMode]
|
|
12
16
|
* @returns {import('@babel/core').TransformOptions} The base Babel configuration.
|
|
13
17
|
*/
|
|
14
18
|
export declare function getBaseConfig({ debug, optimizeClsx, removePropTypes, noResolveImports, bundle, runtimeVersion, outExtension, reactCompilerReactVersion, reactCompilerMode }: {
|
|
@@ -20,7 +24,7 @@ export declare function getBaseConfig({ debug, optimizeClsx, removePropTypes, no
|
|
|
20
24
|
outExtension: string | null;
|
|
21
25
|
runtimeVersion: string;
|
|
22
26
|
reactCompilerReactVersion?: string;
|
|
23
|
-
reactCompilerMode?:
|
|
27
|
+
reactCompilerMode?: ReactCompilationMode;
|
|
24
28
|
}): import('@babel/core').TransformOptions;
|
|
25
29
|
export type Options = {
|
|
26
30
|
bundle?: 'esm' | 'cjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/internal-code-infra",
|
|
3
|
-
"version": "0.0.4-canary.
|
|
3
|
+
"version": "0.0.4-canary.8",
|
|
4
4
|
"description": "Infra scripts and configs to be used across MUI repos.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"publishConfig": {
|
|
165
165
|
"access": "public"
|
|
166
166
|
},
|
|
167
|
-
"gitSha": "
|
|
167
|
+
"gitSha": "c74ccaf59b03596a384bffd60cf3588965a258da",
|
|
168
168
|
"scripts": {
|
|
169
169
|
"build": "tsgo -p tsconfig.build.json",
|
|
170
170
|
"typescript": "tsgo -noEmit",
|
package/src/babel-config.mjs
CHANGED
|
@@ -10,6 +10,10 @@ import pluginTransformImportMeta from 'babel-plugin-transform-import-meta';
|
|
|
10
10
|
import pluginTransformInlineEnvVars from 'babel-plugin-transform-inline-environment-variables';
|
|
11
11
|
import pluginRemovePropTypes from 'babel-plugin-transform-react-remove-prop-types';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* @typedef {'annotation' | 'syntax' | 'infer' | 'all'} ReactCompilationMode
|
|
15
|
+
*/
|
|
16
|
+
|
|
13
17
|
/**
|
|
14
18
|
* @param {Object} param0
|
|
15
19
|
* @param {boolean} [param0.debug]
|
|
@@ -20,7 +24,7 @@ import pluginRemovePropTypes from 'babel-plugin-transform-react-remove-prop-type
|
|
|
20
24
|
* @param {string | null} param0.outExtension - Specify the output file extension.
|
|
21
25
|
* @param {string} param0.runtimeVersion
|
|
22
26
|
* @param {string} [param0.reactCompilerReactVersion]
|
|
23
|
-
* @param {
|
|
27
|
+
* @param {ReactCompilationMode} [param0.reactCompilerMode]
|
|
24
28
|
* @returns {import('@babel/core').TransformOptions} The base Babel configuration.
|
|
25
29
|
*/
|
|
26
30
|
export function getBaseConfig({
|
|
@@ -183,6 +187,6 @@ export default function getBabelConfig(api) {
|
|
|
183
187
|
removePropTypes: process.env.MUI_REMOVE_PROP_TYPES === 'true',
|
|
184
188
|
noResolveImports,
|
|
185
189
|
reactCompilerReactVersion: process.env.MUI_REACT_COMPILER_REACT_VERSION,
|
|
186
|
-
reactCompilerMode: process.env.MUI_REACT_COMPILER_MODE,
|
|
190
|
+
reactCompilerMode: /** @type {ReactCompilationMode} */ (process.env.MUI_REACT_COMPILER_MODE),
|
|
187
191
|
});
|
|
188
192
|
}
|