Skip to content

Improve typegap: restore CI workflows, add release automation, fix CLI runtime#1

Merged
rogerchappel merged 2 commits into
mainfrom
garden/typegap
May 26, 2026
Merged

Improve typegap: restore CI workflows, add release automation, fix CLI runtime#1
rogerchappel merged 2 commits into
mainfrom
garden/typegap

Conversation

@rogerchappel
Copy link
Copy Markdown
Owner

What changed

  • Restored CI: Added .github/workflows/ci.yml after previous temporary removal for initial push (workflows were never restored)
  • Release automation: Added release:check, smoke, and package:smoke scripts to package.json
  • Fixed CLI runtime bug: src/cli.ts imported version via import { version } '../package.json' with { type: 'json' } — tsc compiled it but Node.js could not resolve the export at runtime. Created src/version.ts instead.
  • Fixed smoke script: smoke used a non-existent scan subcommand (CLI uses positional directory arg)

Why it matters

Without CI, typegap has zero automated validation — no typecheck, no test, no build gate on PRs or merges. This is a basic reliability risk for a dev tool with 60+ tests.

Without release:check, there is no local gate to verify a release-ready package before publishing.

The CLI was import-broken at runtime, making the bin entry non-functional.

Verification

npm run check        # tsc --noEmit — passes
npm run test         # vitest run --coverage — 60+ tests pass
npm run smoke        # CLI help + scan fixtures — outputs coverage report
npm run release:check  # full gate passes

Remaining work

  • Restore release-dry-run.yml and release.yml workflows for ReleaseBox integration
  • Consider adding eslint/prettier to CI as those scripts exist in package.json

- Add ci.yml with checkout, install, typecheck, build, test, smoke, and pack checks
- The previous workflows were temporarily removed for initial push but never restored

chore: add release:check scripts for release readiness

- Add release:check, smoke, and package:smoke scripts to package.json
- Fix smoke command to use positional directory argument instead of non-existent 'scan' subcommand
- Fix CLI version import by creating src/version.ts (JSON import with type assertion is not portable across tsc setups)

Fixes:
- CI was completely missing, leaving no automated validation
- release:check did not exist, making it difficult to verify release readiness
- smoke script referenced a 'scan' subcommand that the CLI does not have (uses positional arg)
- CLI failed at runtime due to import syntax that tsc compiles but Node cannot resolve
@rogerchappel rogerchappel merged commit 552f194 into main May 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant