Skip to content

Commit 25ad04e

Browse files
authored
fix: replace deprecated node FS prop W-19160014 (#1607)
* chore: remove deprecated fs prop * chore: ci re-run * fix: bump mocha + override node types
1 parent 6a21c86 commit 25ad04e

File tree

5 files changed

+115
-18
lines changed

5 files changed

+115
-18
lines changed

.sfdevrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"devDepOverrides": ["mocha"],
23
"wireit": {
34
"compile": {
45
"clean": "if-file-deleted",

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"devDependencies": {
4444
"@jsforce/jsforce-node": "^3.10.3",
4545
"@salesforce/cli-plugins-testkit": "^5.3.39",
46-
"@salesforce/dev-scripts": "^11.0.2",
46+
"@salesforce/dev-scripts": "^11.0.3",
4747
"@types/deep-equal-in-any-order": "^1.0.1",
4848
"@types/fast-levenshtein": "^0.0.4",
4949
"@types/graceful-fs": "^4.1.9",
@@ -52,6 +52,7 @@
5252
"deep-equal-in-any-order": "^1.1.19",
5353
"esbuild": "^0.25.8",
5454
"eslint-plugin-sf-plugin": "^1.20.30",
55+
"mocha": "^11.7.1",
5556
"mocha-junit-reporter": "^1.23.3",
5657
"mocha-snap": "^5.0.0",
5758
"ts-morph": "^24.0.0",
@@ -209,5 +210,8 @@
209210
},
210211
"publishConfig": {
211212
"access": "public"
213+
},
214+
"resolutions": {
215+
"@types/node": "18.19.123"
212216
}
213217
}

test/registry/presetTesting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const registriesFromPresets = fs
2323
.filter((file) => !file.name.endsWith('CustomLabelsBeta.json'))
2424
.map((file) => ({
2525
name: file.name,
26-
registry: JSON.parse(fs.readFileSync(path.join(file.path, file.name), 'utf-8')) as MetadataRegistry,
26+
registry: JSON.parse(fs.readFileSync(path.join(file.parentPath, file.name), 'utf-8')) as MetadataRegistry,
2727
})) /*
2828
decomposedPermissionSetBeta2 has an invalid registry configured.
2929
this is because multiple children will map to the .objectSettings suffix, and currently, the registry only supports 1:1 suffix mapping

test/snapshot/helper/conversions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const resolveRelative = (parentDirs: string[]) => (subArray: string[], index: nu
123123
const getRelative = (parent: string) => (child: string) => path.relative(parent, child);
124124

125125
const isFile = (file: fs.Dirent) => file.isFile();
126-
const getFullPath = (file: fs.Dirent) => path.join(file.path, file.name);
126+
const getFullPath = (file: fs.Dirent) => path.join(file.parentPath, file.name);
127127

128128
/** dirEnts are sometimes folder, we don't want those. And we need the full paths */
129129
export const dirEntsToPaths = (dirEnts: fs.Dirent[]): string[] => dirEnts.filter(isFile).map(getFullPath);

yarn.lock

Lines changed: 107 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -748,18 +748,18 @@
748748
resolved "https://registry.yarnpkg.com/@salesforce/dev-config/-/dev-config-4.3.1.tgz#4dac8245df79d675258b50e1d24e8c636eaa5e10"
749749
integrity sha512-rO6axodoRF2SA1kknGttIWuL7HhIwSmweGlBzM8y2m5TH8DeIv4xsqYc8Cu+SrR3JT1FN4nh6XgrogI83AJfKg==
750750

751-
"@salesforce/dev-scripts@^11.0.2":
752-
version "11.0.2"
753-
resolved "https://registry.yarnpkg.com/@salesforce/dev-scripts/-/dev-scripts-11.0.2.tgz#1cf59516c7b24e44363daa5bf976909dc208d52b"
754-
integrity sha512-+s/2B0ln4ZDwIuMUUHEmqYdvjjAnpVTSCkF1o2spJ+/a6zpLYIuCRfylz19OhwKXX6kxViziDlaB/+7b5ok6XA==
751+
"@salesforce/dev-scripts@^11.0.3":
752+
version "11.0.3"
753+
resolved "https://registry.yarnpkg.com/@salesforce/dev-scripts/-/dev-scripts-11.0.3.tgz#414d4d45c12c2a1eada418951acc18afc49d0fad"
754+
integrity sha512-7nbrIJvFyUSdt4A2D0mjb4nKhuvmQvZtb+xt5iCeD0wOgMMuggEr7gTIhv5IHl7Jkhn4aBiXR3KQOp96gZm3nQ==
755755
dependencies:
756756
"@commitlint/cli" "^17.1.2"
757757
"@commitlint/config-conventional" "^17.8.1"
758758
"@salesforce/dev-config" "^4.3.1"
759759
"@salesforce/prettier-config" "^0.0.3"
760760
"@types/chai" "^4.3.14"
761761
"@types/mocha" "^10.0.7"
762-
"@types/node" "^18.19.41"
762+
"@types/node" "^18"
763763
"@types/sinon" "^10.0.20"
764764
chai "^4.3.10"
765765
chalk "^4.0.0"
@@ -1007,15 +1007,10 @@
10071007
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.7.tgz#4c620090f28ca7f905a94b706f74dc5b57b44f2f"
10081008
integrity sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw==
10091009

1010-
"@types/node@*":
1011-
version "20.1.7"
1012-
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.1.7.tgz#ce10c802f7731909d0a44ac9888e8b3a9125eb62"
1013-
integrity sha512-WCuw/o4GSwDGMoonES8rcvwsig77dGCMbZDrZr2x4ZZiNW4P/gcoZXe/0twgtobcTkmg9TuKflxYL/DuwDyJzg==
1014-
1015-
"@types/node@^18.19.41":
1016-
version "18.19.42"
1017-
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.42.tgz#b54ed4752c85427906aab40917b0f7f3d724bf72"
1018-
integrity sha512-d2ZFc/3lnK2YCYhos8iaNIYu9Vfhr92nHiyJHRltXWjXUBjEE+A4I58Tdbnw4VhggSW+2j5y5gTrLs4biNnubg==
1010+
"@types/node@*", "@types/[email protected]", "@types/node@^18":
1011+
version "18.19.123"
1012+
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.123.tgz#08a3e4f5e0c73b8840c677b7635ce59d5dc1f76d"
1013+
integrity sha512-K7DIaHnh0mzVxreCR9qwgNxp3MH9dltPNIEddW9MYUlcKAzm+3grKNSTe2vCJHI1FaLpvpL5JGJrz1UZDKYvDg==
10191014
dependencies:
10201015
undici-types "~5.26.4"
10211016

@@ -1728,6 +1723,13 @@ chokidar@^3.5.3:
17281723
optionalDependencies:
17291724
fsevents "~2.3.2"
17301725

1726+
chokidar@^4.0.1:
1727+
version "4.0.3"
1728+
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-4.0.3.tgz#7be37a4c03c9aee1ecfe862a4a23b2c70c205d30"
1729+
integrity sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==
1730+
dependencies:
1731+
readdirp "^4.0.1"
1732+
17311733
ci-info@^4.0.0:
17321734
version "4.0.0"
17331735
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.0.0.tgz#65466f8b280fc019b9f50a5388115d17a63a44f2"
@@ -2086,6 +2088,11 @@ diff@^5.2.0:
20862088
resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531"
20872089
integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==
20882090

2091+
diff@^7.0.0:
2092+
version "7.0.0"
2093+
resolved "https://registry.yarnpkg.com/diff/-/diff-7.0.0.tgz#3fb34d387cd76d803f6eebea67b921dab0182a9a"
2094+
integrity sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==
2095+
20892096
dir-glob@^3.0.1:
20902097
version "3.0.1"
20912098
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
@@ -2983,6 +2990,18 @@ glob@^10.3.10:
29832990
minipass "^5.0.0 || ^6.0.2 || ^7.0.0"
29842991
path-scurry "^1.10.1"
29852992

2993+
glob@^10.4.5:
2994+
version "10.4.5"
2995+
resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956"
2996+
integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==
2997+
dependencies:
2998+
foreground-child "^3.1.0"
2999+
jackspeak "^3.1.2"
3000+
minimatch "^9.0.4"
3001+
minipass "^7.1.2"
3002+
package-json-from-dist "^1.0.0"
3003+
path-scurry "^1.11.1"
3004+
29863005
glob@^7.0.0, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
29873006
version "7.2.3"
29883007
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
@@ -3624,6 +3643,15 @@ jackspeak@^2.3.5:
36243643
optionalDependencies:
36253644
"@pkgjs/parseargs" "^0.11.0"
36263645

3646+
jackspeak@^3.1.2:
3647+
version "3.4.3"
3648+
resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a"
3649+
integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==
3650+
dependencies:
3651+
"@isaacs/cliui" "^8.0.2"
3652+
optionalDependencies:
3653+
"@pkgjs/parseargs" "^0.11.0"
3654+
36273655
joycon@^3.1.1:
36283656
version "3.1.1"
36293657
resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03"
@@ -3988,6 +4016,11 @@ lowercase-keys@^2.0.0:
39884016
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"
39894017
integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
39904018

4019+
lru-cache@^10.2.0:
4020+
version "10.4.3"
4021+
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119"
4022+
integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==
4023+
39914024
lru-cache@^5.1.1:
39924025
version "5.1.1"
39934026
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
@@ -4214,6 +4247,11 @@ minimist@^1.2.0, minimist@^1.2.6, minimist@^1.2.8:
42144247
resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c"
42154248
integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==
42164249

4250+
minipass@^7.1.2:
4251+
version "7.1.2"
4252+
resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707"
4253+
integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==
4254+
42174255
mkdirp@~0.5.1:
42184256
version "0.5.6"
42194257
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6"
@@ -4265,6 +4303,32 @@ mocha@^10.7.0:
42654303
yargs-parser "^20.2.9"
42664304
yargs-unparser "^2.0.0"
42674305

4306+
mocha@^11.7.1:
4307+
version "11.7.1"
4308+
resolved "https://registry.yarnpkg.com/mocha/-/mocha-11.7.1.tgz#91948fecd624fb4bd154ed260b7e1ad3910d7c7a"
4309+
integrity sha512-5EK+Cty6KheMS/YLPPMJC64g5V61gIR25KsRItHw6x4hEKT6Njp1n9LOlH4gpevuwMVS66SXaBBpg+RWZkza4A==
4310+
dependencies:
4311+
browser-stdout "^1.3.1"
4312+
chokidar "^4.0.1"
4313+
debug "^4.3.5"
4314+
diff "^7.0.0"
4315+
escape-string-regexp "^4.0.0"
4316+
find-up "^5.0.0"
4317+
glob "^10.4.5"
4318+
he "^1.2.0"
4319+
js-yaml "^4.1.0"
4320+
log-symbols "^4.1.0"
4321+
minimatch "^9.0.5"
4322+
ms "^2.1.3"
4323+
picocolors "^1.1.1"
4324+
serialize-javascript "^6.0.2"
4325+
strip-json-comments "^3.1.1"
4326+
supports-color "^8.1.1"
4327+
workerpool "^9.2.0"
4328+
yargs "^17.7.2"
4329+
yargs-parser "^21.1.1"
4330+
yargs-unparser "^2.0.0"
4331+
42684332
mri@^1.2.0:
42694333
version "1.2.0"
42704334
resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b"
@@ -4574,6 +4638,11 @@ package-hash@^4.0.0:
45744638
lodash.flattendeep "^4.4.0"
45754639
release-zalgo "^1.0.0"
45764640

4641+
package-json-from-dist@^1.0.0:
4642+
version "1.0.1"
4643+
resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505"
4644+
integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==
4645+
45774646
pako@~1.0.2:
45784647
version "1.0.11"
45794648
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf"
@@ -4653,6 +4722,14 @@ path-scurry@^1.10.1:
46534722
lru-cache "^9.1.1 || ^10.0.0"
46544723
minipass "^5.0.0 || ^6.0.2 || ^7.0.0"
46554724

4725+
path-scurry@^1.11.1:
4726+
version "1.11.1"
4727+
resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2"
4728+
integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==
4729+
dependencies:
4730+
lru-cache "^10.2.0"
4731+
minipass "^5.0.0 || ^6.0.2 || ^7.0.0"
4732+
46564733
path-to-regexp@^1.7.0:
46574734
version "1.8.0"
46584735
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a"
@@ -4680,6 +4757,11 @@ picocolors@^1.0.0, picocolors@^1.0.1:
46804757
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1"
46814758
integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==
46824759

4760+
picocolors@^1.1.1:
4761+
version "1.1.1"
4762+
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b"
4763+
integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==
4764+
46834765
picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1:
46844766
version "2.3.1"
46854767
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
@@ -4939,6 +5021,11 @@ readable-stream@~2.3.6:
49395021
string_decoder "~1.1.1"
49405022
util-deprecate "~1.0.1"
49415023

5024+
readdirp@^4.0.1:
5025+
version "4.1.2"
5026+
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-4.1.2.tgz#eb85801435fbf2a7ee58f19e0921b068fc69948d"
5027+
integrity sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==
5028+
49425029
readdirp@~3.6.0:
49435030
version "3.6.0"
49445031
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
@@ -5986,6 +6073,11 @@ workerpool@^6.5.1:
59866073
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544"
59876074
integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==
59886075

6076+
workerpool@^9.2.0:
6077+
version "9.3.3"
6078+
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-9.3.3.tgz#e75281fe62e851afb21cdeef8fa85f6a62ec3583"
6079+
integrity sha512-slxCaKbYjEdFT/o2rH9xS1hf4uRDch1w7Uo+apxhZ+sf/1d9e0ZVkn42kPNGP2dgjIx6YFvSevj0zHvbWe2jdw==
6080+
59896081
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
59906082
version "7.0.0"
59916083
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
@@ -6143,7 +6235,7 @@ yargs@^16.2.0:
61436235
y18n "^5.0.5"
61446236
yargs-parser "^20.2.2"
61456237

6146-
yargs@^17.0.0:
6238+
yargs@^17.0.0, yargs@^17.7.2:
61476239
version "17.7.2"
61486240
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
61496241
integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==

0 commit comments

Comments
 (0)