Repository navigation
Warn when -e names an unsupported extension (#98) - #100
Merged
Merged
Conversation
`graft build -e ".vue"` used to accept any extension, index zero .vue files,
and exit 0 with no signal — so -e (the natural way to probe what's supported)
answered wrong. Now the CLI validates each -e value against the parser set
(depth EXTENSIONS ∪ breadth GENERIC_LANGS) and warns on any it can't parse,
listing the full supported set so the flag also answers "what IS supported":
⚠ -e ".vue": no parser registered for this extension — ignoring it.
supported: .c .cc .cjs .cpp .cs .cts ... .ts .tsx .zig
- extract.ts/generic.ts expose depthExtensions()/genericExtensions().
- source-files.ts adds supportedExtensions() + unsupportedExtensions() (leading
dot optional, case-insensitive).
- cli.ts warns (never fails) on build AND check; -e help now points to the set.
Warning only — the build still proceeds on the remaining supported files. 629
tests (+3). Does not add .vue support itself (that's #97).
FrancescoMerenda
pushed a commit
to FrancescoMerenda/Graft
that referenced
this pull request
Sep 7, 2026
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.
Fixes #98.
Problem
graft build -e ".vue"accepts any extension, indexes zero.vue, and exits 0 with no warning — so-e(the natural way a user probes what's supported) silently answers wrong.Fix
Validate each
-evalue against the actual parser set — depthEXTENSIONS(extract.ts) ∪ breadthGENERIC_LANGSexts (generic.ts) — and warn (never fail) on any with no parser, listing the supported set so-enow also answers "what is supported":depthExtensions()/genericExtensions()expose each tier's set;supportedExtensions()+unsupportedExtensions()(leading-dot-optional, case-insensitive) in source-files.ts.buildandcheck;-ehelp text now points to the supported set.629 tests (+3 covering the set, the
.vuerepro, and normalization). Verified the exact reported command now emits the warning.This is the standalone half of the report.
.vuesupport is the separate feature in #97.