babel-plugin-react-compiler 0.0.0-experimental-1e6d215-20250109 → 0.0.0-experimental-e552027-20250113
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/dist/index.js +38 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -126649,7 +126649,7 @@ var testComplexConfigDefaults = {
|
|
126649
126649
|
}
|
126650
126650
|
]
|
126651
126651
|
};
|
126652
|
-
function
|
126652
|
+
function parseConfigPragmaEnvironmentForTest(pragma) {
|
126653
126653
|
const maybeConfig = {};
|
126654
126654
|
const defaultConfig = EnvironmentConfigSchema.parse({});
|
126655
126655
|
for (const token of pragma.split(" ")) {
|
@@ -126701,6 +126701,43 @@ function parseConfigPragmaForTests(pragma) {
|
|
126701
126701
|
suggestions: null
|
126702
126702
|
});
|
126703
126703
|
}
|
126704
|
+
function parseConfigPragmaForTests(pragma, defaults) {
|
126705
|
+
const environment = parseConfigPragmaEnvironmentForTest(pragma);
|
126706
|
+
let compilationMode = defaults.compilationMode;
|
126707
|
+
let panicThreshold = "all_errors";
|
126708
|
+
for (const token of pragma.split(" ")) {
|
126709
|
+
if (!token.startsWith("@")) {
|
126710
|
+
continue;
|
126711
|
+
}
|
126712
|
+
switch (token) {
|
126713
|
+
case "@compilationMode(annotation)": {
|
126714
|
+
compilationMode = "annotation";
|
126715
|
+
break;
|
126716
|
+
}
|
126717
|
+
case "@compilationMode(infer)": {
|
126718
|
+
compilationMode = "infer";
|
126719
|
+
break;
|
126720
|
+
}
|
126721
|
+
case "@compilationMode(all)": {
|
126722
|
+
compilationMode = "all";
|
126723
|
+
break;
|
126724
|
+
}
|
126725
|
+
case "@compilationMode(syntax)": {
|
126726
|
+
compilationMode = "syntax";
|
126727
|
+
break;
|
126728
|
+
}
|
126729
|
+
case "@panicThreshold(none)": {
|
126730
|
+
panicThreshold = "none";
|
126731
|
+
break;
|
126732
|
+
}
|
126733
|
+
}
|
126734
|
+
}
|
126735
|
+
return parsePluginOptions({
|
126736
|
+
environment,
|
126737
|
+
compilationMode,
|
126738
|
+
panicThreshold
|
126739
|
+
});
|
126740
|
+
}
|
126704
126741
|
var Environment = class {
|
126705
126742
|
#globals;
|
126706
126743
|
#shapes;
|