@oclif/plugin-test-esbuild 0.4.3 → 0.4.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/README.md CHANGED
@@ -18,7 +18,7 @@ $ npm install -g @oclif/plugin-test-esbuild
18
18
  $ bundle COMMAND
19
19
  running command...
20
20
  $ bundle (--version)
21
- @oclif/plugin-test-esbuild/0.4.3 linux-x64 node-v20.11.1
21
+ @oclif/plugin-test-esbuild/0.4.4 linux-x64 node-v20.11.1
22
22
  $ bundle --help [COMMAND]
23
23
  USAGE
24
24
  $ bundle COMMAND
@@ -2,7 +2,7 @@ import {
2
2
  __toESM,
3
3
  init_cjs_shims,
4
4
  require_lib
5
- } from "./chunk-NET6CTRU.js";
5
+ } from "./chunk-DTYT6BZ4.js";
6
6
 
7
7
  // src/commands/hello/index.ts
8
8
  init_cjs_shims();
@@ -2,7 +2,7 @@ import {
2
2
  __toESM,
3
3
  init_cjs_shims,
4
4
  require_lib
5
- } from "./chunk-NET6CTRU.js";
5
+ } from "./chunk-DTYT6BZ4.js";
6
6
 
7
7
  // src/commands/esbuild.ts
8
8
  init_cjs_shims();
