@oclif/core 3.25.1 → 3.25.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/help/index.js CHANGED
@@ -8,6 +8,7 @@ const node_util_1 = require("node:util");
8
8
  const strip_ansi_1 = __importDefault(require("strip-ansi"));
9
9
  const theme_1 = require("../cli-ux/theme");
10
10
  const write_1 = __importDefault(require("../cli-ux/write"));
11
+ const ts_path_1 = require("../config/ts-path");
11
12
  const error_1 = require("../errors/error");
12
13
  const module_loader_1 = require("../module-loader");
13
14
  const symbols_1 = require("../symbols");
@@ -321,7 +322,8 @@ async function loadHelpClass(config) {
321
322
  const configuredClass = pjson.oclif?.helpClass;
322
323
  if (configuredClass) {
323
324
  try {
324
- const exported = (await (0, module_loader_1.load)(config, configuredClass));
325
+ const path = (await (0, ts_path_1.tsPath)(config.root, configuredClass)) ?? configuredClass;
326
+ const exported = await (0, module_loader_1.load)(config, path);
325
327
  return extractClass(exported);
326
328
  }
327
329
  catch (error) {
@@ -11,8 +11,7 @@ const getPackageType = require('get-package-type');
11
11
  /**
12
12
  * Defines file extension resolution when source files do not have an extension.
13
13
  */
14
- // eslint-disable-next-line camelcase
15
- const s_EXTENSIONS = ['.ts', '.js', '.mjs', '.cjs', '.mts', '.cts'];
14
+ const SUPPORTED_EXTENSIONS = ['.ts', '.js', '.mjs', '.cjs', '.mts', '.cts', '.tsx', '.jsx'];
16
15
  const isPlugin = (config) => config.type !== undefined;
17
16
  function handleError(error, isESM, path) {
18
17
  if (error.code === 'MODULE_NOT_FOUND' || error.code === 'ERR_MODULE_NOT_FOUND') {
@@ -198,8 +197,7 @@ async function resolvePath(config, modulePath) {
198
197
  * @returns {string | null} Modified file path including extension or null if file is not found.
199
198
  */
200
199
  function findFile(filePath) {
201
- // eslint-disable-next-line camelcase
202
- for (const extension of s_EXTENSIONS) {
200
+ for (const extension of SUPPORTED_EXTENSIONS) {
203
201
  const testPath = `${filePath}${extension}`;
204
202
  if ((0, fs_1.existsSync)(testPath)) {
205
203
  return testPath;
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": "3.25.1",
4
+ "version": "3.25.2",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {