pastoria 2.0.0 → 2.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pastoria",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Pastoria Development CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -40,7 +40,7 @@
40
40
  "relay-compiler": "^20.1.1",
41
41
  "typescript": "^5.9.3",
42
42
  "zod": "^3.25.76",
43
- "pastoria-runtime": "1.1.0"
43
+ "pastoria-runtime": "1.1.1"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "babel-plugin-react-compiler": "^1.0.0",
@@ -226,11 +226,6 @@ export async function router__loadEntryPoint(
226
226
  params: initialLocation.params(),
227
227
  });
228
228
 
229
- // Recursively load all nested entry point modules.
230
- // This ensures their queries get registered in PreloadableQueryRegistry
231
- // before the server tries to serialize them.
232
- await loadNestedEntryPointModules(ep);
233
-
234
229
  return ep;
235
230
  }
236
231
 
@@ -238,17 +233,6 @@ export async function router__loadEntryPoint(
238
233
  * Recursively load all nested entry point modules so their queries
239
234
  * get registered in PreloadableQueryRegistry.
240
235
  */
241
- async function loadNestedEntryPointModules(
242
- entryPoint: AnyPreloadedEntryPoint | null,
243
- ): Promise<void> {
244
- if (!entryPoint) return;
245
- for (const nestedEntry of Object.values(entryPoint.entryPoints ?? {})) {
246
- if (nestedEntry.rootModuleID) {
247
- await JSResource.fromModuleId(nestedEntry.rootModuleID as any).load();
248
- }
249
- await loadNestedEntryPointModules(nestedEntry);
250
- }
251
- }
252
236
 
253
237
  interface RouterContextValue {
254
238
  location: RouterLocation;
@@ -332,6 +316,9 @@ export function router__createAppFromEntryPoint(
332
316
  );
333
317
 
334
318
  useMemo(() => {
319
+ // Skip during SSR - entry point is already loaded before rendering
320
+ if (typeof window === 'undefined') return;
321
+
335
322
  const route = location.route();
336
323
  if (route) {
337
324
  // Cast needed for same reason as loadRouteEntryPoint - see that function's docs