Skip to content

Commit f04f343

Browse files
authored
fix(deno): import UIOptions from definitions (#97)
1 parent 2acc5a2 commit f04f343

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Diff for: .github/workflows/release-please.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
release-please:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: bcoe/release-please-action@v2.5.5
10+
- uses: bcoe/release-please-action@v2.6.0
1111
id: release
1212
with:
1313
token: ${{ secrets.GITHUB_TOKEN }}

Diff for: deno.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Bootstrap cliui with CommonJS dependencies:
2-
import { cliui, UIOptions, UI } from './build/lib/index.js'
2+
import { cliui, UI } from './build/lib/index.js'
3+
import type { UIOptions } from './build/lib/index.d.ts'
34
import { wrap, stripAnsi } from './build/lib/string-utils.js'
45

56
export default function ui (opts: UIOptions): UI {

Diff for: lib/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const left = 3
1212

1313
export interface UIOptions {
1414
width: number;
15-
wrap: boolean;
15+
wrap?: boolean;
1616
rows?: string[];
1717
}
1818

@@ -47,7 +47,7 @@ export class UI {
4747

4848
constructor (opts: UIOptions) {
4949
this.width = opts.width
50-
this.wrap = opts.wrap
50+
this.wrap = opts.wrap ?? true
5151
this.rows = []
5252
}
5353

@@ -384,6 +384,6 @@ export function cliui (opts: Partial<UIOptions> = {}, _mixin: Mixin) {
384384
mixin = _mixin
385385
return new UI({
386386
width: opts.width || getWindowWidth(),
387-
wrap: opts.wrap !== false
387+
wrap: opts.wrap
388388
})
389389
}

0 commit comments

Comments
 (0)