@vxrn/compiler 1.14.4 → 1.14.5
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/cjs/cache.cjs +65 -44
- package/dist/cjs/configure.cjs +16 -14
- package/dist/cjs/constants.cjs +55 -53
- package/dist/cjs/index.cjs +217 -136
- package/dist/cjs/refresh-runtime.cjs +284 -125
- package/dist/cjs/transformBabel.cjs +180 -95
- package/dist/cjs/transformSWC.cjs +188 -131
- package/dist/cjs/types.cjs +7 -5
- package/dist/esm/cache.mjs +49 -30
- package/dist/esm/cache.mjs.map +1 -1
- package/dist/esm/configure.mjs +4 -4
- package/dist/esm/constants.mjs +43 -43
- package/dist/esm/constants.mjs.map +1 -1
- package/dist/esm/index.js +182 -103
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +182 -103
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/refresh-runtime.mjs +272 -115
- package/dist/esm/refresh-runtime.mjs.map +1 -1
- package/dist/esm/transformBabel.mjs +151 -68
- package/dist/esm/transformBabel.mjs.map +1 -1
- package/dist/esm/transformSWC.mjs +171 -116
- package/dist/esm/transformSWC.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -4,108 +4,191 @@ import { resolvePath } from "@vxrn/utils";
|
|
|
4
4
|
import { configuration } from "./configure.mjs";
|
|
5
5
|
import { asyncGeneratorRegex, debug } from "./constants.mjs";
|
|
6
6
|
function getBabelOptions(props) {
|
|
7
|
-
|
|
7
|
+
if (props.userSetting === "babel") {
|
|
8
|
+
return getOptions(props, true);
|
|
9
|
+
}
|
|
10
|
+
if (typeof props.userSetting === "undefined" || typeof props.userSetting === "object" && props.userSetting.transform === "babel") {
|
|
11
|
+
if (props.userSetting?.excludeDefaultPlugins) {
|
|
12
|
+
return props.userSetting;
|
|
13
|
+
}
|
|
14
|
+
return getOptions(props);
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
8
17
|
}
|
|
9
|
-
const getOptions = (props, force =
|
|
18
|
+
const getOptions = (props, force = false) => {
|
|
10
19
|
let plugins = [];
|
|
11
|
-
(force || shouldBabelGenerators(props))
|
|
20
|
+
if (force || shouldBabelGenerators(props)) {
|
|
21
|
+
plugins = getBasePlugins(props);
|
|
22
|
+
}
|
|
12
23
|
const enableNativewind = configuration.enableNativewind && (props.environment === "ios" || props.environment === "android") &&
|
|
13
24
|
// if reanimated gets wrapped in transform it causes circular dep issues
|
|
14
25
|
!/node_modules/.test(props.id) &&
|
|
15
26
|
// only needed for createElement calls, so be a bit conservative
|
|
16
27
|
props.code.includes("createElement");
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
28
|
+
if (enableNativewind) {
|
|
29
|
+
if (!props.id.includes("node_modules")) {
|
|
30
|
+
plugins.push(resolvePath("react-native-css-interop/dist/babel-plugin.js"));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (enableNativewind || shouldBabelReanimated(props)) {
|
|
34
|
+
debug?.(`Using babel reanimated on file ${props.id}`);
|
|
35
|
+
plugins.push(
|
|
36
|
+
// TODO make this configurable
|
|
37
|
+
process.env.VXRN_WORKLET_PLUGIN ? "react-native-worklets/plugin" : "react-native-reanimated/plugin");
|
|
38
|
+
}
|
|
39
|
+
if (shouldBabelReactCompiler(props)) {
|
|
40
|
+
debug?.(`Using babel react compiler on file`);
|
|
41
|
+
plugins.push(getBabelReactCompilerPlugin(props));
|
|
42
|
+
}
|
|
43
|
+
if (shouldBabelReactNativeCodegen(props)) {
|
|
44
|
+
debug?.(`Using babel @react-native/babel-plugin-codegen on file`);
|
|
45
|
+
plugins.push("@react-native/babel-plugin-codegen");
|
|
46
|
+
}
|
|
47
|
+
if (plugins.length) {
|
|
48
|
+
return {
|
|
49
|
+
plugins
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
22
53
|
};
|
|
23
54
|
async function transformBabel(id, code, options) {
|
|
24
|
-
const extension = extname(id)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
55
|
+
const extension = extname(id);
|
|
56
|
+
const isTSX = extension === ".tsx";
|
|
57
|
+
const isTS = isTSX || extension === ".ts";
|
|
58
|
+
const babelOptions = {
|
|
59
|
+
filename: id,
|
|
60
|
+
compact: false,
|
|
61
|
+
babelrc: false,
|
|
62
|
+
configFile: false,
|
|
63
|
+
sourceMaps: false,
|
|
64
|
+
minified: false,
|
|
65
|
+
...options,
|
|
66
|
+
presets: [isTS ? ["@babel/preset-typescript", {
|
|
67
|
+
isTSX,
|
|
68
|
+
allExtensions: isTSX
|
|
69
|
+
}] : "", ...(options.presets || [])].filter(Boolean)
|
|
70
|
+
};
|
|
39
71
|
try {
|
|
40
|
-
|
|
72
|
+
const out = await new Promise((res, rej) => {
|
|
41
73
|
babel.transform(code, babelOptions, (err, result) => {
|
|
42
|
-
if (!result || err)
|
|
74
|
+
if (!result || err) {
|
|
75
|
+
return rej(err || "no res");
|
|
76
|
+
}
|
|
43
77
|
res(result);
|
|
44
78
|
});
|
|
45
79
|
});
|
|
80
|
+
return out;
|
|
46
81
|
} catch (err) {
|
|
47
|
-
if (err?.message?.includes("Could not find component config"))
|
|
48
|
-
|
|
82
|
+
if (err?.message?.includes("Could not find component config")) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
console.error(`[vxrn:compiler] babel transform error`, err, `with options`, babelOptions);
|
|
86
|
+
console.error("code", code);
|
|
87
|
+
console.error("id", id);
|
|
49
88
|
}
|
|
50
89
|
}
|
|
51
90
|
const getBasePlugins = ({
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
91
|
+
development
|
|
92
|
+
}) => [["@babel/plugin-transform-destructuring"], ["@babel/plugin-transform-react-jsx", {
|
|
93
|
+
development
|
|
94
|
+
}], ["@babel/plugin-transform-async-generator-functions"], ["@babel/plugin-transform-async-to-generator"], ["@babel/plugin-transform-runtime", {
|
|
95
|
+
helpers: true,
|
|
96
|
+
// NOTE THIS WAS SPELLED WRONG BEFOER THIS COMMIT MAYBE IT WAS UNINTENTIONALLY WORKING
|
|
97
|
+
regenerator: false
|
|
98
|
+
}]];
|
|
99
|
+
const NATIVE_COMPONENT_RE = /NativeComponent\.[jt]sx?$/;
|
|
100
|
+
const SPEC_FILE_RE = /[/\\]specs?[/\\]/;
|
|
101
|
+
const shouldBabelReactNativeCodegen = ({
|
|
102
|
+
id,
|
|
103
|
+
environment
|
|
104
|
+
}) => {
|
|
105
|
+
return (environment === "ios" || environment === "android") && (NATIVE_COMPONENT_RE.test(id) || SPEC_FILE_RE.test(id));
|
|
106
|
+
};
|
|
107
|
+
const shouldBabelReactCompiler = props => {
|
|
108
|
+
if (props.environment === "ssr") {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
if (!configuration.enableCompiler) {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
const {
|
|
115
|
+
enableCompiler
|
|
116
|
+
} = configuration;
|
|
117
|
+
if (typeof enableCompiler === "object" && !Array.isArray(enableCompiler) && !(enableCompiler instanceof RegExp)) {
|
|
118
|
+
const isNative = props.environment === "ios" || props.environment === "android";
|
|
119
|
+
const filter = isNative ? enableCompiler.native : enableCompiler.web;
|
|
120
|
+
if (!filter) return false;
|
|
121
|
+
return applyCompilerFilter(filter, props);
|
|
122
|
+
}
|
|
123
|
+
if (typeof enableCompiler === "function") {
|
|
124
|
+
return enableCompiler(props.id, props.environment);
|
|
125
|
+
}
|
|
126
|
+
if (enableCompiler instanceof RegExp) {
|
|
127
|
+
return enableCompiler.test(props.id);
|
|
128
|
+
}
|
|
129
|
+
if (Array.isArray(enableCompiler)) {
|
|
130
|
+
if (!enableCompiler.includes(props.environment)) {
|
|
131
|
+
return false;
|
|
74
132
|
}
|
|
75
|
-
|
|
76
|
-
|
|
133
|
+
}
|
|
134
|
+
return applyDefaultFilters(props);
|
|
135
|
+
};
|
|
77
136
|
function applyCompilerFilter(filter, props) {
|
|
78
|
-
|
|
137
|
+
if (typeof filter === "function") {
|
|
138
|
+
return filter(props.id, props.environment);
|
|
139
|
+
}
|
|
140
|
+
if (filter instanceof RegExp) {
|
|
141
|
+
return filter.test(props.id);
|
|
142
|
+
}
|
|
143
|
+
if (filter === true) {
|
|
144
|
+
return applyDefaultFilters(props);
|
|
145
|
+
}
|
|
146
|
+
return false;
|
|
79
147
|
}
|
|
80
148
|
function applyDefaultFilters(props) {
|
|
81
|
-
|
|
149
|
+
if (!/(\.tsx?)$/.test(props.id)) return false;
|
|
150
|
+
if (props.id.includes("node_modules")) return false;
|
|
151
|
+
if (props.id.includes("+api.")) return false;
|
|
152
|
+
if (props.code.startsWith("// disable-compiler")) return false;
|
|
153
|
+
return true;
|
|
82
154
|
}
|
|
83
|
-
const getBabelReactCompilerPlugin = props =>
|
|
84
|
-
target
|
|
85
|
-
|
|
155
|
+
const getBabelReactCompilerPlugin = props => {
|
|
156
|
+
const target = props.reactForRNVersion === "18" && (props.environment === "ios" || props.environment === "android") ? "18" : "19";
|
|
157
|
+
return ["babel-plugin-react-compiler", {
|
|
158
|
+
target
|
|
159
|
+
}];
|
|
160
|
+
};
|
|
86
161
|
function shouldBabelGenerators({
|
|
87
162
|
code
|
|
88
163
|
}) {
|
|
89
|
-
if (process.env.VXRN_USE_BABEL_FOR_GENERATORS)
|
|
164
|
+
if (process.env.VXRN_USE_BABEL_FOR_GENERATORS) {
|
|
165
|
+
return asyncGeneratorRegex.test(code);
|
|
166
|
+
}
|
|
90
167
|
}
|
|
91
|
-
const REANIMATED_AUTOWORKLETIZATION_KEYWORDS = ["worklet", "useAnimatedGestureHandler", "useAnimatedScrollHandler", "useFrameCallback", "useAnimatedStyle", "useAnimatedProps", "createAnimatedPropAdapter", "useDerivedValue", "useAnimatedReaction", "useWorkletCallback", "withTiming", "withSpring", "withDecay", "withRepeat", "runOnUI", "executeOnUIRuntimeSync"]
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
168
|
+
const REANIMATED_AUTOWORKLETIZATION_KEYWORDS = ["worklet", "useAnimatedGestureHandler", "useAnimatedScrollHandler", "useFrameCallback", "useAnimatedStyle", "useAnimatedProps", "createAnimatedPropAdapter", "useDerivedValue", "useAnimatedReaction", "useWorkletCallback", "withTiming", "withSpring", "withDecay", "withRepeat", "runOnUI", "executeOnUIRuntimeSync"];
|
|
169
|
+
const REANIMATED_REGEX = new RegExp(REANIMATED_AUTOWORKLETIZATION_KEYWORDS.join("|"));
|
|
170
|
+
const REANIMATED_IGNORED_PATHS = [
|
|
171
|
+
// Prebuilt/vendored react-native that shouldn't be transformed
|
|
172
|
+
"react-native-prebuilt", "node_modules/.vxrn/react-native",
|
|
173
|
+
// Known false positives - they mention worklet keywords in comments/strings but don't use them
|
|
174
|
+
"node_modules/react/", "node_modules/react-dom/", "node_modules/react-native/", "node_modules/react-native-web/"];
|
|
175
|
+
const REANIMATED_IGNORED_PATHS_REGEX = new RegExp(REANIMATED_IGNORED_PATHS.map(s => s.replace(/\//g, "/")).join("|"));
|
|
99
176
|
function shouldBabelReanimated({
|
|
100
177
|
code,
|
|
101
178
|
id
|
|
102
179
|
}) {
|
|
103
|
-
if (!configuration.enableReanimated
|
|
180
|
+
if (!configuration.enableReanimated) {
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
if (REANIMATED_IGNORED_PATHS_REGEX.test(id)) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
104
186
|
if (REANIMATED_REGEX.test(code)) {
|
|
105
187
|
const location = id.includes("node_modules") ? "node_modules" : "user-code";
|
|
106
|
-
|
|
188
|
+
debug?.(` \u{1FA84} [reanimated/${location}] ${relative(process.cwd(), id)}`);
|
|
189
|
+
return true;
|
|
107
190
|
}
|
|
108
|
-
return
|
|
191
|
+
return false;
|
|
109
192
|
}
|
|
110
193
|
export { getBabelOptions, transformBabel };
|
|
111
194
|
//# sourceMappingURL=transformBabel.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["extname","relative","babel","resolvePath","configuration","asyncGeneratorRegex","debug","getBabelOptions","props","userSetting","getOptions","transform","excludeDefaultPlugins","force","plugins","shouldBabelGenerators","getBasePlugins","enableNativewind","environment","test","id","code","includes","push","shouldBabelReanimated","process","env","VXRN_WORKLET_PLUGIN","shouldBabelReactCompiler","getBabelReactCompilerPlugin","shouldBabelReactNativeCodegen","length","transformBabel","options","extension","isTSX","babelOptions","filename","compact","babelrc","configFile","sourceMaps","minified","presets","allExtensions","filter","Boolean","Promise","res","rej","err","result","message","console","error","development","helpers","regenerator","NATIVE_COMPONENT_RE","SPEC_FILE_RE","enableCompiler","Array","isArray","RegExp","native","web","applyCompilerFilter","applyDefaultFilters","startsWith","target","reactForRNVersion","VXRN_USE_BABEL_FOR_GENERATORS","REANIMATED_AUTOWORKLETIZATION_KEYWORDS","REANIMATED_REGEX","join","REANIMATED_IGNORED_PATHS","REANIMATED_IGNORED_PATHS_REGEX","map","s","replace","enableReanimated","location","cwd"],"sources":["../../src/transformBabel.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,OAAA,EAASC,QAAA,QAAgB;AAClC,OAAOC,KAAA,MAAW;AAClB,SAASC,WAAA,QAAmB;AAC5B,SAASC,aAAA,QAAqB;AAC9B,SAASC,mBAAA,EAAqBC,KAAA,QAAa;AAOpC,SAASC,gBAAgBC,KAAA,EAA6C;EAC3E,
|
|
1
|
+
{"version":3,"names":["extname","relative","babel","resolvePath","configuration","asyncGeneratorRegex","debug","getBabelOptions","props","userSetting","getOptions","transform","excludeDefaultPlugins","force","plugins","shouldBabelGenerators","getBasePlugins","enableNativewind","environment","test","id","code","includes","push","shouldBabelReanimated","process","env","VXRN_WORKLET_PLUGIN","shouldBabelReactCompiler","getBabelReactCompilerPlugin","shouldBabelReactNativeCodegen","length","transformBabel","options","extension","isTSX","isTS","babelOptions","filename","compact","babelrc","configFile","sourceMaps","minified","presets","allExtensions","filter","Boolean","out","Promise","res","rej","err","result","message","console","error","development","helpers","regenerator","NATIVE_COMPONENT_RE","SPEC_FILE_RE","enableCompiler","Array","isArray","RegExp","isNative","native","web","applyCompilerFilter","applyDefaultFilters","startsWith","target","reactForRNVersion","VXRN_USE_BABEL_FOR_GENERATORS","REANIMATED_AUTOWORKLETIZATION_KEYWORDS","REANIMATED_REGEX","join","REANIMATED_IGNORED_PATHS","REANIMATED_IGNORED_PATHS_REGEX","map","s","replace","enableReanimated","location","cwd"],"sources":["../../src/transformBabel.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,OAAA,EAASC,QAAA,QAAgB;AAClC,OAAOC,KAAA,MAAW;AAClB,SAASC,WAAA,QAAmB;AAC5B,SAASC,aAAA,QAAqB;AAC9B,SAASC,mBAAA,EAAqBC,KAAA,QAAa;AAOpC,SAASC,gBAAgBC,KAAA,EAA6C;EAC3E,IAAIA,KAAA,CAAMC,WAAA,KAAgB,SAAS;IACjC,OAAOC,UAAA,CAAWF,KAAA,EAAO,IAAI;EAC/B;EACA,IACE,OAAOA,KAAA,CAAMC,WAAA,KAAgB,eAC5B,OAAOD,KAAA,CAAMC,WAAA,KAAgB,YAAYD,KAAA,CAAMC,WAAA,CAAYE,SAAA,KAAc,SAC1E;IACA,IAAIH,KAAA,CAAMC,WAAA,EAAaG,qBAAA,EAAuB;MAC5C,OAAOJ,KAAA,CAAMC,WAAA;IACf;IACA,OAAOC,UA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