Socket
Socket
Sign inDemoInstall

cli-ux

Package Overview
Dependencies
Maintainers
6
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-ux - npm Package Compare versions

Comparing version 5.4.6 to 5.4.7

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [5.4.7](https://github.com/oclif/cli-ux/compare/v5.4.6...v5.4.7) (2020-06-29)
### Bug Fixes
* smaller bundle size, cut lodash imports ([#107](https://github.com/oclif/cli-ux/issues/107)) ([41cdbc7](https://github.com/oclif/cli-ux/commit/41cdbc7839cf97e2a051bd72871371282b3bb4d6))
## [4.9.3](https://github.com/oclif/cli-ux/compare/v4.9.2...v4.9.3) (2018-10-29)

@@ -2,0 +9,0 @@

5

lib/action/base.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActionBase = void 0;
const tslib_1 = require("tslib");
const _ = tslib_1.__importStar(require("lodash"));
const castArray_1 = tslib_1.__importDefault(require("lodash/castArray"));
const util_1 = require("util");

@@ -171,5 +170,5 @@ class ActionBase {

_write(std, s) {
this.stdmockOrigs[std].apply(process[std], _.castArray(s));
this.stdmockOrigs[std].apply(process[std], castArray_1.default(s));
}
}
exports.ActionBase = ActionBase;

1

lib/config.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.config = exports.Config = void 0;
const tslib_1 = require("tslib");

@@ -5,0 +4,0 @@ const semver = tslib_1.__importStar(require("semver"));

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deps = void 0;
const cache = {};

@@ -5,0 +4,0 @@ function fetch(s) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExitError = void 0;
class ExitError extends Error {

@@ -5,0 +4,0 @@ constructor(status, error) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Table = exports.ExitError = exports.Config = exports.ActionBase = exports.config = exports.cli = exports.ux = void 0;
const tslib_1 = require("tslib");

@@ -8,9 +7,9 @@ const Errors = tslib_1.__importStar(require("@oclif/errors"));

const base_1 = require("./action/base");
Object.defineProperty(exports, "ActionBase", { enumerable: true, get: function () { return base_1.ActionBase; } });
exports.ActionBase = base_1.ActionBase;
const config_1 = require("./config");
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return config_1.config; } });
Object.defineProperty(exports, "Config", { enumerable: true, get: function () { return config_1.Config; } });
exports.config = config_1.config;
exports.Config = config_1.Config;
const deps_1 = tslib_1.__importDefault(require("./deps"));
const exit_1 = require("./exit");
Object.defineProperty(exports, "ExitError", { enumerable: true, get: function () { return exit_1.ExitError; } });
exports.ExitError = exit_1.ExitError;
const Table = tslib_1.__importStar(require("./styled/table"));

@@ -17,0 +16,0 @@ exports.Table = Table;

"use strict";
// tslint:disable
Object.defineProperty(exports, "__esModule", { value: true });
exports.renderList = void 0;
const tslib_1 = require("tslib");
const _ = tslib_1.__importStar(require("lodash"));
const maxBy_1 = tslib_1.__importDefault(require("lodash/maxBy"));
const deps_1 = tslib_1.__importDefault(require("./deps"));

@@ -18,3 +17,3 @@ function linewrap(length, s) {

}
const maxLength = _.maxBy(items, '[0].length')[0].length;
const maxLength = maxBy_1.default(items, '[0].length')[0].length;
const lines = items.map(i => {

@@ -26,3 +25,3 @@ let left = i[0];

}
left = `${_.padEnd(left, maxLength)}`;
left = left.padEnd(maxLength);
right = linewrap(maxLength + 2, right);

@@ -29,0 +28,0 @@ return `${left} ${right}`;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.anykey = exports.confirm = exports.prompt = void 0;
const tslib_1 = require("tslib");

@@ -5,0 +4,0 @@ const errors_1 = require("@oclif/errors");

@@ -9,3 +9,3 @@ "use strict";

const json = JSON.stringify(obj, null, 2);
if (!chalk_1.default.enabled) {
if (!chalk_1.default.level) {
__1.default.info(json);

@@ -12,0 +12,0 @@ return;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.table = void 0;
const tslib_1 = require("tslib");

@@ -8,4 +7,5 @@ const command_1 = require("@oclif/command");

const chalk_1 = tslib_1.__importDefault(require("chalk"));
const capitalize_1 = tslib_1.__importDefault(require("lodash/capitalize"));
const sumBy_1 = tslib_1.__importDefault(require("lodash/sumBy"));
const js_yaml_1 = require("js-yaml");
const _ = tslib_1.__importStar(require("lodash"));
const util_1 = require("util");

@@ -22,3 +22,3 @@ const sw = require('string-width');

const get = col.get || ((row) => row[key]);
const header = typeof col.header === 'string' ? col.header : _.capitalize(key.replace(/_/g, ' '));
const header = typeof col.header === 'string' ? col.header : capitalize_1.default(key.replace(/_/g, ' '));
const minWidth = Math.max(col.minWidth || 0, sw(header) + 1);

@@ -188,3 +188,3 @@ return {

// don't shorten if there is enough screen width
const dataMaxWidth = _.sumBy(columns, c => c.width);
const dataMaxWidth = sumBy_1.default(columns, c => c.width);
const overWidth = dataMaxWidth - maxWidth;

@@ -200,3 +200,3 @@ if (overWidth <= 0)

// display all as minWidth
const dataMinWidth = _.sumBy(columns, c => c.minWidth);
const dataMinWidth = sumBy_1.default(columns, c => c.minWidth);
if (dataMinWidth >= maxWidth)

@@ -206,7 +206,7 @@ return;

let wiggleRoom = maxWidth - dataMinWidth;
const needyCols = _.sortBy(columns.map(c => ({ key: c.key, needs: c.maxWidth - c.width })), c => c.needs);
const needyCols = columns.map(c => ({ key: c.key, needs: c.maxWidth - c.width })).sort((a, b) => a.needs - b.needs);
for (const { key, needs } of needyCols) {
if (!needs)
continue;
const col = _.find(columns, c => (key === c.key));
const col = columns.find(c => key === c.key);
if (!col)

@@ -213,0 +213,0 @@ continue;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Tree = void 0;
const treeify = require('object-treeify');

@@ -5,0 +4,0 @@ class Tree {

{
"name": "cli-ux",
"description": "cli IO utilities",
"version": "5.4.6",
"version": "5.4.7",
"author": "Jeff Dickey @jdxcode",

@@ -15,7 +15,7 @@ "bugs": "https://github.com/oclif/cli-ux/issues",

"cardinal": "^2.1.1",
"chalk": "^2.4.1",
"chalk": "^3.0.0",
"clean-stack": "^2.0.0",
"cli-progress": "^3.4.0",
"extract-stack": "^1.0.0",
"fs-extra": "^7.0.1",
"fs-extra": "^9.0.1",
"hyperlinker": "^1.0.0",

@@ -30,3 +30,3 @@ "indent-string": "^4.0.0",

"semver": "^5.6.0",
"string-width": "^3.1.0",
"string-width": "^4.2.0",
"strip-ansi": "^5.1.0",

@@ -62,3 +62,3 @@ "supports-color": "^5.5.0",

"ts-node": "^8.0.3",
"typescript": "^3.8.3"
"typescript": "3.8.3"
},

@@ -81,3 +81,3 @@ "engines": {

"lint": "eslint . --ext .ts --config .eslintrc",
"pretest": "tsc -p test --noEmit",
"pretest": "yarn build --noEmit && tsc -p test --noEmit",
"test": "mocha --forbid-only \"test/**/*.test.ts\"",

@@ -84,0 +84,0 @@ "posttest": "yarn lint",

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