miaoda-expo-devkit 0.1.1-beta.115 → 0.1.1-beta.116
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
diff --git a/plugin/index.js b/plugin/index.js
|
|
2
2
|
--- a/plugin/index.js
|
|
3
3
|
+++ b/plugin/index.js
|
|
4
|
-
@@ -752,6 +752,
|
|
4
|
+
@@ -752,6 +752,31 @@ var require_workletStringCode = __commonJS({
|
|
5
5
|
var types_2 = require_types();
|
|
6
6
|
var utils_1 = require_utils();
|
|
7
7
|
var MOCK_SOURCE_MAP = "mock source map";
|
|
@@ -9,10 +9,18 @@ diff --git a/plugin/index.js b/plugin/index.js
|
|
|
9
9
|
+ if (node == null || typeof node !== "object") {
|
|
10
10
|
+ return;
|
|
11
11
|
+ }
|
|
12
|
-
+ if (node.type === "TSFunctionType") {
|
|
12
|
+
+ if (node.type === "TSFunctionType" || node.type === "TSConstructorType") {
|
|
13
13
|
+ const parameters = Array.isArray(node.parameters) ? node.parameters : Array.isArray(node.params) ? node.params : [];
|
|
14
14
|
+ node.parameters = parameters;
|
|
15
15
|
+ node.params = parameters;
|
|
16
|
+
+ const returnType = node.typeAnnotation != null ? node.typeAnnotation : node.returnType != null ? node.returnType : null;
|
|
17
|
+
+ node.typeAnnotation = returnType;
|
|
18
|
+
+ node.returnType = returnType;
|
|
19
|
+
+ }
|
|
20
|
+
+ if (node.type === "TSTypeReference") {
|
|
21
|
+
+ const typeArguments = node.typeParameters != null ? node.typeParameters : node.typeArguments != null ? node.typeArguments : null;
|
|
22
|
+
+ node.typeParameters = typeArguments;
|
|
23
|
+
+ node.typeArguments = typeArguments;
|
|
16
24
|
+ }
|
|
17
25
|
+ for (const value of Object.values(node)) {
|
|
18
26
|
+ if (Array.isArray(value)) {
|
|
@@ -25,7 +33,7 @@ diff --git a/plugin/index.js b/plugin/index.js
|
|
|
25
33
|
function buildWorkletString(fun, state, closureVariables, workletName, inputMap) {
|
|
26
34
|
var _a;
|
|
27
35
|
restoreRecursiveCalls(fun, workletName);
|
|
28
|
-
@@ -784,6 +
|
|
36
|
+
@@ -784,6 +809,7 @@ var require_workletStringCode = __commonJS({
|
|
29
37
|
});
|
|
30
38
|
}
|
|
31
39
|
const workletFunction = (0, types_12.functionExpression)((0, types_12.identifier)(workletName), expression.params, expression.body, expression.generator, expression.async);
|
|
@@ -33,7 +41,7 @@ diff --git a/plugin/index.js b/plugin/index.js
|
|
|
33
41
|
const code = (0, generator_1.default)(workletFunction).code;
|
|
34
42
|
(0, assert_1.strict)(inputMap, "[Reanimated] `inputMap` is undefined.");
|
|
35
43
|
const includeSourceMap = !((0, utils_1.isRelease)() || state.opts.disableSourceMaps);
|
|
36
|
-
@@ -892,10 +
|
|
44
|
+
@@ -892,10 +918,36 @@ var require_workletFactory = __commonJS({
|
|
37
45
|
var workletStringCode_1 = require_workletStringCode();
|
|
38
46
|
var REAL_VERSION = require("../package.json").version;
|
|
39
47
|
var MOCK_VERSION = "x.y.z";
|
|
@@ -41,10 +49,18 @@ diff --git a/plugin/index.js b/plugin/index.js
|
|
|
41
49
|
+ if (node == null || typeof node !== "object") {
|
|
42
50
|
+ return;
|
|
43
51
|
+ }
|
|
44
|
-
+ if (node.type === "TSFunctionType") {
|
|
52
|
+
+ if (node.type === "TSFunctionType" || node.type === "TSConstructorType") {
|
|
45
53
|
+ const parameters = Array.isArray(node.parameters) ? node.parameters : Array.isArray(node.params) ? node.params : [];
|
|
46
54
|
+ node.parameters = parameters;
|
|
47
55
|
+ node.params = parameters;
|
|
56
|
+
+ const returnType = node.typeAnnotation != null ? node.typeAnnotation : node.returnType != null ? node.returnType : null;
|
|
57
|
+
+ node.typeAnnotation = returnType;
|
|
58
|
+
+ node.returnType = returnType;
|
|
59
|
+
+ }
|
|
60
|
+
+ if (node.type === "TSTypeReference") {
|
|
61
|
+
+ const typeArguments = node.typeParameters != null ? node.typeParameters : node.typeArguments != null ? node.typeArguments : null;
|
|
62
|
+
+ node.typeParameters = typeArguments;
|
|
63
|
+
+ node.typeArguments = typeArguments;
|
|
48
64
|
+ }
|
|
49
65
|
+ for (const value of Object.values(node)) {
|
|
50
66
|
+ if (Array.isArray(value)) {
|
|
@@ -62,13 +78,14 @@ diff --git a/plugin/index.js b/plugin/index.js
|
|
|
62
78
|
const codeObject = (0, generator_1.default)(fun.node, {
|
|
63
79
|
sourceMaps: true,
|
|
64
80
|
sourceFileName: state.file.opts.filename
|
|
65
|
-
@@ -
|
|
66
|
-
if (!(0, utils_1.isRelease)()) {
|
|
81
|
+
@@ -977,8 +1029,8 @@ var require_workletFactory = __commonJS({
|
|
67
82
|
statements.unshift((0, types_12.variableDeclaration)("const", [
|
|
68
83
|
(0, types_12.variableDeclarator)((0, types_12.identifier)("_e"), (0, types_12.arrayExpression)([
|
|
69
84
|
(0, types_12.newExpression)((0, types_12.memberExpression)((0, types_12.identifier)("global"), (0, types_12.identifier)("Error")), []),
|
|
70
|
-
|
|
85
|
+
- (0, types_12.numericLiteral)(lineOffset),
|
|
71
86
|
- (0, types_12.numericLiteral)(-27)
|
|
87
|
+
+ lineOffset < 0 ? (0, types_12.unaryExpression)("-", (0, types_12.numericLiteral)(-lineOffset)) : (0, types_12.numericLiteral)(lineOffset),
|
|
72
88
|
+ (0, types_12.unaryExpression)("-", (0, types_12.numericLiteral)(27))
|
|
73
89
|
]))
|
|
74
90
|
]));
|
|
91
|
+
statements.push((0, types_12.expressionStatement)((0, types_12.assignmentExpression)("=", (0, types_12.memberExpression)((0, types_12.identifier)(reactName), (0, types_12.identifier)("__stackDetails"), false), (0, types_12.identifier)("_e"))));
|