Skip to content

Scaffold htevents CLI with Commander, Jest, ESLint, and CI - #1

Merged
jonathanchaffer merged 1 commit into
mainfrom
jonathanchaffer/codegen-cli-scaffold
Aug 13, 2026
Merged

jonathanchaffer merged 1 commit into
mainfrom
jonathanchaffer/codegen-cli-scaffold

Conversation

@jonathanchaffer

@jonathanchaffer jonathanchaffer commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Sets up the foundation for @ht-sdks/events-cli per the Code Gen for Event Contracts spec — a runnable hello-world CLI that everything else will build on.

Changes

  • CLI: Commander-based htevents executable that supports --help and --version (read from package.json at runtime). No subcommands yet — those will land next.
  • Tooling: TypeScript 5.9 with a two-tsconfig split (tsconfig.json type-checks src + test; tsconfig.build.json emits only src to dist/), ESLint 9 flat config + Prettier, pnpm with committed lockfile.
  • Tests: Jest + ts-jest — unit tests for the program definition, plus an e2e smoke test that spawns the compiled dist/cli.js and asserts on help/version output. pretest rebuilds so e2e always runs the current artifact.
  • CI: GitHub Actions on push, Node 18/20/22/24 matrix — install (frozen lockfile), build, lint, test.

Testing

  • pnpm run build && node dist/cli.js --help prints usage
  • pnpm run lint && pnpm test pass locally

Summary by CodeRabbit

  • New Features

    • Added the htevents command-line application with version and help information.
    • Added project scripts for building, linting, formatting, and running tests.
  • Quality & Testing

    • Added automated tests covering CLI help, version output, and program configuration.
    • Added continuous integration checks across multiple supported Node.js versions.
    • Added consistent TypeScript, ESLint, and Prettier configuration.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 00948f72-6bde-4833-9a97-576fd2d8c564

📥 Commits

Reviewing files that changed from the base of the PR and between 548480e and d28ae3c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (13)
  • .github/workflows/ci.yml
  • .prettierignore
  • .prettierrc
  • README.md
  • eslint.config.mjs
  • jest.config.js
  • package.json
  • src/cli.ts
  • src/program.ts
  • test/cli.e2e.test.ts
  • test/program.test.ts
  • tsconfig.build.json
  • tsconfig.json

📝 Walkthrough

Walkthrough

Added the initial events-cli Node.js package with TypeScript compilation, Commander-based htevents commands, Jest tests, linting and formatting configuration, and a GitHub Actions workflow for Node.js 18, 20, 22, and 24.

Changes

CLI foundation

Layer / File(s) Summary
Package and tooling configuration
package.json, tsconfig*.json, jest.config.js, eslint.config.mjs, .prettierrc, .prettierignore
Added package metadata, CLI scripts, TypeScript settings, Jest configuration, ESLint rules, and Prettier settings.
Commander CLI entrypoint
src/program.ts, src/cli.ts
Added buildProgram() with the htevents name, description, and package version. Added the executable entrypoint that parses arguments.
CLI tests and CI validation
test/program.test.ts, test/cli.e2e.test.ts, .github/workflows/ci.yml, README.md
Added program and end-to-end tests for name, help, and semantic-version output. Added CI checks across four Node.js versions and adjusted README spacing.

Estimated code review effort: 3 (Moderate) | ~20 minutes


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands.

@jonathanchaffer
jonathanchaffer merged commit 8993fd6 into main Aug 13, 2026
5 checks passed
@jonathanchaffer
jonathanchaffer deleted the jonathanchaffer/codegen-cli-scaffold branch August 13, 2026 13:20
jonathanchaffer added a commit that referenced this pull request Sep 16, 2026
Resolves the js-cookie <= 3.0.5 prototype-hijack advisory (dependabot
alert #1): browser SDK 1.6.0 depends on js-cookie ^3.0.8, and the
lockfile now resolves 3.0.8.

Co-authored-by: Cursor <[email protected]>
jonathanchaffer added a commit that referenced this pull request Sep 16, 2026
Resolves the js-cookie <= 3.0.5 prototype-hijack advisory (dependabot
alert #1): browser SDK 1.6.0 depends on js-cookie ^3.0.8, and the
lockfile now resolves 3.0.8.

Co-authored-by: Cursor <[email protected]>
jonathanchaffer added a commit that referenced this pull request Sep 16, 2026
* Bump @ht-sdks/events-sdk-js-browser to 1.6.0

Resolves the js-cookie <= 3.0.5 prototype-hijack advisory (dependabot
alert #1): browser SDK 1.6.0 depends on js-cookie ^3.0.8, and the
lockfile now resolves 3.0.8.

Co-authored-by: Cursor <[email protected]>

* Bump @ht-sdks/events-sdk-js-node to 2.0.0

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Cursor <[email protected]>
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.

2 participants