Skip to content

Upgrade deps, add tests, improve CI and docs#36

Merged
ycmjason merged 2 commits intomainfrom
ycmjason/upgrade-all-deps
Mar 15, 2026
Merged

Upgrade deps, add tests, improve CI and docs#36
ycmjason merged 2 commits intomainfrom
ycmjason/upgrade-all-deps

Conversation

@ycmjason
Copy link
Copy Markdown
Member

Summary

  • Upgraded all dependencies to latest versions
  • Added comprehensive integration and example script tests with node:test
  • Fixed floating promise warnings and improved linting rules
  • Migrated to trusted publishing, removed NPM token
  • Rewrote README with clearer structure and usage tables
  • Enhanced CI with lint and test gates before publish

What's New

Tests: 24 new tests covering all 6 packages plus example shell scripts using a local npx stub.

Quality: Stricter biome rules (noFloatingPromises, noUnusedImports), fixed bugs in confirm and select packages.

CI/CD: Lint and tests now run before publish, using OIDC trusted publishing instead of tokens.

Docs: Improved README with option tables, full examples, and clearer integration guidance.

🤖 Generated with Claude Code

- Upgrade all dependencies to latest versions
- Update biome.json with stricter linting rules (noFloatingPromises, noUnusedImports)
- Fix floating promise warnings by adding void to async IIFEs
- Fix confirm --help exiting with code 1 when no message provided
- Fix select/checkbox not detecting missing choices when no -c flag given
- Add integration tests for all packages using node:test
- Add example script tests with local npx stub
- Add lint and test steps to CD workflow before publish
- Remove NPM_TOKEN from CD (switched to trusted publishing)
- Add pnpm catalogMode: strict and cleanupUnusedCatalogs settings
- Rewrite README with clearer structure, option tables, and full example

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 15, 2026 08:07
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ycmjason ycmjason merged commit 85dd80d into main Mar 15, 2026
1 check passed
@ycmjason ycmjason deleted the ycmjason/upgrade-all-deps branch March 15, 2026 08:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the repo by updating Inquirer dependencies, tightening Biome linting rules, and adding automated tests + CI steps to validate the CLI prompt packages.

Changes:

  • Upgrade @inquirer/* catalog versions and update Biome configuration (including noFloatingPromises) and CI workflow to run lint + tests.
  • Add a @inquirer-cli/test-helper workspace package and new node:test suites for the prompt CLIs.
  • Refresh README with quick start, prompt docs, and examples; bump package versions to 1.0.9.

Reviewed changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
README.md Rewritten usage/docs and requirements section.
pnpm-workspace.yaml Adds pnpm catalog settings and bumps @inquirer/* versions.
pnpm-lock.yaml Lockfile updates for upgraded deps + new workspace devDependency.
packages/test-helper/package.json New private workspace package for test utilities.
packages/test-helper/index.js Implements helpers to run CLIs/scripts in tests with an npx stub.
packages/test-helper/npx-stub.sh Shell stub intended to map @inquirer-cli/* to local packages.
packages/*/package.json Version bumps to 1.0.9.
packages/*/index.test.js New node:test suites for input/number/confirm/select/checkbox/password.
packages/{select,checkbox}/*.js Filters undefined choices; marks async IIFEs with void.
packages/{input,number,password,confirm}/*.js Marks async IIFEs with void; confirm help/error ordering adjusted.
packages/editor/prompt.js Marks async IIFE with void.
package.json Sets root to ESM and adds pnpm test script + test-helper devDependency.
biome.json Enables VCS integration and adds stricter lint rules (unused imports, no floating promises).
.github/workflows/cd.yml Adds lint + test steps before publishing.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


- name: Publish to npm
run: pnpm -r publish --access public
env:
## Requirements

For a full list of options and detailed usage, refer to the documentation of the respective `@inquirer-cli` package.
- Node.js >= 16
Comment on lines +9 to +15
'@inquirer/checkbox': ^5.1.0
'@inquirer/confirm': ^6.0.8
'@inquirer/editor': ^5.0.8
'@inquirer/input': ^5.0.8
'@inquirer/number': ^4.0.8
'@inquirer/password': ^5.0.8
'@inquirer/select': ^5.1.0
Comment on lines +57 to +60
env: {
...process.env,
PATH: `${dirname(NPX_STUB)}:${process.env.PATH}`,
INQUIRER_CLI_ROOT: ROOT,
Comment on lines +5 to +23
args=""
pkg=""
for arg in "$@"; do
case "$arg" in
-y) ;;
@inquirer-cli/*)
pkg=$(echo "$arg" | sed 's|@inquirer-cli/||' | tr -d '"')
;;
*)
args="$args \"$arg\""
;;
esac
done

if [ -n "$pkg" ]; then
eval exec node "$INQUIRER_CLI_ROOT/packages/$pkg/index.js" $args
else
# Fall through to real npx for non-inquirer-cli packages
eval exec "$(which -a npx | grep -v "$0" | head -1)" "$@"
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 04c987d288

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

cwd: ROOT,
env: {
...process.env,
PATH: `${dirname(NPX_STUB)}:${process.env.PATH}`,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Expose the stub as npx in example-script test runs

runScript prepends dirname(NPX_STUB) to PATH, but that directory contains npx-stub.sh rather than an executable named npx, so shell resolution still picks the system npx. In the example.sh tests, this means commands can run/download published packages instead of the local workspace binaries, making these tests network-dependent and unable to reliably catch regressions in the current commit.

Useful? React with 👍 / 👎.

Comment on lines +9 to +13
'@inquirer/checkbox': ^5.1.0
'@inquirer/confirm': ^6.0.8
'@inquirer/editor': ^5.0.8
'@inquirer/input': ^5.0.8
'@inquirer/number': ^4.0.8
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Align supported Node range with upgraded @InQuirer majors

These catalog bumps move prompts to @inquirer/* major versions that now require Node >=20.12 (as reflected in the updated lockfile engine metadata), which drops Node 18/19 compatibility compared to the prior set. Because package metadata/docs still present older support and package versions were only patch-bumped, users on Node 18/19 can hit install/runtime failures unexpectedly; this needs an explicit engine/support update or dependency rollback.

Useful? React with 👍 / 👎.

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