@rangojs/router 0.0.0-experimental.c65e9248 → 0.0.0-experimental.ea6d5eec
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/bin/rango.js
CHANGED
|
@@ -1121,6 +1121,9 @@ function createVersionPlugin() {
|
|
|
1121
1121
|
if (!isDev) return;
|
|
1122
1122
|
const isRscModule = this.environment?.name === "rsc";
|
|
1123
1123
|
if (!isRscModule) return;
|
|
1124
|
+
if (ctx.modules.length === 1 && ctx.modules[0].id === "\0" + VIRTUAL_IDS.version) {
|
|
1125
|
+
return;
|
|
1126
|
+
}
|
|
1124
1127
|
if (isCodeModule(ctx.file)) {
|
|
1125
1128
|
const filePath = normalizeModuleId(ctx.file);
|
|
1126
1129
|
const previousSignature = clientModuleSignatures.get(filePath);
|
package/dist/vite/index.js
CHANGED
|
@@ -1745,7 +1745,7 @@ import { resolve } from "node:path";
|
|
|
1745
1745
|
// package.json
|
|
1746
1746
|
var package_default = {
|
|
1747
1747
|
name: "@rangojs/router",
|
|
1748
|
-
version: "0.0.0-experimental.
|
|
1748
|
+
version: "0.0.0-experimental.ea6d5eec",
|
|
1749
1749
|
description: "Django-inspired RSC router with composable URL patterns",
|
|
1750
1750
|
keywords: [
|
|
1751
1751
|
"react",
|
|
@@ -2752,6 +2752,9 @@ function createVersionPlugin() {
|
|
|
2752
2752
|
if (!isDev) return;
|
|
2753
2753
|
const isRscModule = this.environment?.name === "rsc";
|
|
2754
2754
|
if (!isRscModule) return;
|
|
2755
|
+
if (ctx.modules.length === 1 && ctx.modules[0].id === "\0" + VIRTUAL_IDS.version) {
|
|
2756
|
+
return;
|
|
2757
|
+
}
|
|
2755
2758
|
if (isCodeModule(ctx.file)) {
|
|
2756
2759
|
const filePath = normalizeModuleId(ctx.file);
|
|
2757
2760
|
const previousSignature = clientModuleSignatures.get(filePath);
|
package/package.json
CHANGED
|
@@ -166,6 +166,13 @@ export function createNavigationClient(
|
|
|
166
166
|
throw new ServerRedirect(redirect.url, undefined);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
+
if (!response.ok) {
|
|
170
|
+
resolveStreamComplete();
|
|
171
|
+
throw new Error(
|
|
172
|
+
`Partial RSC fetch failed: ${response.status} ${response.statusText}`,
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
|
|
169
176
|
return teeWithCompletion(
|
|
170
177
|
response,
|
|
171
178
|
() => {
|
|
@@ -352,7 +352,9 @@ export async function initBrowserApp(
|
|
|
352
352
|
console.log("[RSCRouter] HMR: RSC stream complete");
|
|
353
353
|
} catch (err) {
|
|
354
354
|
if (abort.signal.aborted) return;
|
|
355
|
-
|
|
355
|
+
console.warn("[RSCRouter] HMR: Refetch failed, reloading page", err);
|
|
356
|
+
window.location.reload();
|
|
357
|
+
return;
|
|
356
358
|
} finally {
|
|
357
359
|
if (hmrAbort === abort) hmrAbort = null;
|
|
358
360
|
streamingToken.end();
|
|
@@ -214,6 +214,15 @@ export function createVersionPlugin(): Plugin {
|
|
|
214
214
|
|
|
215
215
|
if (!isRscModule) return;
|
|
216
216
|
|
|
217
|
+
// Skip re-bumping when the version virtual module itself is invalidated
|
|
218
|
+
// (our own bumpVersion() invalidates it, which re-triggers hotUpdate).
|
|
219
|
+
if (
|
|
220
|
+
ctx.modules.length === 1 &&
|
|
221
|
+
ctx.modules[0].id === "\0" + VIRTUAL_IDS.version
|
|
222
|
+
) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
217
226
|
if (isCodeModule(ctx.file)) {
|
|
218
227
|
const filePath = normalizeModuleId(ctx.file);
|
|
219
228
|
const previousSignature = clientModuleSignatures.get(filePath);
|