@rangojs/router 0.0.0-experimental.138 → 0.0.0-experimental.139
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/README.md +273 -924
- package/dist/bin/rango.js +28 -14
- package/dist/vite/index.js +472 -77
- package/package.json +33 -19
- package/skills/comparison/SKILL.md +50 -0
- package/skills/comparison/agents/openai.yaml +4 -0
- package/skills/comparison/references/framework-comparison.md +837 -0
- package/skills/host-router/SKILL.md +45 -3
- package/skills/layout/SKILL.md +26 -9
- package/skills/middleware/SKILL.md +6 -2
- package/skills/observability/SKILL.md +23 -1
- package/skills/parallel/SKILL.md +11 -3
- package/skills/rango/SKILL.md +71 -23
- package/skills/route/SKILL.md +19 -3
- package/skills/router-setup/SKILL.md +1 -0
- package/skills/shell-manifest/SKILL.md +185 -0
- package/skills/vercel/SKILL.md +128 -0
- package/src/build/generate-route-types.ts +1 -0
- package/src/build/route-types/router-processing.ts +77 -27
- package/src/cache/index.ts +12 -0
- package/src/cache/vercel/index.ts +11 -0
- package/src/cache/vercel/vercel-cache-store.ts +948 -0
- package/src/host/errors.ts +15 -0
- package/src/host/index.ts +1 -0
- package/src/vercel/index.ts +11 -0
- package/src/vercel/tracing.ts +88 -0
- package/src/vite/discovery/state.ts +1 -1
- package/src/vite/index.ts +2 -0
- package/src/vite/plugin-types.ts +84 -2
- package/src/vite/plugins/vercel-output.ts +384 -0
- package/src/vite/plugins/virtual-entries.ts +72 -0
- package/src/vite/rango.ts +128 -21
- package/src/vite/utils/shared-utils.ts +52 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rangojs/router",
|
|
3
|
-
"version": "0.0.0-experimental.
|
|
3
|
+
"version": "0.0.0-experimental.139",
|
|
4
4
|
"description": "Django-inspired RSC router with composable URL patterns",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -115,6 +115,11 @@
|
|
|
115
115
|
"react-server": "./src/cloudflare/index.ts",
|
|
116
116
|
"default": "./src/cloudflare/index.ts"
|
|
117
117
|
},
|
|
118
|
+
"./vercel": {
|
|
119
|
+
"types": "./src/vercel/index.ts",
|
|
120
|
+
"react-server": "./src/vercel/index.ts",
|
|
121
|
+
"default": "./src/vercel/index.ts"
|
|
122
|
+
},
|
|
118
123
|
"./theme": {
|
|
119
124
|
"types": "./src/theme/index.ts",
|
|
120
125
|
"default": "./src/theme/index.ts"
|
|
@@ -162,17 +167,6 @@
|
|
|
162
167
|
"access": "public",
|
|
163
168
|
"tag": "experimental"
|
|
164
169
|
},
|
|
165
|
-
"scripts": {
|
|
166
|
-
"build": "pnpm exec esbuild src/vite/index.ts --bundle --format=esm --outfile=dist/vite/index.js --platform=node --packages=external && mkdir -p dist/vite/plugins && cp src/vite/plugins/cloudflare-protocol-loader-hook.mjs dist/vite/plugins/cloudflare-protocol-loader-hook.mjs && pnpm exec esbuild src/testing/vitest.ts --bundle --format=esm --outfile=dist/testing/vitest.js --platform=node --packages=external && pnpm exec esbuild src/bin/rango.ts --bundle --format=esm --outfile=dist/bin/rango.js --platform=node --packages=external --banner:js='#!/usr/bin/env node' && chmod +x dist/bin/rango.js",
|
|
167
|
-
"prepublishOnly": "pnpm build",
|
|
168
|
-
"typecheck": "tsc --noEmit && tsc -p tsconfig.strict-check.json --noEmit && tsc -p tsconfig.augment-check.json --noEmit",
|
|
169
|
-
"test": "playwright test",
|
|
170
|
-
"test:ui": "playwright test --ui",
|
|
171
|
-
"test:hmr-local": "playwright test --project=dev-warmup --project=hmr-routes --project=hmr-basename --project=hmr-prerender --no-deps --workers=1",
|
|
172
|
-
"test:unit": "vitest run",
|
|
173
|
-
"test:unit:watch": "vitest",
|
|
174
|
-
"test:unit:rsc": "vitest run --config vitest.rsc.config.ts"
|
|
175
|
-
},
|
|
176
170
|
"dependencies": {
|
|
177
171
|
"@types/debug": "^4.1.12",
|
|
178
172
|
"@vitejs/plugin-rsc": "^0.5.27",
|
|
@@ -180,28 +174,32 @@
|
|
|
180
174
|
"magic-string": "^0.30.17",
|
|
181
175
|
"picomatch": "^4.0.4",
|
|
182
176
|
"rsc-html-stream": "^0.0.7",
|
|
177
|
+
"srvx": "^0.11.15",
|
|
183
178
|
"tinyexec": "^0.3.2"
|
|
184
179
|
},
|
|
185
180
|
"devDependencies": {
|
|
181
|
+
"@opentelemetry/api": "^1.9.0",
|
|
186
182
|
"@playwright/test": "^1.49.1",
|
|
187
|
-
"@shared/e2e": "workspace:*",
|
|
188
183
|
"@testing-library/dom": "^10.4.1",
|
|
189
184
|
"@testing-library/react": "^16.3.2",
|
|
190
185
|
"@types/node": "^24.10.1",
|
|
191
|
-
"@types/react": "
|
|
192
|
-
"@types/react-dom": "
|
|
186
|
+
"@types/react": "^19.2.7",
|
|
187
|
+
"@types/react-dom": "^19.2.3",
|
|
193
188
|
"esbuild": "^0.28.1",
|
|
194
189
|
"happy-dom": "^20.10.1",
|
|
195
190
|
"jiti": "^2.6.1",
|
|
196
|
-
"react": "
|
|
197
|
-
"react-dom": "
|
|
191
|
+
"react": "^19.2.6",
|
|
192
|
+
"react-dom": "^19.2.6",
|
|
198
193
|
"typescript": "^5.3.0",
|
|
199
|
-
"vitest": "^4.1.9"
|
|
194
|
+
"vitest": "^4.1.9",
|
|
195
|
+
"@shared/e2e": "0.0.1"
|
|
200
196
|
},
|
|
201
197
|
"peerDependencies": {
|
|
202
198
|
"@cloudflare/vite-plugin": "^1.42.1",
|
|
199
|
+
"@opentelemetry/api": "^1.9.0",
|
|
203
200
|
"@playwright/test": "^1.49.1",
|
|
204
201
|
"@testing-library/react": ">=16",
|
|
202
|
+
"@vercel/functions": "^3.0.0",
|
|
205
203
|
"@vitejs/plugin-rsc": "^0.5.27",
|
|
206
204
|
"react": ">=19.2.6 <20",
|
|
207
205
|
"react-dom": ">=19.2.6 <20",
|
|
@@ -212,12 +210,18 @@
|
|
|
212
210
|
"@cloudflare/vite-plugin": {
|
|
213
211
|
"optional": true
|
|
214
212
|
},
|
|
213
|
+
"@opentelemetry/api": {
|
|
214
|
+
"optional": true
|
|
215
|
+
},
|
|
215
216
|
"@playwright/test": {
|
|
216
217
|
"optional": true
|
|
217
218
|
},
|
|
218
219
|
"@testing-library/react": {
|
|
219
220
|
"optional": true
|
|
220
221
|
},
|
|
222
|
+
"@vercel/functions": {
|
|
223
|
+
"optional": true
|
|
224
|
+
},
|
|
221
225
|
"vite": {
|
|
222
226
|
"optional": true
|
|
223
227
|
},
|
|
@@ -227,5 +231,15 @@
|
|
|
227
231
|
},
|
|
228
232
|
"engines": {
|
|
229
233
|
"node": "^20.19.0 || >=22.12.0"
|
|
234
|
+
},
|
|
235
|
+
"scripts": {
|
|
236
|
+
"build": "pnpm exec esbuild src/vite/index.ts --bundle --format=esm --outfile=dist/vite/index.js --platform=node --packages=external && mkdir -p dist/vite/plugins && cp src/vite/plugins/cloudflare-protocol-loader-hook.mjs dist/vite/plugins/cloudflare-protocol-loader-hook.mjs && pnpm exec esbuild src/testing/vitest.ts --bundle --format=esm --outfile=dist/testing/vitest.js --platform=node --packages=external && pnpm exec esbuild src/bin/rango.ts --bundle --format=esm --outfile=dist/bin/rango.js --platform=node --packages=external --banner:js='#!/usr/bin/env node' && chmod +x dist/bin/rango.js",
|
|
237
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.strict-check.json --noEmit && tsc -p tsconfig.augment-check.json --noEmit",
|
|
238
|
+
"test": "playwright test",
|
|
239
|
+
"test:ui": "playwright test --ui",
|
|
240
|
+
"test:hmr-local": "playwright test --project=dev-warmup --project=hmr-routes --project=hmr-basename --project=hmr-prerender --no-deps --workers=1",
|
|
241
|
+
"test:unit": "vitest run",
|
|
242
|
+
"test:unit:watch": "vitest",
|
|
243
|
+
"test:unit:rsc": "vitest run --config vitest.rsc.config.ts"
|
|
230
244
|
}
|
|
231
|
-
}
|
|
245
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: comparison
|
|
3
|
+
description: Compare Rango with Next.js App Router, TanStack Start, and Waku. Use when evaluating React frameworks, explaining why Rango, writing positioning or adoption guidance, answering migration questions, or checking claims about Rango's routing, loaders, caching, rendering, prefetching, safety, testing, observability, and production behavior.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Compare Rango with other React frameworks
|
|
7
|
+
|
|
8
|
+
Use the canonical [framework comparison](references/framework-comparison.md) as
|
|
9
|
+
the factual baseline. Read the sections relevant to the question; read the full
|
|
10
|
+
reference when producing an overall evaluation or editing the comparison itself.
|
|
11
|
+
|
|
12
|
+
## Comparison rules
|
|
13
|
+
|
|
14
|
+
1. Compare capabilities and architecture separately from ecosystem size, hiring,
|
|
15
|
+
integrations, and organizational familiarity.
|
|
16
|
+
2. Present Rango's range clearly: start with `path()` and a component, then add
|
|
17
|
+
named routes, `include()`, loaders, caching, `revalidate()`, slots, intercepts,
|
|
18
|
+
safety, and diagnostics in the same declared route graph.
|
|
19
|
+
3. Do not confuse Rango's `revalidate()` with cache invalidation. Cache APIs decide
|
|
20
|
+
stored-value freshness; `revalidate()` decides client render selection.
|
|
21
|
+
4. Describe loaders as live-by-default RSC data slots beneath cached or prerendered
|
|
22
|
+
UI, not as renamed Remix or TanStack route loaders.
|
|
23
|
+
5. Include production correctness where relevant: Rango State, userland client-cache
|
|
24
|
+
invalidation, deployment-skew recovery, tainted request context, CSP nonce
|
|
25
|
+
propagation, default CSRF origin checks, prefetch guards, testing, and timing.
|
|
26
|
+
6. State boundaries and tradeoffs. In particular, distinguish origin checking from
|
|
27
|
+
token-based CSRF protection, nonce plumbing from application-owned CSP policy,
|
|
28
|
+
and reload-based skew recovery from Vercel deployment pinning.
|
|
29
|
+
7. Credit competing frameworks where they lead. Next.js leads in ecosystem and
|
|
30
|
+
hiring, TanStack in search-param ergonomics and client/data devtools, and Waku
|
|
31
|
+
in minimal surface area.
|
|
32
|
+
|
|
33
|
+
## Currency and evidence
|
|
34
|
+
|
|
35
|
+
- Treat Rango identifiers and behavior as source-verifiable. Check the current
|
|
36
|
+
package source or the relevant Rango skill when changing a precise claim.
|
|
37
|
+
- Competitor details age quickly. Before publishing or materially revising a claim,
|
|
38
|
+
verify it against current official documentation and link that primary source.
|
|
39
|
+
- Do not weaken a current, sourced claim merely because an older model remembers a
|
|
40
|
+
previous release. Check first: examples include TanStack Start's Rsbuild support,
|
|
41
|
+
Next.js `proxy.ts` and Cache Components, and Waku handler interceptors.
|
|
42
|
+
- Avoid declaring a framework universally "better." State which model fits the
|
|
43
|
+
application's constraints and why.
|
|
44
|
+
|
|
45
|
+
## Output shape
|
|
46
|
+
|
|
47
|
+
Lead with the decision or differentiator. For a short answer, use the TL;DR and the
|
|
48
|
+
relevant framework-specific paragraph from the reference. For a decision memo,
|
|
49
|
+
cover the at-a-glance table, the simple-to-complex growth path, substantive runtime
|
|
50
|
+
differences, and the section where competitors still lead.
|