Skip to content

Commit 7f4c87c

Browse files
authored
fix: don't do deep imports from sfdx-core (#998)
1 parent ba76923 commit 7f4c87c

File tree

4 files changed

+96
-21
lines changed

4 files changed

+96
-21
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
"@salesforce/core": "^6.7.6",
1212
"@salesforce/kit": "^3.1.0",
1313
"@salesforce/plugin-info": "^3.0.28",
14-
"@salesforce/sf-plugins-core": "^8.0.1",
14+
"@salesforce/sf-plugins-core": "^8.0.4",
1515
"@salesforce/ts-types": "^2.0.9",
1616
"chalk": "^5.3.0",
1717
"open": "^10.1.0"
1818
},
1919
"devDependencies": {
2020
"@oclif/plugin-command-snapshot": "^5.1.4",
21-
"@salesforce/cli-plugins-testkit": "^5.1.12",
21+
"@salesforce/cli-plugins-testkit": "^5.1.14",
2222
"@salesforce/dev-scripts": "^8.5.0",
2323
"@salesforce/plugin-command-reference": "^3.0.75",
2424
"@salesforce/ts-sinon": "^1.4.19",

src/commands/org/login/device.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
import { AuthFields, AuthInfo, DeviceOauthService, Messages, OAuth2Config } from '@salesforce/core';
8+
import {
9+
type AuthFields,
10+
AuthInfo,
11+
DeviceOauthService,
12+
Messages,
13+
type OAuth2Config,
14+
type DeviceCodeResponse,
15+
} from '@salesforce/core';
916
import { Flags, SfCommand, loglevel } from '@salesforce/sf-plugins-core';
10-
import { DeviceCodeResponse } from '@salesforce/core/lib/deviceOauthService.js';
1117
import { ux } from '@oclif/core';
1218
import common from '../../../common.js';
1319

test/commands/org/login/login.device.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
/* eslint-disable camelcase */
99

10-
import { AuthFields, AuthInfo, DeviceOauthService } from '@salesforce/core';
10+
import { type AuthFields, AuthInfo, type DeviceCodeResponse, DeviceOauthService } from '@salesforce/core';
1111
import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup.js';
1212
import { StubbedType, stubInterface, stubMethod } from '@salesforce/ts-sinon';
13-
import { DeviceCodeResponse } from '@salesforce/core/lib/deviceOauthService.js';
1413
import { expect } from 'chai';
1514
import { SfCommand, stubUx } from '@salesforce/sf-plugins-core';
1615
import Login from '../../../../src/commands/org/login/device.js';
16+
1717
type Options = {
1818
approvalTimesout?: boolean;
1919
approvalFails?: boolean;

yarn.lock

+84-15
Original file line numberDiff line numberDiff line change
@@ -1383,18 +1383,19 @@
13831383
resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
13841384
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
13851385

1386-
"@salesforce/cli-plugins-testkit@^5.1.12":
1387-
version "5.1.12"
1388-
resolved "https://registry.yarnpkg.com/@salesforce/cli-plugins-testkit/-/cli-plugins-testkit-5.1.12.tgz#b453a7b99940d6f5c9e64d7432b60b44b682747b"
1389-
integrity sha512-dICcYW2dejeOtA8fMYCyTCl/PXfYLoNlVPL18ATpR3pEDUjlyI1JWY0GE8chhqCsr0TgDBkkd/MKuUiTSsGebQ==
1386+
"@salesforce/cli-plugins-testkit@^5.1.14":
1387+
version "5.1.14"
1388+
resolved "https://registry.yarnpkg.com/@salesforce/cli-plugins-testkit/-/cli-plugins-testkit-5.1.14.tgz#34afac74c44b8492e56c78ac80af60261084cf39"
1389+
integrity sha512-Adt7A2CMONTZFGENHI91PUxRVuQOypNa+/JVRTXjp2ug3zrPhquxEjtgfG18vVZi/boKa0Td898/N14SOW5vNQ==
13901390
dependencies:
1391-
"@salesforce/core" "^6.7.3"
1392-
"@salesforce/kit" "^3.0.15"
1391+
"@salesforce/core" "^6.7.6"
1392+
"@salesforce/kit" "^3.1.0"
13931393
"@salesforce/ts-types" "^2.0.9"
13941394
"@types/shelljs" "^0.8.15"
13951395
debug "^4.3.1"
13961396
jszip "^3.10.1"
13971397
shelljs "^0.8.4"
1398+
sinon "^17.0.1"
13981399
strip-ansi "6.0.1"
13991400
ts-retry-promise "^0.8.0"
14001401

@@ -1533,16 +1534,16 @@
15331534
"@salesforce/ts-types" "^2.0.9"
15341535
chalk "^5.3.0"
15351536

1536-
"@salesforce/sf-plugins-core@^8.0.1":
1537-
version "8.0.1"
1538-
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-8.0.1.tgz#f155cddfd7695aab0d8264848b634b2a91cdbf2c"
1539-
integrity sha512-R6SqJ1XqSINSWdZruKtC2SKGnLBh7KbFI7+qS0FYlyPU4IlWoa+AZkGwWvlczuSOumqnlhT95rNKwZTS5rJugA==
1537+
"@salesforce/sf-plugins-core@^8.0.4":
1538+
version "8.0.4"
1539+
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-8.0.4.tgz#9e75925baf0b1ef03c5ae26678dc9fafabcb21d4"
1540+
integrity sha512-Ea13VvmWWEdtCBTgJw1IgCoPJPWqGLZUPQ46blVddh1OTPi2ldolq0W+/DTnoBTgJtvWPfas+nIPGnfTcsKDPQ==
15401541
dependencies:
15411542
"@inquirer/confirm" "^2.0.17"
15421543
"@inquirer/password" "^1.1.16"
1543-
"@oclif/core" "^3.23.0"
1544-
"@salesforce/core" "^6.7.3"
1545-
"@salesforce/kit" "^3.0.15"
1544+
"@oclif/core" "^3.26.0"
1545+
"@salesforce/core" "^6.7.6"
1546+
"@salesforce/kit" "^3.1.0"
15461547
"@salesforce/ts-types" "^2.0.9"
15471548
chalk "^5.3.0"
15481549

@@ -1579,6 +1580,27 @@
15791580
dependencies:
15801581
type-detect "4.0.8"
15811582

1583+
"@sinonjs/commons@^2.0.0":
1584+
version "2.0.0"
1585+
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-2.0.0.tgz#fd4ca5b063554307e8327b4564bd56d3b73924a3"
1586+
integrity sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==
1587+
dependencies:
1588+
type-detect "4.0.8"
1589+
1590+
"@sinonjs/commons@^3.0.0":
1591+
version "3.0.1"
1592+
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd"
1593+
integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==
1594+
dependencies:
1595+
type-detect "4.0.8"
1596+
1597+
"@sinonjs/fake-timers@^11.2.2":
1598+
version "11.2.2"
1599+
resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz#50063cc3574f4a27bd8453180a04171c85cc9699"
1600+
integrity sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==
1601+
dependencies:
1602+
"@sinonjs/commons" "^3.0.0"
1603+
15821604
"@sinonjs/fake-timers@^6.0.0", "@sinonjs/fake-timers@^6.0.1":
15831605
version "6.0.1"
15841606
resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz#293674fccb3262ac782c7aadfdeca86b10c75c40"
@@ -1619,7 +1641,16 @@
16191641
lodash.get "^4.4.2"
16201642
type-detect "^4.0.8"
16211643

1622-
"@sinonjs/text-encoding@^0.7.1":
1644+
"@sinonjs/samsam@^8.0.0":
1645+
version "8.0.0"
1646+
resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-8.0.0.tgz#0d488c91efb3fa1442e26abea81759dfc8b5ac60"
1647+
integrity sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==
1648+
dependencies:
1649+
"@sinonjs/commons" "^2.0.0"
1650+
lodash.get "^4.4.2"
1651+
type-detect "^4.0.8"
1652+
1653+
"@sinonjs/text-encoding@^0.7.1", "@sinonjs/text-encoding@^0.7.2":
16231654
version "0.7.2"
16241655
resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz#5981a8db18b56ba38ef0efb7d995b12aa7b51918"
16251656
integrity sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==
@@ -3430,6 +3461,11 @@ diff@^4.0.1, diff@^4.0.2:
34303461
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
34313462
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
34323463

3464+
diff@^5.1.0:
3465+
version "5.2.0"
3466+
resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531"
3467+
integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==
3468+
34333469
dir-glob@^3.0.1:
34343470
version "3.0.1"
34353471
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
@@ -5271,6 +5307,11 @@ just-extend@^4.0.2:
52715307
resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.2.1.tgz#ef5e589afb61e5d66b24eca749409a8939a8c744"
52725308
integrity sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==
52735309

5310+
just-extend@^6.2.0:
5311+
version "6.2.0"
5312+
resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-6.2.0.tgz#b816abfb3d67ee860482e7401564672558163947"
5313+
integrity sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==
5314+
52745315
jwa@^1.4.1:
52755316
version "1.4.1"
52765317
resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a"
@@ -5819,6 +5860,17 @@ nise@^4.1.0:
58195860
just-extend "^4.0.2"
58205861
path-to-regexp "^1.7.0"
58215862

5863+
nise@^5.1.5:
5864+
version "5.1.9"
5865+
resolved "https://registry.yarnpkg.com/nise/-/nise-5.1.9.tgz#0cb73b5e4499d738231a473cd89bd8afbb618139"
5866+
integrity sha512-qOnoujW4SV6e40dYxJOb3uvuoPHtmLzIk4TFo+j0jPJoC+5Z9xja5qH5JZobEPsa8+YYphMrOSwnrshEhG2qww==
5867+
dependencies:
5868+
"@sinonjs/commons" "^3.0.0"
5869+
"@sinonjs/fake-timers" "^11.2.2"
5870+
"@sinonjs/text-encoding" "^0.7.2"
5871+
just-extend "^6.2.0"
5872+
path-to-regexp "^6.2.1"
5873+
58225874
no-case@^3.0.4:
58235875
version "3.0.4"
58245876
resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d"
@@ -6249,6 +6301,11 @@ path-to-regexp@^1.7.0:
62496301
dependencies:
62506302
isarray "0.0.1"
62516303

6304+
path-to-regexp@^6.2.1:
6305+
version "6.2.2"
6306+
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.2.tgz#324377a83e5049cbecadc5554d6a63a9a4866b36"
6307+
integrity sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==
6308+
62526309
path-type@^4.0.0:
62536310
version "4.0.0"
62546311
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
@@ -6924,6 +6981,18 @@ sinon@10.0.0:
69246981
nise "^4.1.0"
69256982
supports-color "^7.1.0"
69266983

6984+
sinon@^17.0.1:
6985+
version "17.0.1"
6986+
resolved "https://registry.yarnpkg.com/sinon/-/sinon-17.0.1.tgz#26b8ef719261bf8df43f925924cccc96748e407a"
6987+
integrity sha512-wmwE19Lie0MLT+ZYNpDymasPHUKTaZHUH/pKEubRXIzySv9Atnlw+BUMGCzWgV7b7wO+Hw6f1TEOr0IUnmU8/g==
6988+
dependencies:
6989+
"@sinonjs/commons" "^3.0.0"
6990+
"@sinonjs/fake-timers" "^11.2.2"
6991+
"@sinonjs/samsam" "^8.0.0"
6992+
diff "^5.1.0"
6993+
nise "^5.1.5"
6994+
supports-color "^7.2.0"
6995+
69276996
sinon@^5.1.1:
69286997
version "5.1.1"
69296998
resolved "https://registry.yarnpkg.com/sinon/-/sinon-5.1.1.tgz#19c59810ffb733ea6e76a28b94a71fc4c2f523b8"
@@ -7221,7 +7290,7 @@ supports-color@^5.3.0, supports-color@^5.4.0:
72217290
dependencies:
72227291
has-flag "^3.0.0"
72237292

7224-
supports-color@^7.0.0, supports-color@^7.1.0:
7293+
supports-color@^7.0.0, supports-color@^7.1.0, supports-color@^7.2.0:
72257294
version "7.2.0"
72267295
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
72277296
integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==

0 commit comments

Comments
 (0)