Repository navigation
Add Remix, React Router, TanStack, Expo Router, Hono + bundler-config aliases - #114
Merged
Merged
Conversation
… aliases Frameworks - Detect Remix, React Router v7 (framework mode), TanStack Router/Start, Expo Router and Hono; the meta-frameworks rank above plain react - Route detectors for each: Remix flat/folder routes, React Router app/routes.ts from the syntax tree, TanStack file routes (ids + server handlers), Expo app/ (groups, +api), Hono (chains, basePath, route() across files, on, zod-openapi) - The new detectors find their own projects, so a monorepo lists routes for every frontend instead of only the framework that won the slot - Shared route helpers moved to routeUtils.ts - Remix route folders (app/routes/x/route.tsx) are no longer mistaken for Next route handlers Graph - Aliases declared only in bundler config (Vite/Vitest/webpack/Rollup/Astro, svelte.config kit.alias, nuxt.config alias, next.config webpack hook) are read from the syntax tree and scoped to their directory - Entry points: React Router/Remix routes, TanStack __root/router, Expo _layout; generated files (*.gen.ts) no longer count as importers Tests: 23 new in js-ts-frameworks.test.ts (379 total). Docs, README, CLAUDE.md and CHANGELOG updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019HJc4sv9pSLh7vhduSUxBE
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Welcome ke DevMap!Terima kasih sudah buat PR. Pastikan checklist ini terpenuhi sebelum review:
CI akan jalan otomatis pada setiap update. Kalau gagal, akan muncul link run di komentar ini. Kalau DevMap membantu, tolong star ya: https://github.com/itsflaid/devmap Terima kasih kontribusinya! 🙏 |
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ringkasan
Lanjutan fokus JS/TS: framework yang sebelumnya terbaca "react"/"unknown" dengan 0 route sekarang terdeteksi dan di-map, plus alias yang hanya ada di config bundler ikut dibaca.
Framework + route baru
notes.$id,_auth.login,posts_.$id,($lang),$splat,[.]), folder routes,remix-flat-routes; modul tanpa default export = resource route (loader→ GET,action→ POST)app/routes.tsdibaca dari AST:route/index/layout/prefix, nesting, spread, array di variabel,flatRoutes()createFileRoute('/…')(bukan dari nama file), pathless/(group)/_trailing,.lazy,routeTree.gen.tsdiabaikan;server.handlersStart → API route + methodapp//src/app//rootdi app.json,(group),[id],+api,_layoutbukan screen,about.web.tsx= screen yang samanew Hono()chain,basePath,route()lintas file,on, param:id{regex},@hono/zod-openapiDetector baru mencari proyeknya sendiri, jadi monorepo sekarang dapat route semua frontend (bukan cuma pemenang slot frontend tunggal).
Alias dari config bundler
resolve.alias(Vite/Vitest/webpack/Rollup, Astro lewatvite),kit.alias(svelte.config),alias(nuxt.config),config.resolve.alias[...] =(hook webpack next.config). Dibaca dari AST, tidak dieksekusi; bentuk object dan[{ find, replacement }]; nilai dilipat daripath.resolve(__dirname, …),fileURLToPath(new URL(…)), template string, konstanta. Nilai yang tidak bisa dihitung (env var, helper asing) dilewati. Scoped per folder config,optional, dan tsconfig tetap menang.Lain-lain
app/routes.ts, route module Remix/RR, TanStack__root/router, Expo_layout; file generated (*.gen.ts) tidak dihitung sebagai importer.app/routes/blog/route.tsx) tidak lagi dikira Next route handler.routeUtils.ts.Sebelum → sesudah (repo contoh nyata)
remix, 8 route (2 API)react-router,/+ entryapp/routes.tstanstack-start, 13 route (3 API), entry__root,router.tsxtanstack-router, 6 route/api/hello POSTikut terbacaRepo non-terkait (commerce, elk) hasilnya identik dengan sebelum perubahan.
Test
test/js-ts-frameworks.test.ts(deteksi, tiap framework, monorepo, alias bundler); total 379 lulustsc --noEmit,build:cli,build:web,test:package-e2elulusBatasan (didokumentasikan di CLAUDE.md)
Hono yang dibuat lewat fungsi factory, TanStack code-based routing, dan
createBrowserRouterReact Router belum diikuti. Alias JestmoduleNameMapper/Parcel belum dibaca.Generated by Claude Code