cowork-bot: automated improvements (cowork/improve-vscode-schemaforge) - #12
Merged
Merged
Conversation
The canonical list of supported schema formats was inlined in three places (convert.ts, previewPanel.ts, and cli.ts's getAvailableFormats fallback) — a drift risk that already bit us once (PR #9). Extract it into a single source of truth, src/formats.ts (SCHEMA_FORMATS + normalizeFormat). normalizeFormat() trims/lowercases the label the `detect` CLI emits before it is forwarded to `convert --from/--to`. Previously a label like "SQL" or " Prisma " was passed verbatim, producing an opaque CLI error while the command appeared to do nothing — the classic silent-failure trap. Unknown formats still pass through unchanged so the CLI errors clearly instead of silently. Adds network-free regression tests (tests/formats.test.js) covering normalizeFormat behavior and the list/enum consistency across call sites.
Remove quotes around the tests/*.test.js argument so the shell expands the test files on Node 18 and 20. This resolves PR #11 CI failures where Node received the literal glob and ran zero tests.
…h vulnerabilities
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.
Automated improvement PR from the Cowork repo-improver rotation (one coherent senior-dev improvement per run; see individual commit messages). Subsequent runs push additional commits to this PR rather than opening new ones.