@@ -2323,7 +2323,7 @@ var require_package = __commonJS({
2323
2323
  module.exports = {
2324
2324
  name: "@oclif/core",
2325
2325
  description: "base library for oclif CLIs",
2326
- version: "3.20.1-dev.0",
2326
+ version: "3.21.0",
2327
2327
  author: "Salesforce",
2328
2328
  bugs: "https://github.com/oclif/core/issues",
2329
2329
  dependencies: {
@@ -2360,7 +2360,7 @@ var require_package = __commonJS({
2360
2360
  "@oclif/plugin-help": "^6",
2361
2361
  "@oclif/plugin-plugins": "^4",
2362
2362
  "@oclif/prettier-config": "^0.2.1",
2363
- "@oclif/test": "^3.1.16",
2363
+ "@oclif/test": "^3.2.1",
2364
2364
  "@types/ansi-styles": "^3.2.1",
2365
2365
  "@types/benchmark": "^2.1.5",
2366
2366
  "@types/chai": "^4.3.11",
@@ -2385,7 +2385,7 @@ var require_package = __commonJS({
2385
2385
  "chai-as-promised": "^7.1.1",
2386
2386
  commitlint: "^17.8.1",
2387
2387
  "cross-env": "^7.0.3",
2388
- eslint: "^8.56.0",
2388
+ eslint: "^8.57.0",
2389
2389
  "eslint-config-oclif": "^5.0.2",
2390
2390
  "eslint-config-oclif-typescript": "^3.0.48",
2391
2391
  "eslint-config-prettier": "^9.1.0",
@@ -213494,7 +213494,7 @@ var require_table = __commonJS({
213494
213494
  getCSVRow(d) {
213495
213495
  const values = this.columns.map((col) => d[col.key] || "");
213496
213496
  const lineToBeEscaped = values.find((e) => e.includes('"') || e.includes("\n") || e.includes("\r\n") || e.includes("\r") || e.includes(","));
213497
- return values.map((e) => lineToBeEscaped ? `"${e.replace('"', '""')}"` : e);
213497
+ return values.map((e) => lineToBeEscaped ? `"${e.replaceAll('"', '""')}"` : e);
213498
213498
  }
213499
213499
  outputCSV() {
213500
213500
  const { columns, data, options } = this;
@@ -228274,19 +228274,18 @@ var require_plugin = __commonJS({
228274
228274
  this.isRoot = this.options.isRoot ?? false;
228275
228275
  if (this.options.parent)
228276
228276
  this.parent = this.options.parent;
228277
- const root = this.type === "link" && !this.parent ? this.options.root : await (0, find_root_1.findRoot)(this.options.name, this.options.root);
228277
+ const root = this.options.pjson && this.options.isRoot ? this.options.root : this.type === "link" && !this.parent ? this.options.root : await (0, find_root_1.findRoot)(this.options.name, this.options.root);
228278
228278
  if (!root)
228279
228279
  throw new errors_1.CLIError(`could not find package.json with ${(0, node_util_1.inspect)(this.options)}`);
228280
228280
  this.root = root;
228281
228281
  this._debug(`loading ${this.type} plugin from ${root}`);
228282
- this.pjson = await (0, fs_1.readJson)((0, node_path_1.join)(root, "package.json"));
228282
+ this.pjson = this.options.pjson ?? await (0, fs_1.readJson)((0, node_path_1.join)(root, "package.json"));
228283
228283
  this.flexibleTaxonomy = this.options?.flexibleTaxonomy || this.pjson.oclif?.flexibleTaxonomy || false;
228284
228284
  this.moduleType = this.pjson.type === "module" ? "module" : "commonjs";
228285
228285
  this.name = this.pjson.name;
228286
228286
  this.alias = this.options.name ?? this.pjson.name;
228287
- const pjsonPath = (0, node_path_1.join)(root, "package.json");
228288
228287
  if (!this.name)
228289
- throw new errors_1.CLIError(`no name in ${pjsonPath}`);
228288
+ throw new errors_1.CLIError(`no name in package.json (${root})`);
228290
228289
  this._debug = (0, util_2.Debug)(this.name);
228291
228290
  this.version = this.pjson.version;
228292
228291
  if (this.pjson.oclif) {
@@ -228447,7 +228446,6 @@ This usually means you have an oclif.manifest.json file that should be deleted i
228447
228446
  }
228448
228447
  }
228449
228448
  warn(err, scope) {
228450
- console.trace();
228451
228449
  if (this.warned)
228452
228450
  return;
228453
228451
  if (typeof err === "string")
@@ -228524,14 +228522,14 @@ var require_plugin_loader = __commonJS({
228524
228522
  }
228525
228523
  return { errors: this.errors, plugins: this.plugins };
228526
228524
  }
228527
- async loadRoot() {
228525
+ async loadRoot({ pjson }) {
228528
228526
  let rootPlugin;
228529
228527
  if (this.pluginsProvided) {
228530
228528
  const plugins = [...this.plugins.values()];
228531
228529
  rootPlugin = plugins.find((p) => p.root === this.options.root) ?? plugins[0];
228532
228530
  } else {
228533
228531
  const marker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, "plugin.load#root");
228534
- rootPlugin = new Plugin.Plugin({ isRoot: true, root: this.options.root });
228532
+ rootPlugin = new Plugin.Plugin({ isRoot: true, pjson, root: this.options.root });
228535
228533
  await rootPlugin.load();
228536
228534
  marker?.addDetails({
228537
228535
  commandCount: rootPlugin.commands.length,
@@ -228896,7 +228894,7 @@ var require_config3 = __commonJS({
228896
228894
  settings_1.settings.performanceEnabled = (settings_1.settings.performanceEnabled === void 0 ? this.options.enablePerf : settings_1.settings.performanceEnabled) ?? false;
228897
228895
  const marker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, "config.load");
228898
228896
  this.pluginLoader = new plugin_loader_1.default({ plugins: this.options.plugins, root: this.options.root });
228899
- this.rootPlugin = await this.pluginLoader.loadRoot();
228897
+ this.rootPlugin = await this.pluginLoader.loadRoot({ pjson: this.options.pjson });
228900
228898
  const cache = cache_1.default.getInstance();
228901
228899
  cache.set("rootPlugin", this.rootPlugin);
228902
228900
  cache.set("exitCodes", this.rootPlugin.pjson.oclif.exitCodes ?? {});
@@ -230727,10 +230725,14 @@ var require_execute = __commonJS({
230727
230725
  Object.defineProperty(exports, "__esModule", { value: true });
230728
230726
  exports.execute = void 0;
230729
230727
  var flush_1 = require_flush();
230728
+ var errors_1 = require_errors();
230730
230729
  var handle_1 = require_handle();
230731
230730
  var main_1 = require_main();
230732
230731
  var settings_1 = require_settings();
230733
230732
  async function execute(options) {
230733
+ if (!options.dir && !options.loadOptions) {
230734
+ throw new errors_1.CLIError("dir or loadOptions is required.");
230735
+ }
230734
230736
  if (options.development) {
230735
230737
  process.env.NODE_ENV = "development";
230736
230738
  settings_1.settings.debug = true;
@@ -2,7 +2,7 @@ import {
2
2
  __toESM,
3
3
  init_cjs_shims,
4
4
  require_lib
5
- } from "./chunk-NET6CTRU.js";
5
+ } from "./chunk-DTYT6BZ4.js";
6
6
 
7
7
  // src/hooks/init/init.ts
8
8
  init_cjs_shims();
@@ -2,7 +2,7 @@ import {
2
2
  __toESM,
3
3
  init_cjs_shims,
4
4
  require_lib
5
- } from "./chunk-NET6CTRU.js";
5
+ } from "./chunk-DTYT6BZ4.js";
6
6
 
7
7
  // src/commands/hello/world.ts
8
8
  init_cjs_shims();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ESBuild
3
- } from "../chunk-I2Y7BTZP.js";
4
- import "../chunk-NET6CTRU.js";
3
+ } from "../chunk-DH5NIOE2.js";
4
+ import "../chunk-DTYT6BZ4.js";
5
5
  export {
6
6
  ESBuild as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Hello
3
- } from "../../chunk-T3WI7GAZ.js";
4
- import "../../chunk-NET6CTRU.js";
3
+ } from "../../chunk-BYM4WPEW.js";
4
+ import "../../chunk-DTYT6BZ4.js";
5
5
  export {
6
6
  Hello as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  World
3
- } from "../../chunk-YOJ7W5SK.js";
4
- import "../../chunk-NET6CTRU.js";
3
+ } from "../../chunk-M3FZD5UL.js";
4
+ import "../../chunk-DTYT6BZ4.js";
5
5
  export {
6
6
  World as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_default
3
- } from "../../chunk-6AQAVIMI.js";
4
- import "../../chunk-NET6CTRU.js";
3
+ } from "../../chunk-F3MMY7AL.js";
4
+ import "../../chunk-DTYT6BZ4.js";
5
5
  export {
6
6
  init_default as default
7
7
  };
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  ESBuild
3
- } from "./chunk-I2Y7BTZP.js";
3
+ } from "./chunk-DH5NIOE2.js";
4
4
  import {
5
5
  Hello
6
- } from "./chunk-T3WI7GAZ.js";
6
+ } from "./chunk-BYM4WPEW.js";
7
7
  import {
8
8
  World
9
- } from "./chunk-YOJ7W5SK.js";
9
+ } from "./chunk-M3FZD5UL.js";
10
10
  import {
11
11
  init_default
12
- } from "./chunk-6AQAVIMI.js";
12
+ } from "./chunk-F3MMY7AL.js";
13
13
  import {
14
14
  __commonJS,
15
15
  __toESM,
16
16
  init_cjs_shims,
17
17
  require_lib,
18
18
  require_src
19
- } from "./chunk-NET6CTRU.js";
19
+ } from "./chunk-DTYT6BZ4.js";
20
20
 
21
21
  // node_modules/semver/internal/constants.js
22
22
  var require_constants = __commonJS({
@@ -2992,16 +2992,17 @@ var Plugins = class {
2992
2992
  root,
2993
2993
  userPlugins: false
2994
2994
  });
2995
- await this.refresh({ all: true, prod: true }, plugin.root);
2996
2995
  this.isValidPlugin(plugin);
2997
2996
  await this.add({ name, type: "user", url });
2998
2997
  if (plugin.getPluginsList().find((p) => p.root === root)?.moduleType === "module" && await fileExists(join3(plugin.root, "tsconfig.json"))) {
2999
2998
  try {
2999
+ await this.yarn.exec(["install"], { ...yarnOpts, cwd: plugin.root });
3000
3000
  await this.yarn.exec(["run", "tsc"], { ...yarnOpts, cwd: plugin.root });
3001
3001
  } catch (error) {
3002
3002
  this.debug(error);
3003
3003
  }
3004
3004
  }
3005
+ await this.refresh({ all: true, prod: true }, plugin.root);
3005
3006
  } else {
3006
3007
  const range = (0, import_semver.validRange)(tag);
3007
3008
  const unfriendly = this.unfriendlyName(name);
@@ -467,5 +467,5 @@
467
467
  "enableJsonFlag": false
468
468
  }
469
469
  },
470
- "version": "0.4.3"
470
+ "version": "0.4.4"
471
471
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oclif/plugin-test-esbuild",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Bundled plugin for testing",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/plugin-test-esbuild/issues",
@@ -11,15 +11,15 @@
11
11
  "bundle": "./bin/run.js"
12
12
  },
13
13
  "dependencies": {
14
- "@oclif/core": "3.20.1-dev.0",
15
- "@oclif/plugin-test-esm-1": "^0.7.1",
16
- "@oclif/plugin-plugins": "4.2.6-dev.0"
14
+ "@oclif/core": "^3.21.0",
15
+ "@oclif/plugin-test-esm-1": "^0.7.3",
16
+ "@oclif/plugin-plugins": "^4.3.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@oclif/prettier-config": "^0.2.1",
20
20
  "@oclif/test": "^3",
21
21
  "@types/chai": "^4",
22
- "@types/mocha": "^9.0.0",
22
+ "@types/mocha": "^10.0.0",
23
23
  "@types/node": "^18",
24
24
  "chai": "^4",
25
25
  "esbuild": "^0.20.1",
@@ -28,14 +28,11 @@
28
28
  "eslint-config-oclif-typescript": "^3",
29
29
  "eslint-config-prettier": "^9.1.0",
30
30
  "mocha": "^10",
31
- "oclif": "4.4.13-dev.1",
31
+ "oclif": "^4.5.2",
32
32
  "shx": "^0.3.4",
33
33
  "ts-node": "^10.9.2",
34
34
  "typescript": "^5"
35
35
  },
36
- "resolutions": {
37
- "@oclif/core": "3.20.1-dev.0"
38
- },
39
36
  "engines": {
40
37
  "node": ">=18.0.0"
41
38
  },