fix(workspace): fix format script glob missing top-level src files - #167
Merged
Conversation
The format/format:check npm scripts used a shell glob (packages/*/src/**/*.ts) that relies on bash's globstar behavior. npm runs scripts via sh, which has no globstar, so `**` behaved like a single `*` and never matched files sitting directly in src/ (e.g. cli.test.ts, cli.ts, errors.ts), silently excluding them from formatting checks. Switch format/format:check to run oxfmt with no path args, so it uses its own recursive directory scan (respecting .gitignore and ignorePatterns) instead of relying on shell globbing. Also update .oxfmtrc.json ignorePatterns to exclude md/yml/json files, since oxfmt without a path glob now also picks up non-TS files that were never part of this workspace's formatting scope. Re-run format across the newly-covered files.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #167 +/- ##
=======================================
Coverage 93.36% 93.36%
=======================================
Files 15 15
Lines 2488 2488
Branches 296 296
=======================================
Hits 2323 2323
Misses 163 163
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Assert against the actual package.json version, read the same way handleInfo() reads it, so the test doesn't break every time the package version changes.
|
mk0x9
approved these changes
Jul 29, 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.



Problem
The
format/format:checknpm scripts used a shell glob:npm runs scripts via
sh, notbash, so**has noglobstarbehavior — it's treated like a single*and never matches files sitting directly insrc/(only nested ones likesrc/utils/*.ts). This silently excluded files likepackages/cli/src/cli.test.ts,cli.ts,packages/sdk/src/errors.ts, etc. from formatting checks.Fix
format/format:checkto runoxfmt/oxfmt --checkwith no path args, letting oxfmt do its own recursive directory scan (respecting.gitignoreandignorePatterns) instead of relying on shell globbing..oxfmtrc.jsonignorePatternsto exclude**/*.{md,yml,json}, since oxfmt without a path glob now also picks up non-TS files that were never part of this workspace's formatting scope.formatto fix the newly-covered files that were previously never checked.Testing
npm run format:check— passes, now covers 55 files (was 12 before, silently missing top-levelsrc/*.tsfiles).npm run lint— passes.