Repository navigation
feat!: CLI Genie v2 - TypeScript rewrite - #1
Merged
Merged
Conversation
Fixes the broken 1.0.x package: CliGenie was not shipped, main pointed at the example, the documented named export was undefined, inquirer 9 could not be required, and `when` never received earlier answers. - TypeScript source with ESM + CJS builds and type definitions - 10 step types with dynamic message/default/choices - Review screen with change-an-answer, progress counter, genie theme - Non-interactive mode with fromArgv/fromEnv, coercion and validation - Hooks, typed errors and clean Ctrl+C handling - JSON wizard definitions and a `cli-genie` command - v1 API kept working through compatibility helpers - Vitest suite, ESLint, Prettier, CI matrix, Dependabot and Changesets releases using npm trusted publishing with provenance BREAKING CHANGE: requires Node 22.13+; run() resolves with the answers instead of logging them and throws errors instead of setting exitCode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
What does this change?
Rewrites CLI Genie as v2.0.0 in TypeScript. Merging this publishes 2.0.0 to npm through the Release workflow, using trusted publishing.
Fixes the broken 1.0.x package:
CliGeniewasn't included in the published package.mainpointed at the example script.require('cli-genie').CliGeniewasundefined.require.whennever received earlier answers, so conditional questions never appeared.New:
fromArgv/fromEnv) with type conversion and validation.cli-geniecommand.Breaking:
run()resolves with the answers instead of printing them.process.exitCode.See the CHANGELOG and the README's "Migrating from v1" section.
Checklist
npm run checkpasses: typecheck, lint, format check, 39/39 tests and build all pass locallynpm run changeset) if this affects users: not needed, because the version is already set to 2.0.0 and CHANGELOG.md is written by hand.changeset publishpublishes it because 2.0.0 isn't on npm yet.