Repository navigation
fix(analyzer): sisa temuan audit — alias/graph, analyzer non-JS, detector - #108
Merged
Merged
Conversation
…rt graph Alias loading used plain JSON.parse on the root tsconfig only, so JSONC configs, `extends`, `baseUrl`, project `references`, workspace sub-package configs and SvelteKit's $lib were all silently dropped, and an exact alias (`@config`) swallowed longer specifiers (`@configuration/x`). - aliasResolver: parse JSONC via ts.parseConfigFileTextToJson, follow extends/references, honour baseUrl, scope mappings to the declaring config, longest-pattern-wins, exact aliases, $lib default for SvelteKit - dependencyGraph: dedupe edges, drop self-edges, dynamic import(), .jsx/.mts/ .cts resolution, relative imports above the root no longer match root files - tsMorphAnalyzer: dynamic import(), import = require(), import() types, destructured const names, overload signatures listed once - filterEngine: nested .gitignore, case-insensitive extensions, .env matching by file name instead of prefix, cache cleared per scan Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019HJc4sv9pSLh7vhduSUxBE
… and Java The heuristic analyzer ran JS-syntax regexes over every language it claims to support, so .py/.php/.go/.rb/.cs/.java files always had empty imports and exports, and docstring text produced bogus symbols (`class of`). - per-language readers with comment/docstring stripping that keeps string literals (a `//` in a URL no longer hides code) - Python relative imports become path-style specifiers; the graph resolves them plus absolute dotted modules (root and src/ layouts, __init__.py) - Ruby require_relative and relative PHP require/include become edges - JS-family files handled by this analyzer also pick up dynamic import() Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019HJc4sv9pSLh7vhduSUxBE
- package.json with a UTF-8 BOM no longer empties every manifest detector
- @vue/cli-service (not vue-cli-service) marks a Vue app
- npm init's default "main" no longer turns an Express/Next app into a
'library' with framework unknown
- barrel index files that the app imports are no longer entry points; only
production importers count, so tests importing src/index.ts do not demote it
- sample/doc folders are only excluded at repo or workspace level, so a
src/features/demo or src/docs feature is analysed; spec/test patterns cover
.mts/.cts and Python/Go test files
- routes: pages/index is '/', export { h as GET } and export const { GET } =
handlers report methods, Nuxt server/api + server/routes, express mounts
with middleware and multi-level router nesting
- file scope: root test/ folders are tests; .svelte/.vue/.astro and
+page/+layout files under routes/ are UI
- projectMap: fingerprint no longer depends on locale, escape entity slug in
the CRUD flow regex, fix the db/ data-layer pattern, drop devmap-only
projectMap/filescanner purposes that mislabelled other projects
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. 1 Skipped Deployment
|
✅ 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 previously 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
Sisa temuan audit analyzer (setelah #107), dijadikan satu branch, satu commit per kelompok + regression test. Semua test baru sudah diverifikasi gagal di source lama dan lulus di source baru. Suite: 281 → 324 test, semuanya hijau;
build:cli,build:web,test:package-e2elulus.1. Graph / alias / ignore (
06db2c9)extends,baseUrl,references(gaya Vite), tsconfig per workspace (apps/*,packages/*),$libSvelteKit, exact alias (@configtidak lagi menelan@configuration/x), longest-pattern-wins.import()dinamis,.jsx/.mts/.cts,../xdi atas root tidak lagi cocok ke file root.import(),import x = require(),import("x").T, nama const hasil destructuring, overload dihitung sekali..gitignorebersarang, ekstensi case-insensitive,.envdicocokkan per nama file (.envrctidak ikut terbuang), cache gitignore di-reset tiap scan.2. Analyzer non-JS (
c67087e).py/.rb/.php/.go/.cs/.javasebelumnya selalu imports kosong dan simbol sampah (class ofdari docstring). Sekarang ada reader per bahasa (komentar/docstring dibuang tapi string literal dijaga). Edge graph untuk Python (relatif + dotted module, layout root/src/), Rubyrequire_relative, PHPrequirerelatif. Go/C#/Java: import terbaca tapi belum jadi edge (butuhgo.mod/namespace resolution).3. Detector (
73ec7fa)BOM
package.json,@vue/cli-service,"main"bawaannpm inittidak lagi mengubah app Express jadi "library", barrelindex.tsbukan entry point (devmap sendiri: 9 dari 12 entry point adalah barrel → sekarang 3 entry nyata), sample/docs folder hanya dikecualikan di level repo/workspace, route:pages/index=/,export { h as GET },export const { GET } = handlers, Nuxtserver/api, mount Express dengan middleware dan nested router; scope file:test/di root,.svelte/+pagebukanapi; fingerprint tidak bergantung locale.Sengaja tidak dikerjakan
astro/tailwind/typescript(termasuk advisory critical astro diapps/web) — perlu PR sendiri.projectmap/filescanner/analyzerregistrydiprojectMap.ts: masih hardcode nama devmap, tapi test agent-navigation mengunci perilakunya; ubah bareng penyesuaian test.Cara cek
devmap analyze --freshdi repo ini: 319 file, 467 edge, entry pointpackages/cli/src/index.ts,apps/web/src/pages/{index,docs}.astro.Generated by Claude Code