@oclif/core 1.3.0 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,34 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.3.4](https://github.com/oclif/core/compare/v1.3.3...v1.3.4) (2022-02-11)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * use error type instead of record ([#371](https://github.com/oclif/core/issues/371)) ([136ffe0](https://github.com/oclif/core/commit/136ffe06fe3dc3ddb6d018ced2b2cfaa9399d943))
11
+
12
+ ### [1.3.3](https://github.com/oclif/core/compare/v1.3.2...v1.3.3) (2022-02-09)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * update isProd utility ([#368](https://github.com/oclif/core/issues/368)) ([a58315d](https://github.com/oclif/core/commit/a58315dc401071675c0f1b08a7ab82c35846ce6d))
18
+
19
+ ### [1.3.2](https://github.com/oclif/core/compare/v1.3.1...v1.3.2) (2022-02-08)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * fix default import of lodash ([#366](https://github.com/oclif/core/issues/366)) ([99fc7d1](https://github.com/oclif/core/commit/99fc7d1fdddbcd1509f649723057cd0ba7ee414c))
25
+
26
+ ### [1.3.1](https://github.com/oclif/core/compare/v1.3.0...v1.3.1) (2022-02-07)
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * Command parsing hangs under unit test ([#363](https://github.com/oclif/core/issues/363)) ([cb88427](https://github.com/oclif/core/commit/cb88427be5c1d5303b5cd7ef2d671f25ac6e91e6))
32
+
5
33
  ## [1.3.0](https://github.com/oclif/core/compare/v1.2.1...v1.3.0) (2022-02-01)
6
34
 
7
35
 
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  // this code is largely taken from opn
4
4
  const childProcess = require("child_process");
5
- const lodash_1 = require("lodash");
5
+ const _ = require("lodash");
6
6
  const isWsl = require('is-wsl');
7
7
  function open(target, opts = {}) {
8
8
  // opts = {wait: true, ...opts}
@@ -59,7 +59,7 @@ function open(target, opts = {}) {
59
59
  return new Promise((resolve, reject) => {
60
60
  cp.once('error', reject);
61
61
  cp.once('close', code => {
62
- if (lodash_1.default.isNumber(code) && code > 0) {
62
+ if (_.isNumber(code) && code > 0) {
63
63
  reject(new Error('Exited with code ' + code));
64
64
  return;
65
65
  }
package/lib/command.d.ts CHANGED
@@ -93,7 +93,9 @@ export default abstract class Command {
93
93
  protected parse<F, A extends {
94
94
  [name: string]: any;
95
95
  }>(options?: Interfaces.Input<F>, argv?: string[]): Promise<Interfaces.ParserOutput<F, A>>;
96
- protected catch(err: Record<string, any>): Promise<any>;
96
+ protected catch(err: Error & {
97
+ exitCode?: number;
98
+ }): Promise<any>;
97
99
  protected finally(_: Error | undefined): Promise<any>;
98
100
  protected toSuccessJson(result: unknown): any;
99
101
  protected toErrorJson(err: unknown): any;
@@ -20,7 +20,7 @@ catch {
20
20
  const readStdin = async () => {
21
21
  const { stdin } = process;
22
22
  let result;
23
- if (stdin.isTTY)
23
+ if (stdin.isTTY || stdin.isTTY === undefined)
24
24
  return result;
25
25
  result = '';
26
26
  stdin.setEncoding('utf8');
package/lib/util.js CHANGED
@@ -40,6 +40,7 @@ function castArray(input) {
40
40
  }
41
41
  exports.castArray = castArray;
42
42
  function isProd() {
43
- return process.env.NODE_ENV !== 'development';
43
+ var _a;
44
+ return !['development', 'test'].includes((_a = process.env.NODE_ENV) !== null && _a !== void 0 ? _a : '');
44
45
  }
45
46
  exports.isProd = isProd;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "1.3.0",
4
+ "version": "1.3.4",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {