@tramvai/cli 5.18.1 → 5.19.0
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/lib/api/start/utils/tips/tips.d.ts.map +1 -1
- package/lib/api/start/utils/tips/tips.js +8 -0
- package/lib/api/start/utils/tips/tips.js.map +1 -1
- package/lib/builder/webpack/tokens.d.ts +3 -0
- package/lib/builder/webpack/tokens.d.ts.map +1 -1
- package/lib/commands/analyze/command.d.ts.map +1 -1
- package/lib/commands/analyze/command.js +2 -0
- package/lib/commands/analyze/command.js.map +1 -1
- package/lib/commands/build/command.d.ts.map +1 -1
- package/lib/commands/build/command.js +2 -0
- package/lib/commands/build/command.js.map +1 -1
- package/lib/commands/start/command.d.ts.map +1 -1
- package/lib/commands/start/command.js +2 -0
- package/lib/commands/start/command.js.map +1 -1
- package/lib/commands/start-prod/command.d.ts.map +1 -1
- package/lib/commands/start-prod/command.js +2 -0
- package/lib/commands/start-prod/command.js.map +1 -1
- package/lib/di/tokens/config.d.ts +1 -0
- package/lib/di/tokens/config.d.ts.map +1 -1
- package/lib/library/babel/index.d.ts +11 -1
- package/lib/library/babel/index.d.ts.map +1 -1
- package/lib/library/babel/index.js +4 -1
- package/lib/library/babel/index.js.map +1 -1
- package/lib/library/babel/plugins/react-compiler.d.ts +13 -0
- package/lib/library/babel/plugins/react-compiler.d.ts.map +1 -0
- package/lib/library/babel/plugins/react-compiler.js +27 -0
- package/lib/library/babel/plugins/react-compiler.js.map +1 -0
- package/lib/library/typescript/index.d.ts +5 -0
- package/lib/library/typescript/index.d.ts.map +1 -1
- package/lib/library/webpack/utils/transpiler.d.ts +2 -1
- package/lib/library/webpack/utils/transpiler.d.ts.map +1 -1
- package/lib/library/webpack/utils/transpiler.js +3 -2
- package/lib/library/webpack/utils/transpiler.js.map +1 -1
- package/lib/schema/autogeneratedSchema.json +132 -15
- package/lib/typings/configEntry/cli.d.ts +15 -0
- package/lib/typings/configEntry/cli.d.ts.map +1 -1
- package/lib/utils/resolveReactVersion.d.ts +3 -0
- package/lib/utils/resolveReactVersion.d.ts.map +1 -0
- package/lib/utils/resolveReactVersion.js +11 -0
- package/lib/utils/resolveReactVersion.js.map +1 -0
- package/lib/validators/commands/checkReactCompilerDependencies.d.ts +3 -0
- package/lib/validators/commands/checkReactCompilerDependencies.d.ts.map +1 -0
- package/lib/validators/commands/checkReactCompilerDependencies.js +60 -0
- package/lib/validators/commands/checkReactCompilerDependencies.js.map +1 -0
- package/package.json +10 -2
- package/schema.json +132 -15
- package/src/api/start/utils/tips/tips.ts +9 -0
- package/src/commands/analyze/command.ts +2 -0
- package/src/commands/build/command.ts +2 -0
- package/src/commands/start/command.ts +2 -0
- package/src/commands/start-prod/command.ts +2 -0
- package/src/library/babel/index.ts +5 -0
- package/src/library/babel/plugins/react-compiler.ts +39 -0
- package/src/library/webpack/utils/transpiler.ts +5 -3
- package/src/models/config.spec.ts +4 -0
- package/src/schema/autogeneratedSchema.json +132 -15
- package/src/schema/tramvai.spec.ts +2 -0
- package/src/typings/configEntry/cli.ts +23 -0
- package/src/utils/resolveReactVersion.ts +8 -0
- package/src/validators/commands/checkReactCompilerDependencies.ts +82 -0
- package/src/validators/commands/checkSwcDependencies.ts +1 -1
|
@@ -940,6 +940,45 @@
|
|
|
940
940
|
"title": "Включает использование плагина fill-declare-action-name",
|
|
941
941
|
"default": false,
|
|
942
942
|
"type": "boolean"
|
|
943
|
+
},
|
|
944
|
+
"reactCompiler": {
|
|
945
|
+
"description": "https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts",
|
|
946
|
+
"title": "Enable React Compiler. You can pass some options, or use it with meaningful defaults.",
|
|
947
|
+
"default": false,
|
|
948
|
+
"anyOf": [
|
|
949
|
+
{
|
|
950
|
+
"type": "object",
|
|
951
|
+
"properties": {
|
|
952
|
+
"sources": {
|
|
953
|
+
"type": "array",
|
|
954
|
+
"items": {
|
|
955
|
+
"type": "string"
|
|
956
|
+
}
|
|
957
|
+
},
|
|
958
|
+
"compilationMode": {
|
|
959
|
+
"enum": [
|
|
960
|
+
"all",
|
|
961
|
+
"annotation",
|
|
962
|
+
"infer"
|
|
963
|
+
],
|
|
964
|
+
"type": "string"
|
|
965
|
+
},
|
|
966
|
+
"panicThreshold": {
|
|
967
|
+
"title": "Determines the point at which compiler should throw an error",
|
|
968
|
+
"enum": [
|
|
969
|
+
"ALL_ERRORS",
|
|
970
|
+
"CRITICAL_ERRORS",
|
|
971
|
+
"NONE"
|
|
972
|
+
],
|
|
973
|
+
"type": "string"
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
"additionalProperties": false
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"type": "boolean"
|
|
980
|
+
}
|
|
981
|
+
]
|
|
943
982
|
}
|
|
944
983
|
},
|
|
945
984
|
"additionalProperties": false
|
|
@@ -1188,23 +1227,23 @@
|
|
|
1188
1227
|
"dotAll": {
|
|
1189
1228
|
"type": "boolean"
|
|
1190
1229
|
},
|
|
1191
|
-
"__@match@
|
|
1230
|
+
"__@match@7341": {
|
|
1192
1231
|
"type": "object",
|
|
1193
1232
|
"additionalProperties": false
|
|
1194
1233
|
},
|
|
1195
|
-
"__@replace@
|
|
1234
|
+
"__@replace@7343": {
|
|
1196
1235
|
"type": "object",
|
|
1197
1236
|
"additionalProperties": false
|
|
1198
1237
|
},
|
|
1199
|
-
"__@search@
|
|
1238
|
+
"__@search@7346": {
|
|
1200
1239
|
"type": "object",
|
|
1201
1240
|
"additionalProperties": false
|
|
1202
1241
|
},
|
|
1203
|
-
"__@split@
|
|
1242
|
+
"__@split@7348": {
|
|
1204
1243
|
"type": "object",
|
|
1205
1244
|
"additionalProperties": false
|
|
1206
1245
|
},
|
|
1207
|
-
"__@matchAll@
|
|
1246
|
+
"__@matchAll@7350": {
|
|
1208
1247
|
"type": "object",
|
|
1209
1248
|
"additionalProperties": false
|
|
1210
1249
|
}
|
|
@@ -1715,6 +1754,45 @@
|
|
|
1715
1754
|
"title": "Включает использование плагина fill-declare-action-name",
|
|
1716
1755
|
"default": false,
|
|
1717
1756
|
"type": "boolean"
|
|
1757
|
+
},
|
|
1758
|
+
"reactCompiler": {
|
|
1759
|
+
"description": "https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts",
|
|
1760
|
+
"title": "Enable React Compiler. You can pass some options, or use it with meaningful defaults.",
|
|
1761
|
+
"default": false,
|
|
1762
|
+
"anyOf": [
|
|
1763
|
+
{
|
|
1764
|
+
"type": "object",
|
|
1765
|
+
"properties": {
|
|
1766
|
+
"sources": {
|
|
1767
|
+
"type": "array",
|
|
1768
|
+
"items": {
|
|
1769
|
+
"type": "string"
|
|
1770
|
+
}
|
|
1771
|
+
},
|
|
1772
|
+
"compilationMode": {
|
|
1773
|
+
"enum": [
|
|
1774
|
+
"all",
|
|
1775
|
+
"annotation",
|
|
1776
|
+
"infer"
|
|
1777
|
+
],
|
|
1778
|
+
"type": "string"
|
|
1779
|
+
},
|
|
1780
|
+
"panicThreshold": {
|
|
1781
|
+
"title": "Determines the point at which compiler should throw an error",
|
|
1782
|
+
"enum": [
|
|
1783
|
+
"ALL_ERRORS",
|
|
1784
|
+
"CRITICAL_ERRORS",
|
|
1785
|
+
"NONE"
|
|
1786
|
+
],
|
|
1787
|
+
"type": "string"
|
|
1788
|
+
}
|
|
1789
|
+
},
|
|
1790
|
+
"additionalProperties": false
|
|
1791
|
+
},
|
|
1792
|
+
{
|
|
1793
|
+
"type": "boolean"
|
|
1794
|
+
}
|
|
1795
|
+
]
|
|
1718
1796
|
}
|
|
1719
1797
|
},
|
|
1720
1798
|
"additionalProperties": false
|
|
@@ -1901,23 +1979,23 @@
|
|
|
1901
1979
|
"dotAll": {
|
|
1902
1980
|
"type": "boolean"
|
|
1903
1981
|
},
|
|
1904
|
-
"__@match@
|
|
1982
|
+
"__@match@7341": {
|
|
1905
1983
|
"type": "object",
|
|
1906
1984
|
"additionalProperties": false
|
|
1907
1985
|
},
|
|
1908
|
-
"__@replace@
|
|
1986
|
+
"__@replace@7343": {
|
|
1909
1987
|
"type": "object",
|
|
1910
1988
|
"additionalProperties": false
|
|
1911
1989
|
},
|
|
1912
|
-
"__@search@
|
|
1990
|
+
"__@search@7346": {
|
|
1913
1991
|
"type": "object",
|
|
1914
1992
|
"additionalProperties": false
|
|
1915
1993
|
},
|
|
1916
|
-
"__@split@
|
|
1994
|
+
"__@split@7348": {
|
|
1917
1995
|
"type": "object",
|
|
1918
1996
|
"additionalProperties": false
|
|
1919
1997
|
},
|
|
1920
|
-
"__@matchAll@
|
|
1998
|
+
"__@matchAll@7350": {
|
|
1921
1999
|
"type": "object",
|
|
1922
2000
|
"additionalProperties": false
|
|
1923
2001
|
}
|
|
@@ -2428,6 +2506,45 @@
|
|
|
2428
2506
|
"title": "Включает использование плагина fill-declare-action-name",
|
|
2429
2507
|
"default": false,
|
|
2430
2508
|
"type": "boolean"
|
|
2509
|
+
},
|
|
2510
|
+
"reactCompiler": {
|
|
2511
|
+
"description": "https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts",
|
|
2512
|
+
"title": "Enable React Compiler. You can pass some options, or use it with meaningful defaults.",
|
|
2513
|
+
"default": false,
|
|
2514
|
+
"anyOf": [
|
|
2515
|
+
{
|
|
2516
|
+
"type": "object",
|
|
2517
|
+
"properties": {
|
|
2518
|
+
"sources": {
|
|
2519
|
+
"type": "array",
|
|
2520
|
+
"items": {
|
|
2521
|
+
"type": "string"
|
|
2522
|
+
}
|
|
2523
|
+
},
|
|
2524
|
+
"compilationMode": {
|
|
2525
|
+
"enum": [
|
|
2526
|
+
"all",
|
|
2527
|
+
"annotation",
|
|
2528
|
+
"infer"
|
|
2529
|
+
],
|
|
2530
|
+
"type": "string"
|
|
2531
|
+
},
|
|
2532
|
+
"panicThreshold": {
|
|
2533
|
+
"title": "Determines the point at which compiler should throw an error",
|
|
2534
|
+
"enum": [
|
|
2535
|
+
"ALL_ERRORS",
|
|
2536
|
+
"CRITICAL_ERRORS",
|
|
2537
|
+
"NONE"
|
|
2538
|
+
],
|
|
2539
|
+
"type": "string"
|
|
2540
|
+
}
|
|
2541
|
+
},
|
|
2542
|
+
"additionalProperties": false
|
|
2543
|
+
},
|
|
2544
|
+
{
|
|
2545
|
+
"type": "boolean"
|
|
2546
|
+
}
|
|
2547
|
+
]
|
|
2431
2548
|
}
|
|
2432
2549
|
},
|
|
2433
2550
|
"additionalProperties": false
|
|
@@ -2614,23 +2731,23 @@
|
|
|
2614
2731
|
"dotAll": {
|
|
2615
2732
|
"type": "boolean"
|
|
2616
2733
|
},
|
|
2617
|
-
"__@match@
|
|
2734
|
+
"__@match@7341": {
|
|
2618
2735
|
"type": "object",
|
|
2619
2736
|
"additionalProperties": false
|
|
2620
2737
|
},
|
|
2621
|
-
"__@replace@
|
|
2738
|
+
"__@replace@7343": {
|
|
2622
2739
|
"type": "object",
|
|
2623
2740
|
"additionalProperties": false
|
|
2624
2741
|
},
|
|
2625
|
-
"__@search@
|
|
2742
|
+
"__@search@7346": {
|
|
2626
2743
|
"type": "object",
|
|
2627
2744
|
"additionalProperties": false
|
|
2628
2745
|
},
|
|
2629
|
-
"__@split@
|
|
2746
|
+
"__@split@7348": {
|
|
2630
2747
|
"type": "object",
|
|
2631
2748
|
"additionalProperties": false
|
|
2632
2749
|
},
|
|
2633
|
-
"__@matchAll@
|
|
2750
|
+
"__@matchAll@7350": {
|
|
2634
2751
|
"type": "object",
|
|
2635
2752
|
"additionalProperties": false
|
|
2636
2753
|
}
|
|
@@ -21,6 +21,14 @@ type Notifications = {
|
|
|
21
21
|
*/
|
|
22
22
|
activateTerminalOnError?: boolean;
|
|
23
23
|
};
|
|
24
|
+
export type ReactCompilerOptions = {
|
|
25
|
+
sources?: Array<string>;
|
|
26
|
+
compilationMode?: 'infer' | 'annotation' | 'all';
|
|
27
|
+
/**
|
|
28
|
+
* @title Determines the point at which compiler should throw an error
|
|
29
|
+
*/
|
|
30
|
+
panicThreshold?: 'ALL_ERRORS' | 'CRITICAL_ERRORS' | 'NONE';
|
|
31
|
+
};
|
|
24
32
|
export type WebpackExperiments = Omit<Configuration['experiments'], 'buildHttp' | 'lazyCompilation' | 'css'> & {
|
|
25
33
|
/**
|
|
26
34
|
* @title Enable additional in-memory caching of modules which are unchanged and reference only unchanged modules.
|
|
@@ -78,6 +86,13 @@ export interface Experiments {
|
|
|
78
86
|
* @default false
|
|
79
87
|
*/
|
|
80
88
|
enableFillDeclareActionNamePlugin: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts
|
|
91
|
+
*
|
|
92
|
+
* @title Enable React Compiler. You can pass some options, or use it with meaningful defaults.
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
95
|
+
reactCompiler?: boolean | ReactCompilerOptions;
|
|
81
96
|
}
|
|
82
97
|
/**
|
|
83
98
|
* @default {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/typings/configEntry/cli.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE/D,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,KAAK,CAAC;AAClD,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;AAExC,KAAK,oBAAoB,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE,CAAC;AACnF,KAAK,aAAa,GAAG;IACnB;;OAEG;IACH,eAAe,CAAC,EAAE,K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MAAM,EAAE,GAAG,CAAC,CAAC;YACxC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;SACpB,CAAC;KACH,CAAC;IACF;;;OAGG;IACH,aAAa,EAAE,aAAa,GAAG;QAC7B,MAAM,CAAC,EAAE,aAAa,CAAC;QACvB,MAAM,CAAC,EAAE,aAAa,CAAC;KACxB,CAAC;IACF;;;;OAIG;IACH,MAAM,EAAE;QACN;;;;;WAKG;QACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;QACrC;;;;WAIG;QACH,uBAAuB,EAAE,OAAO,CAAC;QACjC;;;;;WAKG;QACH,cAAc,EAAE,MAAM,EAAE,CAAC;QACzB;;;WAGG;QACH,IAAI,EAAE,KAAK,CACP,MAAM,GACN;YACE;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;YACb;;;;eAIG;YACH,SAAS,EAAE,OAAO,CAAC;SACpB,CACJ,CAAC;KACH,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveReactVersion.d.ts","sourceRoot":"","sources":["../../src/utils/resolveReactVersion.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,eAAO,MAAM,mBAAmB,qBAI9B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveReactVersion = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const once_1 = tslib_1.__importDefault(require("@tinkoff/utils/function/once"));
|
|
6
|
+
const semver_1 = tslib_1.__importDefault(require("semver"));
|
|
7
|
+
exports.resolveReactVersion = (0, once_1.default)(() => {
|
|
8
|
+
const reactVersion = require('react').version;
|
|
9
|
+
return semver_1.default.parse(reactVersion);
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=resolveReactVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveReactVersion.js","sourceRoot":"","sources":["../../src/utils/resolveReactVersion.ts"],"names":[],"mappings":";;;;AAAA,gFAAgD;AAChD,4DAA4B;AAEf,QAAA,mBAAmB,GAAG,IAAA,cAAI,EAAC,GAAG,EAAE;IAC3C,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;IAE9C,OAAO,gBAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkReactCompilerDependencies.d.ts","sourceRoot":"","sources":["../../../src/validators/commands/checkReactCompilerDependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAuD/C,eAAO,MAAM,8BAA8B,EAAE,SA0B5C,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkReactCompilerDependencies = void 0;
|
|
4
|
+
const resolveReactVersion_1 = require("../../utils/resolveReactVersion");
|
|
5
|
+
const VALIDATOR_NAME = 'checkReactCompilerDependencies';
|
|
6
|
+
const getLoaderFromConfig = (config) => {
|
|
7
|
+
const field = config.experiments?.transpilation?.loader;
|
|
8
|
+
if (field === undefined) {
|
|
9
|
+
return 'babel';
|
|
10
|
+
}
|
|
11
|
+
if (typeof field === 'string') {
|
|
12
|
+
return field;
|
|
13
|
+
}
|
|
14
|
+
return field[process.env.NODE_ENV] ?? 'babel';
|
|
15
|
+
};
|
|
16
|
+
const resolveBabelPlugin = () => {
|
|
17
|
+
try {
|
|
18
|
+
require.resolve('babel-plugin-react-compiler');
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
if (error.code === 'MODULE_NOT_FOUND') {
|
|
22
|
+
throw new Error('Can not resolve the `babel-plugin-react-compiler`. It is required to use the React Compiler. Please install it.');
|
|
23
|
+
}
|
|
24
|
+
throw error;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const resolveCompilerRuntime = (reactMajor) => {
|
|
28
|
+
if (reactMajor === '19') {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
require.resolve('react-compiler-runtime');
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
if (error.code === 'MODULE_NOT_FOUND') {
|
|
36
|
+
throw new Error('React versions prior to 19 require the `react-compiler-runtime` package to be installed. Please install it.');
|
|
37
|
+
}
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const checkReactCompilerDependencies = async ({ config }, params) => {
|
|
42
|
+
const configEntry = config.getProject(params.target);
|
|
43
|
+
if (!configEntry.experiments?.reactCompiler) {
|
|
44
|
+
return { name: VALIDATOR_NAME, status: 'ok' };
|
|
45
|
+
}
|
|
46
|
+
const loader = getLoaderFromConfig(configEntry);
|
|
47
|
+
if (loader === 'swc') {
|
|
48
|
+
throw new Error(`React compiler is not supported when using SWC transpiler.`);
|
|
49
|
+
}
|
|
50
|
+
const reactVersion = (0, resolveReactVersion_1.resolveReactVersion)();
|
|
51
|
+
const reactMajor = reactVersion.major.toString();
|
|
52
|
+
if (!['17', '18', '19'].includes(reactMajor)) {
|
|
53
|
+
throw new Error(`Resolved React version is ${reactVersion.version} which is not supported. Supported versions are 17, 18 and 19.`);
|
|
54
|
+
}
|
|
55
|
+
resolveBabelPlugin();
|
|
56
|
+
resolveCompilerRuntime(reactMajor);
|
|
57
|
+
return { name: VALIDATOR_NAME, status: 'ok' };
|
|
58
|
+
};
|
|
59
|
+
exports.checkReactCompilerDependencies = checkReactCompilerDependencies;
|
|
60
|
+
//# sourceMappingURL=checkReactCompilerDependencies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkReactCompilerDependencies.js","sourceRoot":"","sources":["../../../src/validators/commands/check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;IAE/E,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,aAAa,EAAE;QAC3C,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;KAC/C;IAED,MAAM,MAAM,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAEhD,IAAI,MAAM,KAAK,KAAK,EAAE;QACpB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;KAC/E;IAED,MAAM,YAAY,GAAG,IAAA,yCAAmB,GAAE,CAAC;IAC3C,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAyB,CAAC;IAExE,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;QAC5C,MAAM,IAAI,KAAK,CACb,6BAA6B,YAAY,CAAC,OAAO,gEAAgE,CAClH,CAAC;KACH;IAED,kBAAkB,EAAE,CAAC;IACrB,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAEnC,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AAChD,CAAC,CAAC;AA1BW,QAAA,8BAA8B,kCA0BzC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.19.0",
|
|
4
4
|
"description": "Cli инструмент для сборки и запуска приложений",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@tinkoff/utils": "^2.1.3",
|
|
75
75
|
"@tinkoff/webpack-dedupe-plugin": "4.0.2",
|
|
76
76
|
"@tramvai/build": "6.1.1",
|
|
77
|
-
"@tramvai/react": "5.
|
|
77
|
+
"@tramvai/react": "5.19.0",
|
|
78
78
|
"@tramvai/tools-check-versions": "0.7.5",
|
|
79
79
|
"@tramvai/tools-migrate": "0.9.5",
|
|
80
80
|
"ajv": "^8.12.0",
|
|
@@ -199,6 +199,14 @@
|
|
|
199
199
|
"react": "18.2.0",
|
|
200
200
|
"sharp": "0.32.6"
|
|
201
201
|
},
|
|
202
|
+
"peerDependencies": {
|
|
203
|
+
"babel-plugin-react-compiler": "*"
|
|
204
|
+
},
|
|
205
|
+
"peerDependenciesMeta": {
|
|
206
|
+
"babel-plugin-react-compiler": {
|
|
207
|
+
"optional": true
|
|
208
|
+
}
|
|
209
|
+
},
|
|
202
210
|
"hiddenDependencies": {
|
|
203
211
|
"image-webpack-loader": "^6.0.0",
|
|
204
212
|
"sharp": "0.32.6"
|
package/schema.json
CHANGED
|
@@ -962,6 +962,45 @@
|
|
|
962
962
|
"title": "Включает использование плагина fill-declare-action-name",
|
|
963
963
|
"default": false,
|
|
964
964
|
"type": "boolean"
|
|
965
|
+
},
|
|
966
|
+
"reactCompiler": {
|
|
967
|
+
"description": "https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts",
|
|
968
|
+
"title": "Enable React Compiler. You can pass some options, or use it with meaningful defaults.",
|
|
969
|
+
"default": false,
|
|
970
|
+
"anyOf": [
|
|
971
|
+
{
|
|
972
|
+
"type": "object",
|
|
973
|
+
"properties": {
|
|
974
|
+
"sources": {
|
|
975
|
+
"type": "array",
|
|
976
|
+
"items": {
|
|
977
|
+
"type": "string"
|
|
978
|
+
}
|
|
979
|
+
},
|
|
980
|
+
"compilationMode": {
|
|
981
|
+
"enum": [
|
|
982
|
+
"all",
|
|
983
|
+
"annotation",
|
|
984
|
+
"infer"
|
|
985
|
+
],
|
|
986
|
+
"type": "string"
|
|
987
|
+
},
|
|
988
|
+
"panicThreshold": {
|
|
989
|
+
"title": "Determines the point at which compiler should throw an error",
|
|
990
|
+
"enum": [
|
|
991
|
+
"ALL_ERRORS",
|
|
992
|
+
"CRITICAL_ERRORS",
|
|
993
|
+
"NONE"
|
|
994
|
+
],
|
|
995
|
+
"type": "string"
|
|
996
|
+
}
|
|
997
|
+
},
|
|
998
|
+
"additionalProperties": false
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
"type": "boolean"
|
|
1002
|
+
}
|
|
1003
|
+
]
|
|
965
1004
|
}
|
|
966
1005
|
},
|
|
967
1006
|
"additionalProperties": false
|
|
@@ -1210,23 +1249,23 @@
|
|
|
1210
1249
|
"dotAll": {
|
|
1211
1250
|
"type": "boolean"
|
|
1212
1251
|
},
|
|
1213
|
-
"__@match@
|
|
1252
|
+
"__@match@7341": {
|
|
1214
1253
|
"type": "object",
|
|
1215
1254
|
"additionalProperties": false
|
|
1216
1255
|
},
|
|
1217
|
-
"__@replace@
|
|
1256
|
+
"__@replace@7343": {
|
|
1218
1257
|
"type": "object",
|
|
1219
1258
|
"additionalProperties": false
|
|
1220
1259
|
},
|
|
1221
|
-
"__@search@
|
|
1260
|
+
"__@search@7346": {
|
|
1222
1261
|
"type": "object",
|
|
1223
1262
|
"additionalProperties": false
|
|
1224
1263
|
},
|
|
1225
|
-
"__@split@
|
|
1264
|
+
"__@split@7348": {
|
|
1226
1265
|
"type": "object",
|
|
1227
1266
|
"additionalProperties": false
|
|
1228
1267
|
},
|
|
1229
|
-
"__@matchAll@
|
|
1268
|
+
"__@matchAll@7350": {
|
|
1230
1269
|
"type": "object",
|
|
1231
1270
|
"additionalProperties": false
|
|
1232
1271
|
}
|
|
@@ -1746,6 +1785,45 @@
|
|
|
1746
1785
|
"title": "Включает использование плагина fill-declare-action-name",
|
|
1747
1786
|
"default": false,
|
|
1748
1787
|
"type": "boolean"
|
|
1788
|
+
},
|
|
1789
|
+
"reactCompiler": {
|
|
1790
|
+
"description": "https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts",
|
|
1791
|
+
"title": "Enable React Compiler. You can pass some options, or use it with meaningful defaults.",
|
|
1792
|
+
"default": false,
|
|
1793
|
+
"anyOf": [
|
|
1794
|
+
{
|
|
1795
|
+
"type": "object",
|
|
1796
|
+
"properties": {
|
|
1797
|
+
"sources": {
|
|
1798
|
+
"type": "array",
|
|
1799
|
+
"items": {
|
|
1800
|
+
"type": "string"
|
|
1801
|
+
}
|
|
1802
|
+
},
|
|
1803
|
+
"compilationMode": {
|
|
1804
|
+
"enum": [
|
|
1805
|
+
"all",
|
|
1806
|
+
"annotation",
|
|
1807
|
+
"infer"
|
|
1808
|
+
],
|
|
1809
|
+
"type": "string"
|
|
1810
|
+
},
|
|
1811
|
+
"panicThreshold": {
|
|
1812
|
+
"title": "Determines the point at which compiler should throw an error",
|
|
1813
|
+
"enum": [
|
|
1814
|
+
"ALL_ERRORS",
|
|
1815
|
+
"CRITICAL_ERRORS",
|
|
1816
|
+
"NONE"
|
|
1817
|
+
],
|
|
1818
|
+
"type": "string"
|
|
1819
|
+
}
|
|
1820
|
+
},
|
|
1821
|
+
"additionalProperties": false
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
"type": "boolean"
|
|
1825
|
+
}
|
|
1826
|
+
]
|
|
1749
1827
|
}
|
|
1750
1828
|
},
|
|
1751
1829
|
"additionalProperties": false
|
|
@@ -1932,23 +2010,23 @@
|
|
|
1932
2010
|
"dotAll": {
|
|
1933
2011
|
"type": "boolean"
|
|
1934
2012
|
},
|
|
1935
|
-
"__@match@
|
|
2013
|
+
"__@match@7341": {
|
|
1936
2014
|
"type": "object",
|
|
1937
2015
|
"additionalProperties": false
|
|
1938
2016
|
},
|
|
1939
|
-
"__@replace@
|
|
2017
|
+
"__@replace@7343": {
|
|
1940
2018
|
"type": "object",
|
|
1941
2019
|
"additionalProperties": false
|
|
1942
2020
|
},
|
|
1943
|
-
"__@search@
|
|
2021
|
+
"__@search@7346": {
|
|
1944
2022
|
"type": "object",
|
|
1945
2023
|
"additionalProperties": false
|
|
1946
2024
|
},
|
|
1947
|
-
"__@split@
|
|
2025
|
+
"__@split@7348": {
|
|
1948
2026
|
"type": "object",
|
|
1949
2027
|
"additionalProperties": false
|
|
1950
2028
|
},
|
|
1951
|
-
"__@matchAll@
|
|
2029
|
+
"__@matchAll@7350": {
|
|
1952
2030
|
"type": "object",
|
|
1953
2031
|
"additionalProperties": false
|
|
1954
2032
|
}
|
|
@@ -2468,6 +2546,45 @@
|
|
|
2468
2546
|
"title": "Включает использование плагина fill-declare-action-name",
|
|
2469
2547
|
"default": false,
|
|
2470
2548
|
"type": "boolean"
|
|
2549
|
+
},
|
|
2550
|
+
"reactCompiler": {
|
|
2551
|
+
"description": "https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts",
|
|
2552
|
+
"title": "Enable React Compiler. You can pass some options, or use it with meaningful defaults.",
|
|
2553
|
+
"default": false,
|
|
2554
|
+
"anyOf": [
|
|
2555
|
+
{
|
|
2556
|
+
"type": "object",
|
|
2557
|
+
"properties": {
|
|
2558
|
+
"sources": {
|
|
2559
|
+
"type": "array",
|
|
2560
|
+
"items": {
|
|
2561
|
+
"type": "string"
|
|
2562
|
+
}
|
|
2563
|
+
},
|
|
2564
|
+
"compilationMode": {
|
|
2565
|
+
"enum": [
|
|
2566
|
+
"all",
|
|
2567
|
+
"annotation",
|
|
2568
|
+
"infer"
|
|
2569
|
+
],
|
|
2570
|
+
"type": "string"
|
|
2571
|
+
},
|
|
2572
|
+
"panicThreshold": {
|
|
2573
|
+
"title": "Determines the point at which compiler should throw an error",
|
|
2574
|
+
"enum": [
|
|
2575
|
+
"ALL_ERRORS",
|
|
2576
|
+
"CRITICAL_ERRORS",
|
|
2577
|
+
"NONE"
|
|
2578
|
+
],
|
|
2579
|
+
"type": "string"
|
|
2580
|
+
}
|
|
2581
|
+
},
|
|
2582
|
+
"additionalProperties": false
|
|
2583
|
+
},
|
|
2584
|
+
{
|
|
2585
|
+
"type": "boolean"
|
|
2586
|
+
}
|
|
2587
|
+
]
|
|
2471
2588
|
}
|
|
2472
2589
|
},
|
|
2473
2590
|
"additionalProperties": false
|
|
@@ -2654,23 +2771,23 @@
|
|
|
2654
2771
|
"dotAll": {
|
|
2655
2772
|
"type": "boolean"
|
|
2656
2773
|
},
|
|
2657
|
-
"__@match@
|
|
2774
|
+
"__@match@7341": {
|
|
2658
2775
|
"type": "object",
|
|
2659
2776
|
"additionalProperties": false
|
|
2660
2777
|
},
|
|
2661
|
-
"__@replace@
|
|
2778
|
+
"__@replace@7343": {
|
|
2662
2779
|
"type": "object",
|
|
2663
2780
|
"additionalProperties": false
|
|
2664
2781
|
},
|
|
2665
|
-
"__@search@
|
|
2782
|
+
"__@search@7346": {
|
|
2666
2783
|
"type": "object",
|
|
2667
2784
|
"additionalProperties": false
|
|
2668
2785
|
},
|
|
2669
|
-
"__@split@
|
|
2786
|
+
"__@split@7348": {
|
|
2670
2787
|
"type": "object",
|
|
2671
2788
|
"additionalProperties": false
|
|
2672
2789
|
},
|
|
2673
|
-
"__@matchAll@
|
|
2790
|
+
"__@matchAll@7350": {
|
|
2674
2791
|
"type": "object",
|
|
2675
2792
|
"additionalProperties": false
|
|
2676
2793
|
}
|
|
@@ -148,4 +148,13 @@ Check available render modes in tramvai`,
|
|
|
148
148
|
return type === 'child-app' && shared.deps.length === 0;
|
|
149
149
|
},
|
|
150
150
|
},
|
|
151
|
+
{
|
|
152
|
+
text: `Optimize client render performance by enabling React compiler`,
|
|
153
|
+
docLink: 'guides/react-compiler',
|
|
154
|
+
isApplicable(di) {
|
|
155
|
+
const configManager = di.get(CONFIG_MANAGER_TOKEN);
|
|
156
|
+
|
|
157
|
+
return !configManager.experiments?.reactCompiler;
|
|
158
|
+
},
|
|
159
|
+
},
|
|
151
160
|
];
|