Skip to content

Commit e41b36b

Browse files
committed
Merge branch 'main' into tasklog
2 parents 0a9f7b6 + 4237986 commit e41b36b

16 files changed

+2460
-41
lines changed

.changeset/afraid-socks-deny.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clack/prompts": patch
3+
---
4+
5+
Fixes multiselect only shows hints on the first item in the options list. Now correctly shows hints for all selected options with hint property.

.changeset/empty-buses-wonder.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clack/prompts": minor
3+
---
4+
5+
Adds `format` option to the note prompt to allow formatting of individual lines

.changeset/five-chairs-poke.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
"@clack/prompts": minor
3+
"@clack/core": minor
4+
---
5+
6+
Add support for customizable spinner cancel and error messages. Users can now customize these messages either per spinner instance or globally via the `updateSettings` function to support multilingual CLIs.
7+
8+
This update also improves the architecture by exposing the core settings to the prompts package, enabling more consistent default message handling across the codebase.
9+
10+
```ts
11+
// Per-instance customization
12+
const spinner = prompts.spinner({
13+
cancelMessage: 'Operación cancelada', // "Operation cancelled" in Spanish
14+
errorMessage: 'Se produjo un error' // "An error occurred" in Spanish
15+
});
16+
17+
// Global customization via updateSettings
18+
prompts.updateSettings({
19+
messages: {
20+
cancel: 'Operación cancelada', // "Operation cancelled" in Spanish
21+
error: 'Se produjo un error' // "An error occurred" in Spanish
22+
}
23+
});
24+
25+
// Settings can now be accessed directly
26+
console.log(prompts.settings.messages.cancel); // "Operación cancelada"
27+
28+
// Direct options take priority over global settings
29+
const spinner = prompts.spinner({
30+
cancelMessage: 'Cancelled', // This will be used instead of the global setting
31+
});
32+
```

.changeset/happy-parents-explain.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clack/prompts": minor
3+
---
4+
5+
Adds a new `groupSpacing` option to grouped multi-select prompts. If set to an integer greater than 0, it will add that number of new lines between each group.

.changeset/hot-turkeys-knock.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clack/core": patch
3+
---
4+
5+
Fixes an edge case for placeholder values. Previously, when pressing `enter` on an empty prompt, placeholder values would be ignored. Now, placeholder values are treated as the prompt value.

.config/knip.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://unpkg.com/knip@latest/schema.json",
3+
"workspaces": {
4+
"packages/*": {
5+
"entry": ["dist/index.mjs"],
6+
"project": "**/*.{js,ts,mjs,mts}",
7+
"ignoreDependencies": ["unbuild"]
8+
}
9+
},
10+
"ignore": ["**/node_modules/**"],
11+
"ignoreExportsUsedInFile": true,
12+
"rules": {
13+
"dependencies": "error",
14+
"devDependencies": "warn",
15+
"peerDependencies": "error"
16+
}
17+
}

.github/workflows/release.yml

+15-3
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ jobs:
2525
with:
2626
node-version: 20
2727
cache: "pnpm"
28-
- run: pnpm install
28+
# Run prepublish to ensure everything is built properly
2929
# TODO: is this manual build step actually needed?
30+
- run: pnpm run ci:install
3031
# `prepack` hook _should_ run but doesn't seem to.
31-
- run: pnpm run build
32-
- uses: changesets/action@v1
32+
- run: pnpm run ci:prepublish
33+
- name: Create Release Pull Request or Publish to npm
34+
id: changesets
35+
uses: changesets/action@v1
3336
with:
3437
version: pnpm run ci:version
3538
publish: pnpm run ci:publish
@@ -38,3 +41,12 @@ jobs:
3841
env:
3942
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4043
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
- name: Validate dependencies
45+
if: steps.changesets.outputs.published == 'true'
46+
run: |
47+
pnpm run deps:check
48+
env:
49+
NODE_ENV: production
50+
- name: Publish to jsr.io
51+
if: steps.changesets.outputs.published == 'true'
52+
run: pnpx @qingshaner/jsr-release publish --changesetReleases='${{ steps.changesets.outputs.publishedPackages }}'

0 commit comments

Comments
 (0)