Skip to content

Commit

Permalink
[ci] release (#214)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nate Moore <[email protected]>
  • Loading branch information
3 people authored Dec 19, 2024
1 parent 132002c commit 258dd69
Show file tree
Hide file tree
Showing 9 changed files with 130 additions and 91 deletions.
25 changes: 0 additions & 25 deletions .changeset/kind-llamas-beam.md

This file was deleted.

38 changes: 0 additions & 38 deletions .changeset/lucky-maps-beam.md

This file was deleted.

14 changes: 0 additions & 14 deletions .changeset/quiet-actors-wink.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/swift-jars-destroy.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/thin-moose-tease.md

This file was deleted.

42 changes: 42 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# @clack/core

## 0.4.0

### Minor Changes

- a83d2f8: Adds a new `updateSettings()` function to support new global keybindings.

`updateSettings()` accepts an `aliases` object that maps custom keys to an action (`up | down | left | right | space | enter | cancel`).

```ts
import { updateSettings } from "@clack/core";

// Support custom keybindings
updateSettings({
aliases: {
w: "up",
a: "left",
s: "down",
d: "right",
},
});
```

> [!WARNING]
> In order to enforce consistent, user-friendly defaults across the ecosystem, `updateSettings` does not support disabling Clack's default keybindings.
- 801246b: Adds a new `signal` option to support programmatic prompt cancellation with an [abort controller](https://kettanaito.com/blog/dont-sleep-on-abort-controller).


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

| alias | action |
| ----- | ------ |
| `k` | up |
| `l` | right |
| `j` | down |
| `h` | left |
| `esc` | cancel |

### Patch Changes

- 51e12bc: Improves types for events and interaction states.

## 0.3.5

### Patch Changes
Expand Down
7 changes: 5 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clack/core",
"version": "0.3.5",
"version": "0.4.0",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
Expand All @@ -22,7 +22,10 @@
"url": "https://github.com/natemoo-re/clack/issues"
},
"homepage": "https://github.com/natemoo-re/clack/tree/main/packages/core#readme",
"files": ["dist", "CHANGELOG.md"],
"files": [
"dist",
"CHANGELOG.md"
],
"keywords": [
"ask",
"clack",
Expand Down
78 changes: 78 additions & 0 deletions packages/prompts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,83 @@
# @clack/prompts

## 0.9.0

### Minor Changes

- a83d2f8: Adds a new `updateSettings()` function to support new global keybindings.

`updateSettings()` accepts an `aliases` object that maps custom keys to an action (`up | down | left | right | space | enter | cancel`).

```ts
import { updateSettings } from "@clack/prompts";

// Support custom keybindings
updateSettings({
aliases: {
w: "up",
a: "left",
s: "down",
d: "right",
},
});
```

> [!WARNING]
> In order to enforce consistent, user-friendly defaults across the ecosystem, `updateSettings` does not support disabling Clack's default keybindings.
- 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`).

| alias | action |
| ----- | ------ |
| `k` | up |
| `l` | right |
| `j` | down |
| `h` | left |
| `esc` | cancel |

### Patch Changes

- f9f139d: Adapts `spinner` output for static CI environments
- Updated dependencies [a83d2f8]
- Updated dependencies [801246b]
- Updated dependencies [a83d2f8]
- Updated dependencies [51e12bc]
- @clack/core@0.4.0

## 0.8.2

### Patch Changes
Expand Down
7 changes: 5 additions & 2 deletions packages/prompts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clack/prompts",
"version": "0.8.2",
"version": "0.9.0",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
Expand All @@ -22,7 +22,10 @@
"url": "https://github.com/natemoo-re/clack/issues"
},
"homepage": "https://github.com/natemoo-re/clack/tree/main/packages/prompts#readme",
"files": ["dist", "CHANGELOG.md"],
"files": [
"dist",
"CHANGELOG.md"
],
"author": {
"name": "Nate Moore",
"email": "[email protected]",
Expand Down

0 comments on commit 258dd69

Please sign in to comment.