@oclif/core 4.0.30 → 4.0.32

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.
@@ -28,6 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.Config = void 0;
30
30
  const ejs = __importStar(require("ejs"));
31
+ const is_wsl_1 = __importDefault(require("is-wsl"));
31
32
  const node_os_1 = require("node:os");
32
33
  const node_path_1 = require("node:path");
33
34
  const node_url_1 = require("node:url");
@@ -293,8 +294,7 @@ class Config {
293
294
  this.channel = this.options.channel || channelFromVersion(this.version);
294
295
  this.valid = this.rootPlugin.valid;
295
296
  this.arch = (0, node_os_1.arch)() === 'ia32' ? 'x86' : (0, node_os_1.arch)();
296
- const { default: isWSL } = await import('is-wsl');
297
- this.platform = isWSL ? 'wsl' : (0, os_1.getPlatform)();
297
+ this.platform = is_wsl_1.default ? 'wsl' : (0, os_1.getPlatform)();
298
298
  this.windows = this.platform === 'win32';
299
299
  this.bin = this.pjson.oclif.bin || this.name;
300
300
  this.binAliases = this.pjson.oclif.binAliases;
@@ -272,7 +272,9 @@ async function tsPath(root, orig, plugin) {
272
272
  }
273
273
  if (cannotTranspileEsm(rootPlugin, plugin, isProduction)) {
274
274
  debug(`Skipping typescript path lookup for ${root} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${rootPlugin?.moduleType})`);
275
- if (plugin?.type === 'link')
275
+ const warningIsDisabled = process.env.OCLIF_DISABLE_LINKED_ESM_WARNING && (0, util_1.isTruthy)(process.env.OCLIF_DISABLE_LINKED_ESM_WARNING);
276
+ // Only warn if the plugin is linked AND the warning is not disabled
277
+ if (plugin?.type === 'link' && !warningIsDisabled)
276
278
  (0, warn_1.memoizedWarn)(`${plugin?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`);
277
279
  return orig;
278
280
  }
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.0.30",
4
+ "version": "4.0.32",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -14,7 +14,7 @@
14
14
  "get-package-type": "^0.1.0",
15
15
  "globby": "^11.1.0",
16
16
  "indent-string": "^4.0.0",
17
- "is-wsl": "^3",
17
+ "is-wsl": "^2.2.0",
18
18
  "lilconfig": "^3.1.2",
19
19
  "minimatch": "^9.0.5",
20
20
  "semver": "^7.6.3",
@@ -56,7 +56,7 @@
56
56
  "husky": "^9.1.6",
57
57
  "lint-staged": "^15",
58
58
  "madge": "^6.1.0",
59
- "mocha": "^10.7.3",
59
+ "mocha": "^10.8.2",
60
60
  "nyc": "^15.1.0",
61
61
  "prettier": "^3.3.3",
62
62
  "shx": "^0.3.4",