@tarojs/rn-runner 3.3.14 → 3.5.0-canary.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.
|
@@ -1,4 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
2
38
|
var __values = (this && this.__values) || function(o) {
|
|
3
39
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
4
40
|
if (m) return m.call(o);
|
|
@@ -20,6 +56,8 @@ var ConditionalFileStore = /** @class */ (function () {
|
|
|
20
56
|
}
|
|
21
57
|
ConditionalFileStore.prototype.isEntryCache = function (cacheItem) {
|
|
22
58
|
var e_1, _a;
|
|
59
|
+
if (!cacheItem)
|
|
60
|
+
return false;
|
|
23
61
|
var dependencies = cacheItem.dependencies;
|
|
24
62
|
if (!dependencies || !dependencies.length) {
|
|
25
63
|
return false;
|
|
@@ -42,19 +80,36 @@ var ConditionalFileStore = /** @class */ (function () {
|
|
|
42
80
|
return false;
|
|
43
81
|
};
|
|
44
82
|
ConditionalFileStore.prototype.get = function (key) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
|
|
83
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
+
var result;
|
|
85
|
+
return __generator(this, function (_a) {
|
|
86
|
+
switch (_a.label) {
|
|
87
|
+
case 0: return [4 /*yield*/, this._fileStore.get(key)];
|
|
88
|
+
case 1:
|
|
89
|
+
result = _a.sent();
|
|
90
|
+
if (result && this.ignoreEntryFileCache && this.isEntryCache(result)) {
|
|
91
|
+
return [2 /*return*/, null];
|
|
92
|
+
}
|
|
93
|
+
return [2 /*return*/, result];
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
50
97
|
};
|
|
51
98
|
ConditionalFileStore.prototype.set = function (key, value) {
|
|
52
99
|
var _a, _b, _c, _d, _e;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
100
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
101
|
+
return __generator(this, function (_f) {
|
|
102
|
+
switch (_f.label) {
|
|
103
|
+
case 0:
|
|
104
|
+
// fix: 样式文件不写缓存
|
|
105
|
+
if (((_e = (_d = (_c = (_b = (_a = value === null || value === void 0 ? void 0 : value.output) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.functionMap) === null || _d === void 0 ? void 0 : _d.names) === null || _e === void 0 ? void 0 : _e.indexOf('ignoreStyleFileCache')) > -1) {
|
|
106
|
+
return [2 /*return*/];
|
|
107
|
+
}
|
|
108
|
+
return [4 /*yield*/, this._fileStore.set(key, value)];
|
|
109
|
+
case 1: return [2 /*return*/, _f.sent()];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
});
|
|
58
113
|
};
|
|
59
114
|
ConditionalFileStore.prototype.clear = function () {
|
|
60
115
|
this._fileStore.clear();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conditional-file-store.js","sourceRoot":"","sources":["../../src/config/conditional-file-store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conditional-file-store.js","sourceRoot":"","sources":["../../src/config/conditional-file-store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;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AAE,OAAO,CAAC,sBAAsB,CAAC,IAAG,CAAC,CAAC,EAAE;4BACtF,sBAAM;yBACP;wBACM,qBAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,EAAA;4BAA5C,sBAAO,SAAqC,EAAA;;;;KAC7C;IAED,oCAAK,GAAL;QACE,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;IACzB,CAAC;IACH,2BAAC;AAAD,CAAC,AA5CD,IA4CC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/rn-runner",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0-canary.0",
|
|
4
4
|
"description": "ReactNative build tool for taro",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@react-native-community/cli": "^5.0.1",
|
|
34
34
|
"@react-native-community/cli-server-api": "^5.0.1",
|
|
35
|
-
"@tarojs/helper": "3.
|
|
36
|
-
"@tarojs/rn-style-transformer": "3.
|
|
37
|
-
"@tarojs/rn-supporter": "3.
|
|
38
|
-
"@tarojs/rn-transformer": "3.
|
|
39
|
-
"fs-extra": "^
|
|
40
|
-
"lodash": "^4.17.
|
|
35
|
+
"@tarojs/helper": "3.5.0-canary.0",
|
|
36
|
+
"@tarojs/rn-style-transformer": "3.5.0-canary.0",
|
|
37
|
+
"@tarojs/rn-supporter": "3.5.0-canary.0",
|
|
38
|
+
"@tarojs/rn-transformer": "3.5.0-canary.0",
|
|
39
|
+
"fs-extra": "^8.0.1",
|
|
40
|
+
"lodash": "^4.17.21",
|
|
41
41
|
"metro": "^0.66.2",
|
|
42
42
|
"metro-cache": "^0.66.2",
|
|
43
43
|
"metro-config": "^0.66.2",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"metro-resolver": "^0.66.2",
|
|
47
47
|
"qrcode-terminal": "^0.12.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "a0222bc41bc05b0e34413d6db3de963d777a5015"
|
|
50
50
|
}
|
|
@@ -11,6 +11,7 @@ export default class ConditionalFileStore<T> {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
isEntryCache (cacheItem): boolean {
|
|
14
|
+
if (!cacheItem) return false
|
|
14
15
|
const { dependencies } = cacheItem
|
|
15
16
|
if (!dependencies || !dependencies.length) {
|
|
16
17
|
return false
|
|
@@ -24,20 +25,20 @@ export default class ConditionalFileStore<T> {
|
|
|
24
25
|
return false
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
get (key: Buffer): T | null {
|
|
28
|
-
const result = this._fileStore.get(key)
|
|
28
|
+
async get (key: Buffer): Promise<T | null> {
|
|
29
|
+
const result = await this._fileStore.get(key)
|
|
29
30
|
if (result && this.ignoreEntryFileCache && this.isEntryCache(result)) {
|
|
30
31
|
return null
|
|
31
32
|
}
|
|
32
33
|
return result
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
set (key: Buffer, value: any): void {
|
|
36
|
+
async set (key: Buffer, value: any): Promise<void> {
|
|
36
37
|
// fix: 样式文件不写缓存
|
|
37
38
|
if (value?.output?.[0]?.data?.functionMap?.names?.indexOf('ignoreStyleFileCache') > -1) {
|
|
38
39
|
return
|
|
39
40
|
}
|
|
40
|
-
this._fileStore.set(key, value)
|
|
41
|
+
return await this._fileStore.set(key, value)
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
clear (): void {
|
package/.eslintignore
DELETED