@bleedingdev/modern-js-plugin-tanstack 3.2.0-ultramodern.16 → 3.2.0-ultramodern.17
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.
|
@@ -272,7 +272,11 @@ function createRouteStaticData(opts: {
|
|
|
272
272
|
modernRouteAction?: unknown;
|
|
273
273
|
modernRouteLoader?: unknown;
|
|
274
274
|
}) {
|
|
275
|
-
const staticData:
|
|
275
|
+
const staticData: {
|
|
276
|
+
modernRouteId?: string;
|
|
277
|
+
modernRouteAction?: unknown;
|
|
278
|
+
modernRouteLoader?: unknown;
|
|
279
|
+
} = {};
|
|
276
280
|
|
|
277
281
|
if (opts.modernRouteId) {
|
|
278
282
|
staticData.modernRouteId = opts.modernRouteId;
|
|
@@ -286,7 +290,7 @@ function createRouteStaticData(opts: {
|
|
|
286
290
|
staticData.modernRouteAction = opts.modernRouteAction;
|
|
287
291
|
}
|
|
288
292
|
|
|
289
|
-
return
|
|
293
|
+
return staticData;
|
|
290
294
|
}
|
|
291
295
|
|
|
292
296
|
function modernLoaderToTanstack<TLoader extends (args: any) => any>(
|
|
@@ -233,7 +233,11 @@ function createRouteStaticData(opts: {
|
|
|
233
233
|
modernRouteAction?: unknown;
|
|
234
234
|
modernRouteLoader?: unknown;
|
|
235
235
|
}) {
|
|
236
|
-
const staticData:
|
|
236
|
+
const staticData: {
|
|
237
|
+
modernRouteId?: string;
|
|
238
|
+
modernRouteAction?: unknown;
|
|
239
|
+
modernRouteLoader?: unknown;
|
|
240
|
+
} = {};
|
|
237
241
|
|
|
238
242
|
if (opts.modernRouteId) {
|
|
239
243
|
staticData.modernRouteId = opts.modernRouteId;
|
|
@@ -247,7 +251,7 @@ function createRouteStaticData(opts: {
|
|
|
247
251
|
staticData.modernRouteAction = opts.modernRouteAction;
|
|
248
252
|
}
|
|
249
253
|
|
|
250
|
-
return
|
|
254
|
+
return staticData;
|
|
251
255
|
}
|
|
252
256
|
|
|
253
257
|
function modernLoaderToTanstack<TLoader extends (args: any) => any>(
|
|
@@ -234,7 +234,11 @@ function createRouteStaticData(opts: {
|
|
|
234
234
|
modernRouteAction?: unknown;
|
|
235
235
|
modernRouteLoader?: unknown;
|
|
236
236
|
}) {
|
|
237
|
-
const staticData:
|
|
237
|
+
const staticData: {
|
|
238
|
+
modernRouteId?: string;
|
|
239
|
+
modernRouteAction?: unknown;
|
|
240
|
+
modernRouteLoader?: unknown;
|
|
241
|
+
} = {};
|
|
238
242
|
|
|
239
243
|
if (opts.modernRouteId) {
|
|
240
244
|
staticData.modernRouteId = opts.modernRouteId;
|
|
@@ -248,7 +252,7 @@ function createRouteStaticData(opts: {
|
|
|
248
252
|
staticData.modernRouteAction = opts.modernRouteAction;
|
|
249
253
|
}
|
|
250
254
|
|
|
251
|
-
return
|
|
255
|
+
return staticData;
|
|
252
256
|
}
|
|
253
257
|
|
|
254
258
|
function modernLoaderToTanstack<TLoader extends (args: any) => any>(
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"modern.js",
|
|
19
19
|
"tanstack-router"
|
|
20
20
|
],
|
|
21
|
-
"version": "3.2.0-ultramodern.
|
|
21
|
+
"version": "3.2.0-ultramodern.17",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=20"
|
|
24
24
|
},
|
|
@@ -88,13 +88,13 @@
|
|
|
88
88
|
"@swc/helpers": "^0.5.21",
|
|
89
89
|
"@tanstack/react-router": "1.170.1",
|
|
90
90
|
"@tanstack/router-core": "1.170.1",
|
|
91
|
-
"@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.2.0-ultramodern.
|
|
92
|
-
"@modern-js/runtime-utils": "npm:@bleedingdev/modern-js-runtime-utils@3.2.0-ultramodern.
|
|
93
|
-
"@modern-js/
|
|
94
|
-
"@modern-js/
|
|
91
|
+
"@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.2.0-ultramodern.17",
|
|
92
|
+
"@modern-js/runtime-utils": "npm:@bleedingdev/modern-js-runtime-utils@3.2.0-ultramodern.17",
|
|
93
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.2.0-ultramodern.17",
|
|
94
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.2.0-ultramodern.17"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
|
-
"@modern-js/runtime": "3.2.0-ultramodern.
|
|
97
|
+
"@modern-js/runtime": "3.2.0-ultramodern.17",
|
|
98
98
|
"react": "^19.2.6",
|
|
99
99
|
"react-dom": "^19.2.6"
|
|
100
100
|
},
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
"@typescript/native-preview": "7.0.0-dev.20260516.1",
|
|
110
110
|
"react": "^19.2.6",
|
|
111
111
|
"react-dom": "^19.2.6",
|
|
112
|
-
"@modern-js/app-tools": "npm:@bleedingdev/modern-js-app-tools@3.2.0-ultramodern.
|
|
113
|
-
"@
|
|
114
|
-
"@
|
|
112
|
+
"@modern-js/app-tools": "npm:@bleedingdev/modern-js-app-tools@3.2.0-ultramodern.17",
|
|
113
|
+
"@modern-js/runtime": "npm:@bleedingdev/modern-js-runtime@3.2.0-ultramodern.17",
|
|
114
|
+
"@scripts/rstest-config": "2.66.0"
|
|
115
115
|
},
|
|
116
116
|
"sideEffects": false,
|
|
117
117
|
"publishConfig": {
|
package/src/cli/tanstackTypes.ts
CHANGED
|
@@ -396,7 +396,11 @@ function createRouteStaticData(opts: {
|
|
|
396
396
|
modernRouteAction?: unknown;
|
|
397
397
|
modernRouteLoader?: unknown;
|
|
398
398
|
}) {
|
|
399
|
-
const staticData:
|
|
399
|
+
const staticData: {
|
|
400
|
+
modernRouteId?: string;
|
|
401
|
+
modernRouteAction?: unknown;
|
|
402
|
+
modernRouteLoader?: unknown;
|
|
403
|
+
} = {};
|
|
400
404
|
|
|
401
405
|
if (opts.modernRouteId) {
|
|
402
406
|
staticData.modernRouteId = opts.modernRouteId;
|
|
@@ -410,7 +414,7 @@ function createRouteStaticData(opts: {
|
|
|
410
414
|
staticData.modernRouteAction = opts.modernRouteAction;
|
|
411
415
|
}
|
|
412
416
|
|
|
413
|
-
return
|
|
417
|
+
return staticData;
|
|
414
418
|
}
|
|
415
419
|
|
|
416
420
|
function modernLoaderToTanstack<TLoader extends (args: any) => any>(
|
|
@@ -55,6 +55,10 @@ describe('tanstack router type generation', () => {
|
|
|
55
55
|
);
|
|
56
56
|
expect(routerGenTs).toContain('modernRouteLoader: loader_0');
|
|
57
57
|
expect(routerGenTs).toContain('modernRouteAction: action_0');
|
|
58
|
+
expect(routerGenTs).toContain('modernRouteId?: string;');
|
|
59
|
+
expect(routerGenTs).not.toContain(
|
|
60
|
+
'return Object.keys(staticData).length > 0 ? staticData : undefined;',
|
|
61
|
+
);
|
|
58
62
|
expect(routerGenTs).toContain(
|
|
59
63
|
"} from '@modern-js/plugin-tanstack/runtime';",
|
|
60
64
|
);
|