Skip to content

v3.0.0

Choose a tag to compare

@PierreDemailly PierreDemailly released this 21 Mar 22:55
· 28 commits to main since this release
c419322

What's Changed

  • Enhance error handling & remove new Promise by @fraxken in #156
  • chore(deps): bump the github-actions group with 4 updates by @dependabot[bot] in #157
  • chore(deps): bump the github-actions group with 4 updates by @dependabot[bot] in #158
  • chore(deps): bump the github-actions group with 3 updates by @dependabot[bot] in #160
  • ci: use Node.js v24 and remove glob from devDeps by @fraxken in #162
  • chore(deps-dev): bump @types/node from 24.10.4 to 25.0.3 in the development-dependencies group across 1 directory by @dependabot[bot] in #163
  • refactor: migrate to Node.js type striping by @fraxken in #164
  • OIDC publish by @fraxken in #165
  • chore(deps): bump the github-actions group with 5 updates by @dependabot[bot] in #166
  • chore(deps): bump the github-actions group with 4 updates by @dependabot[bot] in #167
  • chore(deps): bump github/codeql-action from 4.32.0 to 4.32.4 in the github-actions group by @dependabot[bot] in #168
  • chore(deps-dev): bump c8 from 10.1.3 to 11.0.0 in the development-dependencies group by @dependabot[bot] in #169
  • fix(confirm): await promise before writing answer by @PierreDemailly in #170
  • refactor: use native Promise.withResolvers by @PierreDemailly in #171
  • feat: add support for async validators by @PierreDemailly in #172
  • fix(validators): string error from validator should invalidate prompt by @PierreDemailly in #173
  • feat(question)!: add transformer option by @PierreDemailly in #174
  • chore(package.json): add repository by @PierreDemailly in #175

Breaking changes

Drop Node.js v20 support

This package now uses Promise.withResolvers, which require Node.js v22.

Validators

Built-in validators have been moved under a validators namespace export, alongside the new transformers namespace.

Before:

import { question, required } from "@topcli/prompts";

await question("...", { validators: [required()] });

After:

import { question, validators } from "@topcli/prompts";

await question("...", { validators: [validators.required()] });

Full Changelog: v2.4.1...v3.0.0