@tramvai/module-render 1.15.1 → 1.15.2
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,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var tslib = require('tslib');
|
|
4
|
-
var
|
|
4
|
+
var dependency = require('@tramvai/tools-migrate/lib/dependency');
|
|
5
5
|
|
|
6
6
|
var selfPackageJSON = require('../package.json');
|
|
7
7
|
var COMPLEX_OPTIONS = {
|
|
@@ -20,8 +20,8 @@ var _2AsyncUniversalToLazy = (function (_a) {
|
|
|
20
20
|
var printOptions = _c.printOptions;
|
|
21
21
|
var parsed = j(source);
|
|
22
22
|
var tramvaiReactImport;
|
|
23
|
-
var lazyImportName;
|
|
24
|
-
var legacyImportName;
|
|
23
|
+
var lazyImportName = '';
|
|
24
|
+
var legacyImportName = '';
|
|
25
25
|
var hasLegacyImport = false;
|
|
26
26
|
parsed.find(j.ImportDeclaration).forEach(function (imp) {
|
|
27
27
|
switch (imp.node.source.value) {
|
|
@@ -48,6 +48,9 @@ var _2AsyncUniversalToLazy = (function (_a) {
|
|
|
48
48
|
break;
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
+
if (!legacyImportName) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
51
54
|
if (hasLegacyImport) {
|
|
52
55
|
if (tramvaiReactImport) {
|
|
53
56
|
if (!lazyImportName) {
|
|
@@ -57,13 +60,10 @@ var _2AsyncUniversalToLazy = (function (_a) {
|
|
|
57
60
|
}
|
|
58
61
|
else {
|
|
59
62
|
lazyImportName = 'lazy';
|
|
60
|
-
|
|
63
|
+
parsed.addImport(j.importDeclaration([j.importSpecifier(j.identifier('lazy'))], j.stringLiteral('@tramvai/react')));
|
|
61
64
|
}
|
|
62
65
|
}
|
|
63
|
-
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
utils.replaceDependency({
|
|
66
|
+
dependency.replaceDependency({
|
|
67
67
|
packageJSON: packageJSON.source,
|
|
68
68
|
from: 'react-universal-component',
|
|
69
69
|
});
|
|
@@ -87,7 +87,9 @@ var _2AsyncUniversalToLazy = (function (_a) {
|
|
|
87
87
|
continue;
|
|
88
88
|
}
|
|
89
89
|
if (prop.key.name in COMPLEX_OPTIONS) {
|
|
90
|
-
prop.comments = [
|
|
90
|
+
prop.comments = [
|
|
91
|
+
j.commentBlock(COMPLEX_OPTIONS[prop.key.name]),
|
|
92
|
+
];
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
props.push(prop);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-render",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"browser": "lib/browser.js",
|
|
6
6
|
"main": "lib/server.js",
|
|
@@ -24,25 +24,25 @@
|
|
|
24
24
|
"@tinkoff/htmlpagebuilder": "0.4.22",
|
|
25
25
|
"@tinkoff/layout-factory": "0.2.27",
|
|
26
26
|
"@tinkoff/url": "0.7.36",
|
|
27
|
-
"@tinkoff/user-agent": "0.3.
|
|
28
|
-
"@tramvai/module-client-hints": "1.15.
|
|
29
|
-
"@tramvai/module-router": "1.15.
|
|
30
|
-
"@tramvai/react": "1.15.
|
|
27
|
+
"@tinkoff/user-agent": "0.3.112",
|
|
28
|
+
"@tramvai/module-client-hints": "1.15.2",
|
|
29
|
+
"@tramvai/module-router": "1.15.2",
|
|
30
|
+
"@tramvai/react": "1.15.2",
|
|
31
31
|
"@tramvai/safe-strings": "0.4.2",
|
|
32
|
-
"@tramvai/tokens-render": "1.15.
|
|
32
|
+
"@tramvai/tokens-render": "1.15.2",
|
|
33
33
|
"@types/loadable__server": "^5.12.6",
|
|
34
34
|
"node-fetch": "^2.6.1"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@tinkoff/dippy": "0.7.35",
|
|
38
38
|
"@tinkoff/utils": "^2.1.2",
|
|
39
|
-
"@tramvai/cli": "1.15.
|
|
40
|
-
"@tramvai/core": "1.15.
|
|
41
|
-
"@tramvai/module-common": "1.15.
|
|
42
|
-
"@tramvai/state": "1.15.
|
|
43
|
-
"@tramvai/test-helpers": "1.15.
|
|
44
|
-
"@tramvai/tokens-common": "1.15.
|
|
45
|
-
"@tramvai/tokens-router": "1.15.
|
|
39
|
+
"@tramvai/cli": "1.15.2",
|
|
40
|
+
"@tramvai/core": "1.15.2",
|
|
41
|
+
"@tramvai/module-common": "1.15.2",
|
|
42
|
+
"@tramvai/state": "1.15.2",
|
|
43
|
+
"@tramvai/test-helpers": "1.15.2",
|
|
44
|
+
"@tramvai/tokens-common": "1.15.2",
|
|
45
|
+
"@tramvai/tokens-router": "1.15.2",
|
|
46
46
|
"prop-types": "^15.6.2",
|
|
47
47
|
"react": ">=16.8.0",
|
|
48
48
|
"react-dom": ">=16.8.0",
|