Skip to content

Commit

Permalink
Update packages/core/CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re authored Dec 19, 2024
1 parent 39c2316 commit fc10f22
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,6 @@
- 801246b: Adds a new `signal` option to support programmatic prompt cancellation with an [abort controller](https://kettanaito.com/blog/dont-sleep-on-abort-controller).

One example use case is automatically cancelling a prompt after a timeout.

```ts
const shouldContinue = await confirm({
message: "This message will self destruct in 5 seconds",
signal: AbortSignal.timeout(5000),
});
```

Another use case is racing a long running task with a manual prompt.

```ts
const abortController = new AbortController();

const projectType = await Promise.race([
detectProjectType({
signal: abortController.signal,
}),
select({
message: "Pick a project type.",
options: [
{ value: "ts", label: "TypeScript" },
{ value: "js", label: "JavaScript" },
{ value: "coffee", label: "CoffeeScript", hint: "oh no" },
],
signal: abortController.signal,
}),
]);

abortController.abort();
```

- a83d2f8: Updates default keybindings to support Vim motion shortcuts and map the `escape` key to cancel (`ctrl+c`).

Expand Down

0 comments on commit fc10f22

Please sign in to comment.