@oclif/core 4.5.1 → 4.5.3

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.
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Parser = exports.readStdin = void 0;
7
7
  /* eslint-disable no-await-in-loop */
8
+ const node_os_1 = require("node:os");
8
9
  const node_readline_1 = require("node:readline");
9
10
  const cache_1 = __importDefault(require("../cache"));
10
11
  const logger_1 = require("../logger");
@@ -38,7 +39,7 @@ const readStdin = async () => {
38
39
  return globalThis.oclif.stdinCache;
39
40
  }
40
41
  return new Promise((resolve) => {
41
- let result = '';
42
+ const lines = [];
42
43
  const ac = new AbortController();
43
44
  const { signal } = ac;
44
45
  const timeout = setTimeout(() => ac.abort(), 10);
@@ -48,9 +49,10 @@ const readStdin = async () => {
48
49
  terminal: false,
49
50
  });
50
51
  rl.on('line', (line) => {
51
- result += line;
52
+ lines.push(line);
52
53
  });
53
54
  rl.once('close', () => {
55
+ const result = lines.join(node_os_1.EOL);
54
56
  clearTimeout(timeout);
55
57
  debug('resolved from stdin', result);
56
58
  globalThis.oclif = { ...globalThis.oclif, stdinCache: result };
@@ -78,7 +78,8 @@ async function cacheCommand(uncachedCmd, plugin, respectNoCacheDefault = false)
78
78
  cacheArgs((0, ensure_arg_object_1.ensureArgObject)(cmd.args), respectNoCacheDefault),
79
79
  ]);
80
80
  const stdProperties = {
81
- aliases: cmd.aliases ?? [],
81
+ // Replace all spaces in aliases with colons to standardize them.
82
+ aliases: (cmd.aliases ?? []).map((a) => a.replaceAll(' ', ':')),
82
83
  args,
83
84
  deprecateAliases: cmd.deprecateAliases,
84
85
  deprecationOptions: cmd.deprecationOptions,
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.5.1",
4
+ "version": "4.5.3",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "@commitlint/config-conventional": "^19",
29
- "@eslint/compat": "^1.3.1",
29
+ "@eslint/compat": "^1.3.2",
30
30
  "@oclif/plugin-help": "^6",
31
31
  "@oclif/plugin-plugins": "^5",
32
32
  "@oclif/prettier-config": "^0.2.1",
@@ -56,13 +56,13 @@
56
56
  "husky": "^9.1.7",
57
57
  "lint-staged": "^15",
58
58
  "madge": "^6.1.0",
59
- "mocha": "^10.8.2",
59
+ "mocha": "^11.7.2",
60
60
  "nyc": "^15.1.0",
61
61
  "prettier": "^3.6.2",
62
62
  "shx": "^0.4.0",
63
63
  "sinon": "^18",
64
64
  "ts-node": "^10.9.2",
65
- "tsd": "^0.32.0",
65
+ "tsd": "^0.33.0",
66
66
  "typescript": "^5"
67
67
  },
68
68
  "engines": {