@aiot-toolkit/parser 2.0.6-beta.11 → 2.0.6-beta.13
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.
|
@@ -109,7 +109,7 @@ function addPageTestCode(path, opts) {
|
|
|
109
109
|
// 1.b
|
|
110
110
|
if (path.node.declaration.type === 'ObjectExpression') {
|
|
111
111
|
const properties = path.node.declaration.properties;
|
|
112
|
-
|
|
112
|
+
insertFn('onTestStart', generateTestFn(testCaseConfig), properties);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -133,7 +133,7 @@ function getTestcaseConfig(filePath, opts, e2eConfig) {
|
|
|
133
133
|
* @param name 函数名
|
|
134
134
|
* @param body 函数体
|
|
135
135
|
*/
|
|
136
|
-
function
|
|
136
|
+
function insertFn(name, body, properties) {
|
|
137
137
|
const fun = properties.find(p => p.type === 'ObjectMethod' && p.key.name === name);
|
|
138
138
|
if (fun) {
|
|
139
139
|
fun.body.body.push(...body.body);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiot-toolkit/parser",
|
|
3
|
-
"version": "2.0.6-beta.
|
|
3
|
+
"version": "2.0.6-beta.13",
|
|
4
4
|
"description": "Parse the source code of aiot and convert it to the AST (Abstract Syntax Tree) of the target code.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aiot",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"test": "node ./__tests__/parser.test.js"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@aiot-toolkit/shared-utils": "2.0.6-beta.
|
|
23
|
+
"@aiot-toolkit/shared-utils": "2.0.6-beta.13",
|
|
24
24
|
"@babel/core": "^7.23.6",
|
|
25
25
|
"@babel/generator": "^7.24.10",
|
|
26
26
|
"@babel/parser": "^7.24.8",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"css-tree": "npm:aiot-css-tree@^2.3.1",
|
|
32
32
|
"csstree-validator": "^3.0.0",
|
|
33
33
|
"eslint": "^8.46.0",
|
|
34
|
-
"file-lane": "2.0.6-beta.
|
|
34
|
+
"file-lane": "2.0.6-beta.13",
|
|
35
35
|
"fs-extra": "^11.2.0",
|
|
36
36
|
"google-protobuf": "^3.21.2",
|
|
37
37
|
"less": "^4.2.0",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"@types/tinycolor2": "^1.4.6",
|
|
61
61
|
"babel-plugin-tester": "^11.0.4"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "a565cdee8e827a67b4043d9f872b7a6d933630db"
|
|
64
64
|
}
|