@oclif/core 4.3.0 → 4.3.2

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/lib/command.js CHANGED
@@ -227,7 +227,7 @@ class Command {
227
227
  */
228
228
  jsonEnabled() {
229
229
  // If the command doesn't support json, return false
230
- if (!this.ctor.enableJsonFlag)
230
+ if (!this.ctor?.enableJsonFlag)
231
231
  return false;
232
232
  // If the CONTENT_TYPE env var is set to json, return true
233
233
  if (this.config.scopedEnvVar?.('CONTENT_TYPE')?.toLowerCase() === 'json')
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Plugin = void 0;
7
- const globby_1 = __importDefault(require("globby"));
8
7
  const node_path_1 = require("node:path");
9
8
  const node_util_1 = require("node:util");
9
+ const tinyglobby_1 = require("tinyglobby");
10
10
  const cache_1 = __importDefault(require("../cache"));
11
11
  const errors_1 = require("../errors");
12
12
  const module_loader_1 = require("../module-loader");
@@ -331,7 +331,7 @@ class Plugin {
331
331
  if (!commandsDir)
332
332
  return [];
333
333
  this._debug(`loading IDs from ${commandsDir}`);
334
- const files = await (0, globby_1.default)(this.commandDiscoveryOpts?.globPatterns ?? GLOB_PATTERNS, { cwd: commandsDir });
334
+ const files = await (0, tinyglobby_1.glob)(this.commandDiscoveryOpts?.globPatterns ?? GLOB_PATTERNS, { cwd: commandsDir });
335
335
  return processCommandIds(files);
336
336
  }
337
337
  async getCommandIdsFromTarget() {
package/lib/flags.js CHANGED
@@ -14,7 +14,7 @@ function custom(defaults) {
14
14
  ...defaults,
15
15
  ...options,
16
16
  input: [],
17
- multiple: Boolean(options.multiple === undefined ? defaults?.multiple ?? false : options.multiple),
17
+ multiple: Boolean(options.multiple === undefined ? (defaults?.multiple ?? false) : options.multiple),
18
18
  type: 'option',
19
19
  });
20
20
  }
@@ -269,6 +269,7 @@ class Parser {
269
269
  ...context,
270
270
  error: context?.error,
271
271
  exit: context?.exit,
272
+ jsonEnabled: context?.jsonEnabled,
272
273
  log: context?.log,
273
274
  logToStderr: context?.logToStderr,
274
275
  token,
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": "4.3.0",
4
+ "version": "4.3.2",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -12,7 +12,6 @@
12
12
  "debug": "^4.4.0",
13
13
  "ejs": "^3.1.10",
14
14
  "get-package-type": "^0.1.0",
15
- "globby": "^11.1.0",
16
15
  "indent-string": "^4.0.0",
17
16
  "is-wsl": "^2.2.0",
18
17
  "lilconfig": "^3.1.3",
@@ -20,6 +19,7 @@
20
19
  "semver": "^7.6.3",
21
20
  "string-width": "^4.2.3",
22
21
  "supports-color": "^8",
22
+ "tinyglobby": "^0.2.13",
23
23
  "widest-line": "^3.1.0",
24
24
  "wordwrap": "^1.0.0",
25
25
  "wrap-ansi": "^7.0.0"