Comparing version 5.3.0 to 5.4.0
@@ -35,3 +35,3 @@ /// <reference types="node"/> | ||
/** | ||
Name of one of the provided spinners. See [`example.js`](https://github.com/BendingBender/ora/blob/master/example.js) in this repo if you want to test out different spinners. On Windows, it will always use the line spinner as the Windows command-line doesn't have proper Unicode support. | ||
Name of one of the provided spinners. See [`example.js`](https://github.com/BendingBender/ora/blob/main/example.js) in this repo if you want to test out different spinners. On Windows, it will always use the line spinner as the Windows command-line doesn't have proper Unicode support. | ||
@@ -38,0 +38,0 @@ @default 'dots' |
14
index.js
@@ -10,2 +10,3 @@ 'use strict'; | ||
const isInteractive = require('is-interactive'); | ||
const isUnicodeSupported = require('is-unicode-supported'); | ||
const {BufferListStream} = require('bl'); | ||
@@ -15,11 +16,4 @@ | ||
const PREFIX_TEXT = Symbol('prefixText'); | ||
const ASCII_ETX_CODE = 0x03; // Ctrl+C emits this code | ||
const terminalSupportsUnicode = () => ( | ||
process.platform !== 'win32' || | ||
process.env.TERM_PROGRAM === 'vscode' || | ||
Boolean(process.env.WT_SESSION) | ||
); | ||
class StdinDiscarder { | ||
@@ -32,3 +26,3 @@ constructor() { | ||
const self = this; | ||
const self = this; // eslint-disable-line unicorn/no-this-assignment | ||
this.ourEmit = function (event, data, ...args) { | ||
@@ -175,3 +169,3 @@ const {stdin} = process; | ||
this._spinner = spinner; | ||
} else if (!terminalSupportsUnicode()) { | ||
} else if (!isUnicodeSupported()) { | ||
this._spinner = cliSpinners.line; | ||
@@ -184,3 +178,3 @@ } else if (spinner === undefined) { | ||
} else { | ||
throw new Error(`There is no built-in spinner named '${spinner}'. See https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json for a full list.`); | ||
throw new Error(`There is no built-in spinner named '${spinner}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`); | ||
} | ||
@@ -187,0 +181,0 @@ |
{ | ||
"name": "ora", | ||
"version": "5.3.0", | ||
"version": "5.4.0", | ||
"description": "Elegant terminal spinner", | ||
@@ -40,3 +40,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"bl": "^4.0.3", | ||
"bl": "^4.1.0", | ||
"chalk": "^4.1.0", | ||
@@ -46,3 +46,4 @@ "cli-cursor": "^3.1.0", | ||
"is-interactive": "^1.0.0", | ||
"log-symbols": "^4.0.0", | ||
"is-unicode-supported": "^0.1.0", | ||
"log-symbols": "^4.1.0", | ||
"strip-ansi": "^6.0.0", | ||
@@ -52,8 +53,8 @@ "wcwidth": "^1.0.1" | ||
"devDependencies": { | ||
"@types/node": "^14.14.16", | ||
"@types/node": "^14.14.35", | ||
"ava": "^2.4.0", | ||
"get-stream": "^6.0.0", | ||
"tsd": "^0.14.0", | ||
"xo": "^0.36.1" | ||
"xo": "^0.38.2" | ||
} | ||
} |
@@ -58,3 +58,3 @@ # ora | ||
Name of one of the [provided spinners](https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json). See `example.js` in this repo if you want to test out different spinners. On Windows, it will always use the `line` spinner as the Windows command-line doesn't have proper Unicode support. | ||
Name of one of the [provided spinners](https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json). See `example.js` in this repo if you want to test out different spinners. On Windows, it will always use the `line` spinner as the Windows command-line doesn't have proper Unicode support. | ||
@@ -61,0 +61,0 @@ Or an object like: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
1
23252
9
531
+ Addedis-unicode-supported@^0.1.0
Updatedbl@^4.1.0
Updatedlog-symbols@^4.1.0