@oclif/core 1.1.1 → 1.1.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/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.1.2](https://github.com/oclif/core/compare/v1.1.1...v1.1.2) (2022-01-10)
6
+
5
7
  ### [1.1.1](https://github.com/oclif/core/compare/v1.1.0...v1.1.1) (2022-01-06)
6
8
 
7
9
 
package/README.md CHANGED
@@ -24,14 +24,14 @@ Without the generator, you can create a simple CLI like this:
24
24
  #!/usr/bin/env ts-node
25
25
 
26
26
  import * as fs from 'fs'
27
- import {Command, flags} from '@oclif/core'
27
+ import {Command, Flags} from '@oclif/core'
28
28
 
29
29
  class LS extends Command {
30
30
  static flags = {
31
- version: flags.version(),
32
- help: flags.help(),
31
+ version: Flags.version(),
32
+ help: Flags.help(),
33
33
  // run with --dir= or -d=
34
- dir: flags.string({
34
+ dir: Flags.string({
35
35
  char: 'd',
36
36
  default: process.cwd(),
37
37
  }),
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toCached = exports.Config = void 0;
4
4
  const errors_1 = require("../errors");
5
- const Lodash = require("lodash");
5
+ const ejs = require("ejs");
6
6
  const os = require("os");
7
7
  const path = require("path");
8
8
  const url_1 = require("url");
@@ -304,7 +304,7 @@ class Config {
304
304
  get commandIDs() {
305
305
  if (this._commandIDs)
306
306
  return this._commandIDs;
307
- const ids = Lodash.flattenDeep(this.commands.map(c => [c.id, c.aliases]));
307
+ const ids = this.commands.flatMap(c => [c.id, ...c.aliases]);
308
308
  this._commandIDs = (0, util_3.uniq)(ids);
309
309
  return this._commandIDs;
310
310
  }
@@ -338,12 +338,13 @@ class Config {
338
338
  return this._topics;
339
339
  }
340
340
  s3Key(type, ext, options = {}) {
341
+ var _a;
341
342
  if (typeof ext === 'object')
342
343
  options = ext;
343
344
  else if (ext)
344
345
  options.ext = ext;
345
- const _ = require('lodash');
346
- return _.template(this.pjson.oclif.update.s3.templates[options.platform ? 'target' : 'vanilla'][type])({ ...this, ...options });
346
+ const template = (_a = this.pjson.oclif.update.s3.templates[options.platform ? 'target' : 'vanilla'][type]) !== null && _a !== void 0 ? _a : '';
347
+ return ejs.render(template, { ...this, ...options });
347
348
  }
348
349
  s3Url(key) {
349
350
  const host = this.pjson.oclif.update.s3.host;
package/lib/help/util.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.standardizeIDFromArgv = exports.toConfiguredId = exports.toStandardizedId = exports.template = exports.loadHelpClass = void 0;
4
- const _ = require("lodash");
4
+ const ejs = require("ejs");
5
5
  const _1 = require(".");
6
6
  const module_loader_1 = require("../module-loader");
7
7
  function extractClass(exported) {
@@ -24,7 +24,7 @@ async function loadHelpClass(config) {
24
24
  exports.loadHelpClass = loadHelpClass;
25
25
  function template(context) {
26
26
  function render(t) {
27
- return _.template(t)(context);
27
+ return ejs.render(t, context);
28
28
  }
29
29
  return render;
30
30
  }
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": "1.1.1",
4
+ "version": "1.1.2",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -10,12 +10,12 @@
10
10
  "clean-stack": "^3.0.1",
11
11
  "cli-ux": "^6.0.6",
12
12
  "debug": "^4.3.3",
13
+ "ejs": "^3.1.6",
13
14
  "fs-extra": "^9.1.0",
14
15
  "get-package-type": "^0.1.0",
15
16
  "globby": "^11.0.4",
16
17
  "indent-string": "^4.0.0",
17
18
  "is-wsl": "^2.2.0",
18
- "lodash": "^4.17.21",
19
19
  "semver": "^7.3.5",
20
20
  "string-width": "^4.2.3",
21
21
  "strip-ansi": "^6.0.1",
@@ -31,9 +31,9 @@
31
31
  "@types/chai": "^4.2.22",
32
32
  "@types/chai-as-promised": "^7.1.4",
33
33
  "@types/clean-stack": "^2.1.1",
34
+ "@types/ejs": "^3.1.0",
34
35
  "@types/fs-extra": "^9.0.13",
35
36
  "@types/indent-string": "^4.0.1",
36
- "@types/lodash": "^4.14.177",
37
37
  "@types/mocha": "^8.2.3",
38
38
  "@types/nock": "^11.1.0",
39
39
  "@types/node": "^15.14.9",