@oclif/plugin-version 2.2.57 → 2.3.0

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
@@ -27,7 +27,7 @@ FLAG DESCRIPTIONS
27
27
  Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.
28
28
  ```
29
29
 
30
- _See code: [src/commands/version.ts](https://github.com/oclif/plugin-version/blob/2.2.57/src/commands/version.ts)_
30
+ _See code: [src/commands/version.ts](https://github.com/oclif/plugin-version/blob/2.3.0/src/commands/version.ts)_
31
31
  <!-- commandsstop -->
32
32
 
33
33
  # Contributing
@@ -1,4 +1,4 @@
1
- import { Command, Interfaces } from '@oclif/core';
1
+ import { Command, type Interfaces } from '@oclif/core';
2
2
  export type VersionDetail = Omit<Interfaces.VersionDetails, 'pluginVersions'> & {
3
3
  pluginVersions?: string[];
4
4
  };
@@ -43,7 +43,8 @@ function humanReadableDate(date) {
43
43
  async function formatPlugins(config, plugins) {
44
44
  const sorted = Object.entries(plugins)
45
45
  .map(([name, plugin]) => ({ name, ...plugin }))
46
- .sort((a, b) => (a.name > b.name ? 1 : -1));
46
+ // eslint-disable-next-line unicorn/prefer-simple-sort-comparator
47
+ .toSorted((a, b) => (a.name > b.name ? 1 : -1));
47
48
  return Promise.all(sorted.map(async (plugin) => {
48
49
  const base = `${getFriendlyName(config, plugin.name)} ${ansis.dim(plugin.version)} ${ansis.dim(`(${plugin.type})`)} ${plugin.type === 'link' ? ansis.dim(plugin.root) : ''}`.trim();
49
50
  if (plugin.type === 'user') {
@@ -80,7 +81,7 @@ export default class Version extends Command {
80
81
  const { flags } = await this.parse(Version);
81
82
  const { pluginVersions, ...theRest } = this.config.versionDetails;
82
83
  const versionDetail = { ...theRest };
83
- let output = `${this.config.userAgent}`;
84
+ let output = this.config.userAgent;
84
85
  if (flags.verbose) {
85
86
  const details = await getNpmDetails(this.config.pjson.name);
86
87
  const cliPublishedString = details
@@ -35,5 +35,5 @@
35
35
  ]
36
36
  }
37
37
  },
38
- "version": "2.2.57"
38
+ "version": "2.3.0"
39
39
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/plugin-version",
3
3
  "description": "A command that shows the CLI version",
4
- "version": "2.2.57",
4
+ "version": "2.3.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/plugin-version/issues",
7
7
  "dependencies": {
@@ -21,8 +21,8 @@
21
21
  "@types/which": "^3",
22
22
  "chai": "^4.5.0",
23
23
  "commitlint": "^19",
24
- "eslint": "^9.39.5",
25
- "eslint-config-oclif": "^6.0.179",
24
+ "eslint": "^10.8.1",
25
+ "eslint-config-oclif": "^7.1.5",
26
26
  "eslint-config-prettier": "^10.1.8",
27
27
  "husky": "^9.1.7",
28
28
  "lint-staged": "^15",