@salesforce/cli 2.92.7 → 2.93.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 +1 -1
- package/dist/hooks/prerun.js +22 -5
- package/npm-shrinkwrap.json +20 -2
- package/oclif.lock +9 -1
- package/oclif.manifest.json +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
package/dist/hooks/prerun.js
CHANGED
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* Licensed under the BSD 3-Clause license.
|
|
5
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (process.argv.includes('--json'))
|
|
7
|
+
const hook = async function ({ Command, config, argv }) {
|
|
8
|
+
if (argv.includes('--json') || process.argv.includes('--json'))
|
|
10
9
|
return;
|
|
11
10
|
const { plugin } = Command;
|
|
12
11
|
if (!plugin)
|
|
@@ -18,9 +17,27 @@ const hook = async function ({ Command, config }) {
|
|
|
18
17
|
const specifiedVersion = jitPlugins[plugin.name] ?? deps[plugin.name];
|
|
19
18
|
if (!specifiedVersion)
|
|
20
19
|
return;
|
|
21
|
-
|
|
20
|
+
// Simple semver comparison without external library
|
|
21
|
+
const parseVersion = (version) => version
|
|
22
|
+
.replace(/^[^\d]*/, '')
|
|
23
|
+
.split('.')
|
|
24
|
+
.map((n) => parseInt(n, 10) || 0);
|
|
25
|
+
const isLessThan = (version1, version2) => {
|
|
26
|
+
const v1 = parseVersion(version1);
|
|
27
|
+
const v2 = parseVersion(version2);
|
|
28
|
+
for (let i = 0; i < Math.max(v1.length, v2.length); i++) {
|
|
29
|
+
const num1 = v1[i] || 0;
|
|
30
|
+
const num2 = v2[i] || 0;
|
|
31
|
+
if (num1 < num2)
|
|
32
|
+
return true;
|
|
33
|
+
if (num1 > num2)
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
};
|
|
38
|
+
if (isLessThan(plugin.version, specifiedVersion)) {
|
|
22
39
|
const { ux } = await import('@oclif/core/ux');
|
|
23
|
-
ux.warn(`Plugin ${plugin.name} (${plugin.version})
|
|
40
|
+
ux.warn(`Plugin ${plugin.name} (${plugin.version}) is older than the version specified by ${config.bin} (${specifiedVersion})`);
|
|
24
41
|
}
|
|
25
42
|
};
|
|
26
43
|
export default hook;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.93.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/cli",
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.93.0",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"dependencies": {
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@oclif/plugin-command-snapshot": "^5.2.3",
|
|
54
|
+
"@oclif/test": "^4.1.13",
|
|
54
55
|
"@salesforce/dev-scripts": "^11.0.2",
|
|
55
56
|
"@salesforce/plugin-release-management": "^5.7.0",
|
|
56
57
|
"@salesforce/ts-sinon": "^1.4.30",
|
|
@@ -4376,6 +4377,23 @@
|
|
|
4376
4377
|
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
|
|
4377
4378
|
}
|
|
4378
4379
|
},
|
|
4380
|
+
"node_modules/@oclif/test": {
|
|
4381
|
+
"version": "4.1.13",
|
|
4382
|
+
"resolved": "https://registry.npmjs.org/@oclif/test/-/test-4.1.13.tgz",
|
|
4383
|
+
"integrity": "sha512-pulrTiJRhoAKizFf6y5WeHvM2JyoRiZKV0H8qqYEoE0UHDKqInNmfGJyp8Ip6lTVQeMv1U8YCAXOS/HiWPVWeg==",
|
|
4384
|
+
"dev": true,
|
|
4385
|
+
"license": "MIT",
|
|
4386
|
+
"dependencies": {
|
|
4387
|
+
"ansis": "^3.17.0",
|
|
4388
|
+
"debug": "^4.4.1"
|
|
4389
|
+
},
|
|
4390
|
+
"engines": {
|
|
4391
|
+
"node": ">=18.0.0"
|
|
4392
|
+
},
|
|
4393
|
+
"peerDependencies": {
|
|
4394
|
+
"@oclif/core": ">= 3.0.0"
|
|
4395
|
+
}
|
|
4396
|
+
},
|
|
4379
4397
|
"node_modules/@octokit/auth-token": {
|
|
4380
4398
|
"version": "5.1.2",
|
|
4381
4399
|
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz",
|
package/oclif.lock
CHANGED
|
@@ -1605,7 +1605,7 @@
|
|
|
1605
1605
|
proc-log "^5.0.0"
|
|
1606
1606
|
which "^5.0.0"
|
|
1607
1607
|
|
|
1608
|
-
"@oclif/core@^4", "@oclif/core@^4.0.27", "@oclif/core@^4.2.10", "@oclif/core@^4.2.3", "@oclif/core@^4.2.8", "@oclif/core@^4.3.0", "@oclif/core@4.3.1":
|
|
1608
|
+
"@oclif/core@^4", "@oclif/core@^4.0.27", "@oclif/core@^4.2.10", "@oclif/core@^4.2.3", "@oclif/core@^4.2.8", "@oclif/core@^4.3.0", "@oclif/core@>= 3.0.0", "@oclif/core@4.3.1":
|
|
1609
1609
|
version "4.3.1"
|
|
1610
1610
|
resolved "https://registry.npmjs.org/@oclif/core/-/core-4.3.1.tgz"
|
|
1611
1611
|
integrity sha512-+QpJSficjZWu65YSRJIwe50xh0C7WVD6BkQyk0HmGIlx2/rvex8LDwbZHCQcvuJDOCVQeX/INh8IImuKn4d1UA==
|
|
@@ -1792,6 +1792,14 @@
|
|
|
1792
1792
|
strip-ansi "^7.1.0"
|
|
1793
1793
|
wrap-ansi "^9.0.0"
|
|
1794
1794
|
|
|
1795
|
+
"@oclif/test@^4.1.13":
|
|
1796
|
+
version "4.1.13"
|
|
1797
|
+
resolved "https://registry.npmjs.org/@oclif/test/-/test-4.1.13.tgz"
|
|
1798
|
+
integrity sha512-pulrTiJRhoAKizFf6y5WeHvM2JyoRiZKV0H8qqYEoE0UHDKqInNmfGJyp8Ip6lTVQeMv1U8YCAXOS/HiWPVWeg==
|
|
1799
|
+
dependencies:
|
|
1800
|
+
ansis "^3.17.0"
|
|
1801
|
+
debug "^4.4.1"
|
|
1802
|
+
|
|
1795
1803
|
"@octokit/auth-token@^5.0.0":
|
|
1796
1804
|
version "5.1.2"
|
|
1797
1805
|
resolved "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz"
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/cli",
|
|
3
3
|
"description": "The Salesforce CLI",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.93.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bin": {
|
|
7
7
|
"sf": "./bin/run.js",
|
|
@@ -257,6 +257,7 @@
|
|
|
257
257
|
"types": "dist/index.d.ts",
|
|
258
258
|
"devDependencies": {
|
|
259
259
|
"@oclif/plugin-command-snapshot": "^5.2.3",
|
|
260
|
+
"@oclif/test": "^4.1.13",
|
|
260
261
|
"@salesforce/dev-scripts": "^11.0.2",
|
|
261
262
|
"@salesforce/plugin-release-management": "^5.7.0",
|
|
262
263
|
"@salesforce/ts-sinon": "^1.4.30",
|