Skip to content

Commit dbd754d

Browse files
authored
Merge branch 'main' into core-multiline
2 parents be0f5ca + f9db1bd commit dbd754d

22 files changed

+60
-39
lines changed

.changeset/legal-bags-tie.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@clack/prompts": major
3+
"@clack/core": major
4+
---
5+
6+
The package is now distributed as ESM-only. In `v0` releases, the package was dual-published as CJS and ESM.
7+
8+
For existing CJS projects using Node v20+, please see Node's guide on [Loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v20.x/api/modules.html#loading-ecmascript-modules-using-require).

.changeset/pre.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"mode": "pre",
3+
"tag": "alpha",
4+
"initialVersions": {
5+
"@example/basic": "0.0.0",
6+
"@example/changesets": "0.0.0",
7+
"@clack/core": "0.4.1",
8+
"@clack/prompts": "0.10.0"
9+
},
10+
"changesets": []
11+
}

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ jobs:
2626
node-version: 20
2727
cache: "pnpm"
2828
- run: pnpm install
29+
- run: pnpm run build
2930
- run: pnpm run type-check
3031
- run: pnpm run test

.github/workflows/lint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ jobs:
1818
node-version: 20
1919
cache: "pnpm"
2020
- run: pnpm install
21-
- run: pnpm type-check
21+
- run: pnpm run build
22+
- run: pnpm run type-check

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<h4 align="center"><a href="packages/core#readme"><code>@clack/core</code></a>: unstyled, extensible primitives for CLIs</h4>
1313
<h4 align="center"><a href="packages/prompts#readme"><code>@clack/prompts</code></a>: beautiful, ready-to-use CLI prompt components</h4>
1414

15+
> [!WARNING]
16+
> Clack's `main` branch is tracking the [`alpha` release line for `v1.0.0+`](https://github.com/bombshell-dev/clack/pull/250). To view the relatively stable `v0` line, please browse the [v0](https://github.com/bombshell-dev/clack/tree/v0) branch.
17+
1518
<br />
1619
<br />
1720

build.preset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default definePreset({
66
declaration: true,
77
sourcemap: true,
88
rollup: {
9-
emitCJS: true,
9+
emitCJS: false,
1010
inlineDependencies: true,
1111
esbuild: {
1212
minify: true,

packages/core/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
"name": "@clack/core",
33
"version": "0.4.1",
44
"type": "module",
5-
"main": "./dist/index.cjs",
5+
"main": "./dist/index.mjs",
66
"module": "./dist/index.mjs",
77
"exports": {
88
".": {
99
"types": "./dist/index.d.ts",
10-
"import": "./dist/index.mjs",
11-
"require": "./dist/index.cjs"
10+
"default": "./dist/index.mjs"
1211
},
1312
"./package.json": "./package.json"
1413
},

packages/core/src/index.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
export type { ClackState as State } from './types';
2-
export type { ClackSettings } from './utils/settings';
1+
export type { ClackState as State } from './types.js';
2+
export type { ClackSettings } from './utils/settings.js';
33

4-
export { default as ConfirmPrompt } from './prompts/confirm';
5-
export { default as GroupMultiSelectPrompt } from './prompts/group-multiselect';
6-
export { default as MultiSelectPrompt } from './prompts/multi-select';
7-
export { default as PasswordPrompt } from './prompts/password';
8-
export { default as Prompt } from './prompts/prompt';
9-
export { default as SelectPrompt } from './prompts/select';
10-
export { default as SelectKeyPrompt } from './prompts/select-key';
11-
export { default as TextPrompt } from './prompts/text';
12-
export { block, isCancel, strLength } from './utils';
13-
export { updateSettings } from './utils/settings';
4+
export { default as ConfirmPrompt } from './prompts/confirm.js';
5+
export { default as GroupMultiSelectPrompt } from './prompts/group-multiselect.js';
6+
export { default as MultiSelectPrompt } from './prompts/multi-select.js';
7+
export { default as PasswordPrompt } from './prompts/password.js';
8+
export { default as Prompt } from './prompts/prompt.js';
9+
export { default as SelectPrompt } from './prompts/select.js';
10+
export { default as SelectKeyPrompt } from './prompts/select-key.js';
11+
export { default as TextPrompt } from './prompts/text.js';
12+
export { block, isCancel, strLength } from './utils/index.js';
13+
export { updateSettings } from './utils/settings.js';

packages/core/src/prompts/confirm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { cursor } from 'sisteransi';
2-
import Prompt, { type PromptOptions } from './prompt';
2+
import Prompt, { type PromptOptions } from './prompt.js';
33

44
interface ConfirmOptions extends PromptOptions<ConfirmPrompt> {
55
active: string;

packages/core/src/prompts/group-multiselect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Prompt, { type PromptOptions } from './prompt';
1+
import Prompt, { type PromptOptions } from './prompt.js';
22

33
interface GroupMultiSelectOptions<T extends { value: any }>
44
extends PromptOptions<GroupMultiSelectPrompt<T>> {

0 commit comments

Comments
 (0)