log-update
Advanced tools
Comparing version 5.0.1 to 6.0.0
@@ -1,2 +0,2 @@ | ||
export interface Options { | ||
export type Options = { | ||
/** | ||
@@ -16,3 +16,3 @@ Show the cursor. This can be useful when a CLI accepts input from a user. | ||
readonly showCursor?: boolean; | ||
} | ||
}; | ||
@@ -19,0 +19,0 @@ type LogUpdateMethods = { |
@@ -21,3 +21,3 @@ import process from 'node:process'; | ||
const fitToTerminalHeight = (stream, text) => { | ||
const terminalHeight = stream.rows || defaultTerminalHeight; | ||
const terminalHeight = stream.rows ?? defaultTerminalHeight; | ||
const lines = text.split('\n'); | ||
@@ -24,0 +24,0 @@ |
{ | ||
"name": "log-update", | ||
"version": "5.0.1", | ||
"version": "6.0.0", | ||
"description": "Log by overwriting the previous output in the terminal. Useful for rendering progress bars, animations, etc.", | ||
@@ -14,5 +14,8 @@ "license": "MIT", | ||
"type": "module", | ||
"exports": "./index.js", | ||
"exports": { | ||
"types": "./index.d.ts", | ||
"default": "./index.js" | ||
}, | ||
"engines": { | ||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" | ||
"node": ">=18" | ||
}, | ||
@@ -45,16 +48,21 @@ "scripts": { | ||
"dependencies": { | ||
"ansi-escapes": "^5.0.0", | ||
"ansi-escapes": "^6.2.0", | ||
"cli-cursor": "^4.0.0", | ||
"slice-ansi": "^5.0.0", | ||
"strip-ansi": "^7.0.1", | ||
"wrap-ansi": "^8.0.1" | ||
"slice-ansi": "^7.0.0", | ||
"strip-ansi": "^7.1.0", | ||
"wrap-ansi": "^9.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^17.0.25", | ||
"ava": "^4.2.0", | ||
"@types/node": "^20.8.9", | ||
"ava": "^5.3.1", | ||
"terminal.js": "^1.0.11", | ||
"tsd": "^0.20.0", | ||
"tsd": "^0.29.0", | ||
"wcwidth": "^1.0.1", | ||
"xo": "^0.48.0" | ||
"xo": "^0.56.0" | ||
}, | ||
"xo": { | ||
"rules": { | ||
"@typescript-eslint/no-unsafe-argument": "off" | ||
} | ||
} | ||
} |
@@ -74,6 +74,6 @@ # log-update | ||
```js | ||
import logUpdate from 'log-update'; | ||
import {createLogUpdate} from 'log-update'; | ||
// Write output but don't hide the cursor | ||
const log = logUpdate.create(process.stdout, { | ||
const log = createLogUpdate(process.stdout, { | ||
showCursor: true | ||
@@ -88,13 +88,1 @@ }); | ||
- [speed-test](https://github.com/sindresorhus/speed-test) - Uses this module to render a [spinner](https://github.com/sindresorhus/elegant-spinner) | ||
--- | ||
<div align="center"> | ||
<b> | ||
<a href="https://tidelift.com/subscription/pkg/npm-log-update?utm_source=npm-log-update&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> | ||
</b> | ||
<br> | ||
<sub> | ||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. | ||
</sub> | ||
</div> |
7701
87
+ Addedansi-escapes@6.2.1(transitive)
+ Addedemoji-regex@10.3.0(transitive)
+ Addedget-east-asian-width@1.2.0(transitive)
+ Addedis-fullwidth-code-point@5.0.0(transitive)
+ Addedslice-ansi@7.1.0(transitive)
+ Addedstring-width@7.1.0(transitive)
+ Addedwrap-ansi@9.0.0(transitive)
- Removedansi-escapes@5.0.0(transitive)
- Removedeastasianwidth@0.2.0(transitive)
- Removedemoji-regex@9.2.2(transitive)
- Removedis-fullwidth-code-point@4.0.0(transitive)
- Removedslice-ansi@5.0.0(transitive)
- Removedstring-width@5.1.2(transitive)
- Removedtype-fest@1.4.0(transitive)
- Removedwrap-ansi@8.1.0(transitive)
Updatedansi-escapes@^6.2.0
Updatedslice-ansi@^7.0.0
Updatedstrip-ansi@^7.1.0
Updatedwrap-ansi@^9.0.0