@ray-js/builder-mp 1.3.99-beta.3 → 1.4.0-alpha.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.
@@ -39,10 +39,7 @@ function insertSpecifierImport(program, imports, moduleName) {
|
|
39
39
|
const importDeclaration = t.importDeclaration(specifiers, t.stringLiteral(moduleName));
|
40
40
|
program.unshiftContainer('body', importDeclaration);
|
41
41
|
}
|
42
|
-
const contextTemplate = (0, template_1.default)(`
|
43
|
-
import hoistNonReactStatics from 'hoist-non-react-statics';
|
44
|
-
|
45
|
-
let id = forwardRef((props, ref) => {
|
42
|
+
const contextTemplate = (0, template_1.default)(`const id = forwardRef((props, ref) => {
|
46
43
|
const isClassType = (c) => c.prototype && typeof c.prototype.render === 'function';
|
47
44
|
const $instance = new PageInstance();
|
48
45
|
usePageEvent('onLoad', () => {
|
@@ -64,10 +61,7 @@ let id = forwardRef((props, ref) => {
|
|
64
61
|
{isClassType(compName) ? <compTag ref={ref} {...props}/> : <compTag {...props}/> }
|
65
62
|
</PageInstanceContext.Provider>
|
66
63
|
);
|
67
|
-
})
|
68
|
-
|
69
|
-
id = hoistNonReactStatics(id, compName);
|
70
|
-
`, {
|
64
|
+
});`, {
|
71
65
|
plugins: ['jsx'],
|
72
66
|
syntacticPlaceholders: false,
|
73
67
|
placeholderWhitelist: new Set(['id', 'compTag', 'compName', 'platform']),
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/builder-mp",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.4.0-alpha.0",
|
4
4
|
"description": "Ray builder for mini program",
|
5
5
|
"keywords": [
|
6
6
|
"ray"
|
@@ -26,14 +26,14 @@
|
|
26
26
|
"@babel/template": "^7.16.0",
|
27
27
|
"@babel/traverse": "^7.16.3",
|
28
28
|
"@babel/types": "^7.16.0",
|
29
|
-
"@ray-core/babel-preset-remax": "^0.3.
|
30
|
-
"@ray-core/build-store": "^0.3.
|
31
|
-
"@ray-core/cli": "^0.3.
|
32
|
-
"@ray-core/ray": "^0.3.
|
33
|
-
"@ray-js/adapter": "^1.
|
29
|
+
"@ray-core/babel-preset-remax": "^0.3.5",
|
30
|
+
"@ray-core/build-store": "^0.3.5",
|
31
|
+
"@ray-core/cli": "^0.3.5",
|
32
|
+
"@ray-core/ray": "^0.3.5",
|
33
|
+
"@ray-js/adapter": "^1.4.0-alpha.0",
|
34
34
|
"@ray-js/rjs-for-wechat": "^0.0.3",
|
35
|
-
"@ray-js/shared": "^1.
|
36
|
-
"@ray-js/types": "^1.
|
35
|
+
"@ray-js/shared": "^1.4.0-alpha.0",
|
36
|
+
"@ray-js/types": "^1.4.0-alpha.0",
|
37
37
|
"babel-loader": "^8.2.3",
|
38
38
|
"babel-plugin-minify-dead-code-elimination": "^0.5.1",
|
39
39
|
"babel-plugin-transform-prune-unused-imports": "^1.0.1",
|
@@ -41,7 +41,6 @@
|
|
41
41
|
"colors": "1.4.0",
|
42
42
|
"fs-extra": "^10.0.0",
|
43
43
|
"hash-replace": "^1.0.5",
|
44
|
-
"hoist-non-react-statics": "^3.3.1",
|
45
44
|
"postcss-units-transform": "^1.1.0",
|
46
45
|
"pretty-bytes": "^5.6.0",
|
47
46
|
"react": "^17.0.2",
|
@@ -51,7 +50,7 @@
|
|
51
50
|
"webpack-virtual-modules": "^0.4.4"
|
52
51
|
},
|
53
52
|
"devDependencies": {
|
54
|
-
"@ray-core/types": "^0.3.
|
53
|
+
"@ray-core/types": "^0.3.5",
|
55
54
|
"@types/jest": "^27.0.2",
|
56
55
|
"@types/node": "^16.9.1",
|
57
56
|
"babel-plugin-tester": "^10.1.0",
|
@@ -65,6 +64,6 @@
|
|
65
64
|
"email": "tuyafe@tuya.com"
|
66
65
|
}
|
67
66
|
],
|
68
|
-
"gitHead": "
|
67
|
+
"gitHead": "92a9834964bb74c3a3b0553438b0f0c7a77ad8d0",
|
69
68
|
"repository": {}
|
70
69
|
}
|