@modern-js/app-tools 2.34.1-alpha.1 → 2.35.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.
- package/dist/cjs/analyze/constants.js +0 -1
- package/dist/cjs/analyze/nestedRoutes.js +0 -9
- package/dist/esm/analyze/constants.js +0 -1
- package/dist/esm/analyze/nestedRoutes.js +1 -10
- package/dist/esm-node/analyze/constants.js +0 -1
- package/dist/esm-node/analyze/nestedRoutes.js +0 -9
- package/dist/types/analyze/constants.d.ts +0 -1
- package/package.json +24 -24
@@ -116,7 +116,6 @@ const NESTED_ROUTE = {
|
|
116
116
|
PAGE_DATA_FILE: "page.data",
|
117
117
|
PAGE_CLIENT_LOADER: "page.data.client",
|
118
118
|
SPLATE_FILE: "$",
|
119
|
-
SPLATE_CONFIG_FILE: "$.config",
|
120
119
|
SPLATE_LOADER_FILE: "$.loader",
|
121
120
|
SPLATE_DATA_FILE: "$.data",
|
122
121
|
SPLATE_CLIENT_DATA: "$.data.client",
|
@@ -124,7 +124,6 @@ const walk = async (dirname, rootDir, alias, entryName, isMainEntry, oldVersion)
|
|
124
124
|
let splatData = "";
|
125
125
|
let splatRoute = null;
|
126
126
|
let pageConfigFile = "";
|
127
|
-
let splatConfigFile = "";
|
128
127
|
const items = await _utils.fs.readdir(dirname);
|
129
128
|
for (const item of items) {
|
130
129
|
const itemPath = _path.join(dirname, item);
|
@@ -191,11 +190,6 @@ const walk = async (dirname, rootDir, alias, entryName, isMainEntry, oldVersion)
|
|
191
190
|
if (itemWithoutExt === _constants.NESTED_ROUTE.SPLATE_CLIENT_DATA) {
|
192
191
|
splatClientData = itemPath;
|
193
192
|
}
|
194
|
-
if (itemWithoutExt === _constants.NESTED_ROUTE.SPLATE_CONFIG_FILE) {
|
195
|
-
if (!route.config) {
|
196
|
-
splatConfigFile = itemPath;
|
197
|
-
}
|
198
|
-
}
|
199
193
|
if (itemWithoutExt === _constants.NESTED_ROUTE.SPLATE_DATA_FILE) {
|
200
194
|
splatData = itemPath;
|
201
195
|
}
|
@@ -214,9 +208,6 @@ const walk = async (dirname, rootDir, alias, entryName, isMainEntry, oldVersion)
|
|
214
208
|
if (splatData) {
|
215
209
|
splatRoute.data = splatData;
|
216
210
|
}
|
217
|
-
if (splatConfigFile) {
|
218
|
-
splatRoute.config = splatConfigFile;
|
219
|
-
}
|
220
211
|
(_route_children2 = route.children) === null || _route_children2 === void 0 ? void 0 : _route_children2.push(splatRoute);
|
221
212
|
}
|
222
213
|
if (itemWithoutExt === _constants.NESTED_ROUTE.LOADING_FILE) {
|
@@ -37,7 +37,6 @@ export var NESTED_ROUTE = {
|
|
37
37
|
PAGE_DATA_FILE: "page.data",
|
38
38
|
PAGE_CLIENT_LOADER: "page.data.client",
|
39
39
|
SPLATE_FILE: "$",
|
40
|
-
SPLATE_CONFIG_FILE: "$.config",
|
41
40
|
SPLATE_LOADER_FILE: "$.loader",
|
42
41
|
SPLATE_DATA_FILE: "$.data",
|
43
42
|
SPLATE_CLIENT_DATA: "$.data.client",
|
@@ -73,7 +73,7 @@ export var optimizeRoute = function(routeTree) {
|
|
73
73
|
};
|
74
74
|
export var walk = function() {
|
75
75
|
var _ref = _async_to_generator(function(dirname, rootDir, alias, entryName, isMainEntry, oldVersion) {
|
76
|
-
var _routePath, _finalRoute_children, isDirectory, relativeDir, pathSegments, lastSegment, isRoot, isPathlessLayout, isWithoutLayoutPath, routePath, route, pageLoaderFile, pageRoute, splatLoaderFile, splatClientData, splatData, splatRoute, pageConfigFile,
|
76
|
+
var _routePath, _finalRoute_children, isDirectory, relativeDir, pathSegments, lastSegment, isRoot, isPathlessLayout, isWithoutLayoutPath, routePath, route, pageLoaderFile, pageRoute, splatLoaderFile, splatClientData, splatData, splatRoute, pageConfigFile, items, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, item, itemPath, extname, itemWithoutExt, isDirectory1, childRoute, _route_children, _route_children1, _route_children2, err, finalRoute, childRoutes, childRoute1, _$path, optimizedRoutes;
|
77
77
|
return _ts_generator(this, function(_state) {
|
78
78
|
switch (_state.label) {
|
79
79
|
case 0:
|
@@ -123,7 +123,6 @@ export var walk = function() {
|
|
123
123
|
splatData = "";
|
124
124
|
splatRoute = null;
|
125
125
|
pageConfigFile = "";
|
126
|
-
splatConfigFile = "";
|
127
126
|
return [
|
128
127
|
4,
|
129
128
|
fs.readdir(dirname)
|
@@ -230,11 +229,6 @@ export var walk = function() {
|
|
230
229
|
if (itemWithoutExt === NESTED_ROUTE.SPLATE_CLIENT_DATA) {
|
231
230
|
splatClientData = itemPath;
|
232
231
|
}
|
233
|
-
if (itemWithoutExt === NESTED_ROUTE.SPLATE_CONFIG_FILE) {
|
234
|
-
if (!route.config) {
|
235
|
-
splatConfigFile = itemPath;
|
236
|
-
}
|
237
|
-
}
|
238
232
|
if (itemWithoutExt === NESTED_ROUTE.SPLATE_DATA_FILE) {
|
239
233
|
splatData = itemPath;
|
240
234
|
}
|
@@ -253,9 +247,6 @@ export var walk = function() {
|
|
253
247
|
if (splatData) {
|
254
248
|
splatRoute.data = splatData;
|
255
249
|
}
|
256
|
-
if (splatConfigFile) {
|
257
|
-
splatRoute.config = splatConfigFile;
|
258
|
-
}
|
259
250
|
(_route_children2 = route.children) === null || _route_children2 === void 0 ? void 0 : _route_children2.push(splatRoute);
|
260
251
|
}
|
261
252
|
if (itemWithoutExt === NESTED_ROUTE.LOADING_FILE) {
|
@@ -37,7 +37,6 @@ export const NESTED_ROUTE = {
|
|
37
37
|
PAGE_DATA_FILE: "page.data",
|
38
38
|
PAGE_CLIENT_LOADER: "page.data.client",
|
39
39
|
SPLATE_FILE: "$",
|
40
|
-
SPLATE_CONFIG_FILE: "$.config",
|
41
40
|
SPLATE_LOADER_FILE: "$.loader",
|
42
41
|
SPLATE_DATA_FILE: "$.data",
|
43
42
|
SPLATE_CLIENT_DATA: "$.data.client",
|
@@ -101,7 +101,6 @@ export const walk = async (dirname, rootDir, alias, entryName, isMainEntry, oldV
|
|
101
101
|
let splatData = "";
|
102
102
|
let splatRoute = null;
|
103
103
|
let pageConfigFile = "";
|
104
|
-
let splatConfigFile = "";
|
105
104
|
const items = await fs.readdir(dirname);
|
106
105
|
for (const item of items) {
|
107
106
|
const itemPath = path.join(dirname, item);
|
@@ -168,11 +167,6 @@ export const walk = async (dirname, rootDir, alias, entryName, isMainEntry, oldV
|
|
168
167
|
if (itemWithoutExt === NESTED_ROUTE.SPLATE_CLIENT_DATA) {
|
169
168
|
splatClientData = itemPath;
|
170
169
|
}
|
171
|
-
if (itemWithoutExt === NESTED_ROUTE.SPLATE_CONFIG_FILE) {
|
172
|
-
if (!route.config) {
|
173
|
-
splatConfigFile = itemPath;
|
174
|
-
}
|
175
|
-
}
|
176
170
|
if (itemWithoutExt === NESTED_ROUTE.SPLATE_DATA_FILE) {
|
177
171
|
splatData = itemPath;
|
178
172
|
}
|
@@ -191,9 +185,6 @@ export const walk = async (dirname, rootDir, alias, entryName, isMainEntry, oldV
|
|
191
185
|
if (splatData) {
|
192
186
|
splatRoute.data = splatData;
|
193
187
|
}
|
194
|
-
if (splatConfigFile) {
|
195
|
-
splatRoute.config = splatConfigFile;
|
196
|
-
}
|
197
188
|
(_route_children2 = route.children) === null || _route_children2 === void 0 ? void 0 : _route_children2.push(splatRoute);
|
198
189
|
}
|
199
190
|
if (itemWithoutExt === NESTED_ROUTE.LOADING_FILE) {
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.
|
18
|
+
"version": "2.35.0",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/index.d.ts",
|
21
21
|
"main": "./dist/cjs/index.js",
|
@@ -73,24 +73,24 @@
|
|
73
73
|
"esbuild": "0.17.19",
|
74
74
|
"rspack-plugin-virtual-module": "0.1.7",
|
75
75
|
"@swc/helpers": "0.5.1",
|
76
|
-
"@modern-js/builder
|
77
|
-
"@modern-js/builder-plugin-
|
78
|
-
"@modern-js/
|
79
|
-
"@modern-js/builder": "2.
|
80
|
-
"@modern-js/builder-
|
81
|
-
"@modern-js/
|
82
|
-
"@modern-js/
|
83
|
-
"@modern-js/
|
84
|
-
"@modern-js/plugin
|
85
|
-
"@modern-js/plugin-
|
86
|
-
"@modern-js/
|
87
|
-
"@modern-js/
|
88
|
-
"@modern-js/
|
89
|
-
"@modern-js/
|
90
|
-
"@modern-js/
|
91
|
-
"@modern-js/
|
92
|
-
"@modern-js/
|
93
|
-
"@modern-js/
|
76
|
+
"@modern-js/builder": "2.35.0",
|
77
|
+
"@modern-js/builder-plugin-esbuild": "2.35.0",
|
78
|
+
"@modern-js/builder-plugin-node-polyfill": "2.35.0",
|
79
|
+
"@modern-js/builder-shared": "2.35.0",
|
80
|
+
"@modern-js/builder-webpack-provider": "2.35.0",
|
81
|
+
"@modern-js/core": "2.35.0",
|
82
|
+
"@modern-js/new-action": "2.35.0",
|
83
|
+
"@modern-js/node-bundle-require": "2.35.0",
|
84
|
+
"@modern-js/plugin": "2.35.0",
|
85
|
+
"@modern-js/plugin-data-loader": "2.35.0",
|
86
|
+
"@modern-js/plugin-i18n": "2.35.0",
|
87
|
+
"@modern-js/plugin-lint": "2.35.0",
|
88
|
+
"@modern-js/prod-server": "2.35.0",
|
89
|
+
"@modern-js/server": "2.35.0",
|
90
|
+
"@modern-js/types": "2.35.0",
|
91
|
+
"@modern-js/upgrade": "2.35.0",
|
92
|
+
"@modern-js/utils": "2.35.0",
|
93
|
+
"@modern-js/server-core": "2.35.0"
|
94
94
|
},
|
95
95
|
"devDependencies": {
|
96
96
|
"@types/babel__traverse": "^7.14.2",
|
@@ -99,13 +99,13 @@
|
|
99
99
|
"jest": "^29",
|
100
100
|
"typescript": "^5",
|
101
101
|
"webpack": "^5.88.1",
|
102
|
-
"@modern-js/builder-plugin-swc": "2.
|
103
|
-
"@
|
104
|
-
"@
|
105
|
-
"@scripts/jest-config": "2.
|
102
|
+
"@modern-js/builder-plugin-swc": "2.35.0",
|
103
|
+
"@modern-js/builder-rspack-provider": "2.35.0",
|
104
|
+
"@scripts/build": "2.35.0",
|
105
|
+
"@scripts/jest-config": "2.35.0"
|
106
106
|
},
|
107
107
|
"peerDependencies": {
|
108
|
-
"@modern-js/builder-rspack-provider": "^2.
|
108
|
+
"@modern-js/builder-rspack-provider": "^2.35.0"
|
109
109
|
},
|
110
110
|
"peerDependenciesMeta": {
|
111
111
|
"@modern-js/builder-rspack-provider": {
|