fix(cli): accept a folder wherever a file or a glob is expected #318
No reviewers
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram!318
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/check-directory-argument"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
gram check .(orgram check recipes/), the first command a newcomer types, failed with a rawEISDIRshown as aCOMPILE_ERROR. A folder given where a file or a glob is expected now stands for every.gramfile inside it, sorted like a glob's matches. Every command built onresolveGlobgains it:check,format,build,shop,db sync,suggest --pattern.packages/cli/src/core/glob.ts: a pattern without*that names a folder expands to**/*.gramunder it; a missing path still reaches the reader, which reports why..,sub,sub/, an empty folder, a missing file) and an e2e test per command:gram X recettes/reads exactly likegram X "recettes/**/*.gram"(7 of 8 fail without the fix).cli.mdx(en + fr):gram checkexamples with a folder.Pre-release audit 1.6, finding M1. After the merge: merge
mainintodev/1.6.Type of change
Quality checklist
bun run lint:fix)bun run typecheck)bun test)bun run change)