@oclif/plugin-version 2.3.0 → 3.0.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.3.0/src/commands/version.ts)_
30
+ _See code: [src/commands/version.ts](https://github.com/oclif/plugin-version/blob/3.0.0/src/commands/version.ts)_
31
31
  <!-- commandsstop -->
32
32
 
33
33
  # Contributing
@@ -2,21 +2,21 @@ import { Command, Flags } from '@oclif/core';
2
2
  import { Ansis } from 'ansis';
3
3
  import { execFile } from 'node:child_process';
4
4
  import { EOL } from 'node:os';
5
- import { dirname, resolve } from 'node:path';
5
+ import path from 'node:path';
6
6
  import which from 'which';
7
7
  const ansis = new Ansis();
8
8
  async function getNpmDetails(pkg) {
9
9
  return new Promise((resolve_) => {
10
10
  // Resolve npm from PATH only, excluding CWD. On Windows, both execFile (CreateProcess)
11
11
  // and the `which` module resolve executables from CWD before PATH.
12
- const cwd = resolve(process.cwd());
12
+ const cwd = path.resolve(process.cwd());
13
13
  const npmPath = which.sync('npm', { nothrow: true });
14
- if (!npmPath || dirname(resolve(npmPath)) === cwd) {
14
+ if (!npmPath || path.dirname(path.resolve(npmPath)) === cwd) {
15
15
  resolve_(false);
16
16
  return;
17
17
  }
18
- const useShell = /\.(cmd|bat)$/i.test(npmPath);
19
- execFile(npmPath, ['view', pkg, '--json'], { shell: useShell }, (error, stdout) => {
18
+ const isUseShell = /\.(cmd|bat)$/iv.test(npmPath);
19
+ execFile(npmPath, ['view', pkg, '--json'], { shell: isUseShell }, (error, stdout) => {
20
20
  if (error) {
21
21
  resolve_(false);
22
22
  }
@@ -35,5 +35,5 @@
35
35
  ]
36
36
  }
37
37
  },
38
- "version": "2.3.0"
38
+ "version": "3.0.0"
39
39
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@oclif/plugin-version",
3
3
  "description": "A command that shows the CLI version",
4
- "version": "2.3.0",
4
+ "version": "3.0.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/plugin-version/issues",
7
7
  "dependencies": {
8
- "@oclif/core": "^4",
8
+ "@oclif/core": "^5.0.0",
9
9
  "ansis": "^3.17.0",
10
10
  "which": "^4"
11
11
  },
@@ -14,7 +14,7 @@
14
14
  "@eslint/compat": "^1.4.1",
15
15
  "@oclif/plugin-help": "^6",
16
16
  "@oclif/prettier-config": "^0.2.1",
17
- "@oclif/test": "^4",
17
+ "@oclif/test": "^5.0.0",
18
18
  "@types/chai": "^4.3.17",
19
19
  "@types/mocha": "^10",
20
20
  "@types/node": "^18",
@@ -31,10 +31,10 @@
31
31
  "prettier": "^3.9.6",
32
32
  "shx": "^0.4.0",
33
33
  "ts-node": "^10.9.2",
34
- "typescript": "^5"
34
+ "typescript": "^6"
35
35
  },
36
36
  "engines": {
37
- "node": ">=18.0.0"
37
+ "node": ">=22.0.0"
38
38
  },
39
39
  "files": [
40
40
  "oclif.manifest.json",