Socket
Socket
Sign inDemoInstall

ora

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ora - npm Package Compare versions

Comparing version 5.1.0 to 5.2.0

34

index.js

@@ -10,3 +10,3 @@ 'use strict';

const isInteractive = require('is-interactive');
const MuteStream = require('mute-stream');
const {BufferListStream} = require('bl');

@@ -22,5 +22,4 @@ const TEXT = Symbol('text');

this.mutedStream = new MuteStream();
this.mutedStream = new BufferListStream();
this.mutedStream.pipe(process.stdout);
this.mutedStream.mute();

@@ -187,2 +186,7 @@ const self = this;

set text(value) {
this[TEXT] = value;
this.updateLineCount();
}
get prefixText() {

@@ -192,2 +196,7 @@ return this[PREFIX_TEXT];

set prefixText(value) {
this[PREFIX_TEXT] = value;
this.updateLineCount();
}
get isSpinning() {

@@ -212,17 +221,8 @@ return this.id !== undefined;

const fullPrefixText = this.getFullPrefixText(this.prefixText, '-');
this.lineCount = stripAnsi(fullPrefixText + '--' + this[TEXT]).split('\n').reduce((count, line) => {
return count + Math.max(1, Math.ceil(wcwidth(line) / columns));
}, 0);
this.lineCount = 0;
for (const line of stripAnsi(fullPrefixText + '--' + this[TEXT]).split('\n')) {
this.lineCount += Math.max(1, Math.ceil(wcwidth(line) / columns));
}
}
set text(value) {
this[TEXT] = value;
this.updateLineCount();
}
set prefixText(value) {
this[PREFIX_TEXT] = value;
this.updateLineCount();
}
get isEnabled() {

@@ -406,3 +406,3 @@ return this._isEnabled && !this.isSilent;

spinner.succeed();
} catch (_) {
} catch {
spinner.fail();

@@ -409,0 +409,0 @@ }

{
"name": "ora",
"version": "5.1.0",
"version": "5.2.0",
"description": "Elegant terminal spinner",

@@ -40,8 +40,8 @@ "license": "MIT",

"dependencies": {
"bl": "^4.0.3",
"chalk": "^4.1.0",
"cli-cursor": "^3.1.0",
"cli-spinners": "^2.4.0",
"cli-spinners": "^2.5.0",
"is-interactive": "^1.0.0",
"log-symbols": "^4.0.0",
"mute-stream": "0.0.8",
"strip-ansi": "^6.0.0",

@@ -51,8 +51,8 @@ "wcwidth": "^1.0.1"

"devDependencies": {
"@types/node": "^14.0.27",
"@types/node": "^14.14.16",
"ava": "^2.4.0",
"get-stream": "^5.1.0",
"tsd": "^0.13.1",
"xo": "^0.25.0"
"get-stream": "^6.0.0",
"tsd": "^0.14.0",
"xo": "^0.36.1"
}
}

@@ -1,2 +0,2 @@

# ora [![Build Status](https://travis-ci.com/sindresorhus/ora.svg?branch=master)](https://travis-ci.com/github/sindresorhus/ora)
# ora

@@ -264,1 +264,2 @@ > Elegant terminal spinner

- [spinnies](https://github.com/jcarpanelli/spinnies) - Terminal multi-spinner library for Node.js
- [kia](https://github.com/HarryPeach/kia) - Simple terminal spinners for Deno 🦕
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc