Skip to content

Commit

Permalink
chore: updated to cpy@10.0.0
Browse files Browse the repository at this point in the history
it comes with the `basename` fix, when `rename` is a function

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
  • Loading branch information
Akos Kitta committed May 3, 2023
1 parent 241baca commit f2f347a
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 42 deletions.
2 changes: 1 addition & 1 deletion arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"auth0-js": "^9.14.0",
"btoa": "^1.2.1",
"classnames": "^2.3.1",
"cpy": "^9.0.1",
"cpy": "^10.0.0",
"cross-fetch": "^3.1.5",
"dateformat": "^3.0.3",
"deepmerge": "2.0.1",
Expand Down
17 changes: 8 additions & 9 deletions arduino-ide-extension/src/node/sketches-service-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,15 +520,14 @@ export class SketchesServiceImpl

const cpyModule = await import('cpy');
const cpy = cpyModule.default;
await cpy(source, destination, { filter });
// The main sketch filename adjustment (if any) must happen afterwards.
// https://github.com/sindresorhus/cpy/issues/109
if (sourceFolderBasename !== destinationFolderBasename) {
await fs.rename(
join(destination, `${sourceFolderBasename}.ino`),
join(destination, `${destinationFolderBasename}.ino`)
);
}
await cpy(source, destination, {
rename: (basename) =>
sourceFolderBasename !== destinationFolderBasename &&
basename === `${sourceFolderBasename}.ino`
? `${destinationFolderBasename}.ino`
: basename,
filter,
});
const copiedSketch = await this.doLoadSketch(destinationUri, false);
return copiedSketch;
}
Expand Down
68 changes: 36 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5528,29 +5528,28 @@ cosmiconfig@^7.0.0, cosmiconfig@^7.0.1:
path-type "^4.0.0"
yaml "^1.10.0"

cp-file@^9.1.0:
version "9.1.0"
resolved "https://registry.yarnpkg.com/cp-file/-/cp-file-9.1.0.tgz#e98e30db72d57d47b5b1d444deb70d05e5684921"
integrity sha512-3scnzFj/94eb7y4wyXRWwvzLFaQp87yyfTnChIjlfYrVqp5lVO3E2hIJMeQIltUT0K2ZAB3An1qXcBmwGyvuwA==
cp-file@^10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/cp-file/-/cp-file-10.0.0.tgz#bbae9ecb9f505951b862880d2901e1f56de7a4dc"
integrity sha512-vy2Vi1r2epK5WqxOLnskeKeZkdZvTKfFZQCplE3XWsP+SUJyd5XAUFC9lFgTjjXJF2GMne/UML14iEmkAaDfFg==
dependencies:
graceful-fs "^4.1.2"
make-dir "^3.0.0"
nested-error-stacks "^2.0.0"
p-event "^4.1.0"
graceful-fs "^4.2.10"
nested-error-stacks "^2.1.1"
p-event "^5.0.1"

cpy@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/cpy/-/cpy-9.0.1.tgz#7f3ad0ad5bafe0bc70645c4bb567969927cadb9f"
integrity sha512-D9U0DR5FjTCN3oMTcFGktanHnAG5l020yvOCR1zKILmAyPP7I/9pl6NFgRbDcmSENtbK1sQLBz1p9HIOlroiNg==
cpy@^10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/cpy/-/cpy-10.0.0.tgz#372dfc731f8f1d72ab06888093084e3c558aec20"
integrity sha512-6aFIEPIDnUE98L4FNBEkfOL5A1XfMt+37fzYsdQ4KugSrVU6gWa1IgBbtc/Di3ohTzGw10LqCcCamw8bL8Erqw==
dependencies:
arrify "^3.0.0"
cp-file "^9.1.0"
globby "^13.1.1"
junk "^4.0.0"
micromatch "^4.0.4"
nested-error-stacks "^2.1.0"
cp-file "^10.0.0"
globby "^13.1.4"
junk "^4.0.1"
micromatch "^4.0.5"
nested-error-stacks "^2.1.1"
p-filter "^3.0.0"
p-map "^5.3.0"
p-map "^6.0.0"

create-frame@^1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -7696,7 +7695,7 @@ globby@11.1.0, globby@^11.0.1, globby@^11.0.3, globby@^11.1.0:
merge2 "^1.4.1"
slash "^3.0.0"

globby@^13.1.1:
globby@^13.1.4:
version "13.1.4"
resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.4.tgz#2f91c116066bcec152465ba36e5caa4a13c01317"
integrity sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==
Expand Down Expand Up @@ -7798,7 +7797,7 @@ graceful-fs@4.2.10:
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c"
integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==

graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
version "4.2.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
Expand Down Expand Up @@ -9176,7 +9175,7 @@ jsonparse@^1.2.0, jsonparse@^1.3.1:
array-includes "^3.1.5"
object.assign "^4.1.3"

junk@^4.0.0:
junk@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/junk/-/junk-4.0.1.tgz#7ee31f876388c05177fe36529ee714b07b50fbed"
integrity sha512-Qush0uP+G8ZScpGMZvHUiRfI0YBWuB3gVBYlI0v0vvOJt5FLicco+IkP0a50LqTTQhmts/m6tP5SWE+USyIvcQ==
Expand Down Expand Up @@ -9773,7 +9772,7 @@ macaddress@^0.2.9:
resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.9.tgz#3579b8b9acd5b96b4553abf0f394185a86813cb3"
integrity sha512-k4F1JUof6cQXxNFzx3thLby4oJzXTXQueAOOts944Vqizn+Rjc2QNFenT9FJSLU1CH3PmrHRSyZs2E+Cqw+P2w==

make-dir@3.1.0, make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0:
make-dir@3.1.0, make-dir@^3.0.2, make-dir@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==
Expand Down Expand Up @@ -10020,7 +10019,7 @@ micromatch@^3.1.4:
snapdragon "^0.8.1"
to-regex "^3.0.2"

micromatch@^4.0.4:
micromatch@^4.0.4, micromatch@^4.0.5:
version "4.0.5"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
Expand Down Expand Up @@ -10537,7 +10536,7 @@ neo-async@^2.6.0, neo-async@^2.6.2:
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==

nested-error-stacks@^2.0.0, nested-error-stacks@^2.1.0:
nested-error-stacks@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.1.1.tgz#26c8a3cee6cc05fbcf1e333cd2fc3e003326c0b5"
integrity sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==
Expand Down Expand Up @@ -11289,12 +11288,12 @@ p-event@^2.1.0:
dependencies:
p-timeout "^2.0.1"

p-event@^4.1.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/p-event/-/p-event-4.2.0.tgz#af4b049c8acd91ae81083ebd1e6f5cae2044c1b5"
integrity sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==
p-event@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/p-event/-/p-event-5.0.1.tgz#614624ec02ae7f4f13d09a721c90586184af5b0c"
integrity sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==
dependencies:
p-timeout "^3.1.0"
p-timeout "^5.0.2"

p-filter@^3.0.0:
version "3.0.0"
Expand Down Expand Up @@ -11384,13 +11383,18 @@ p-map@4.0.0, p-map@^4.0.0:
dependencies:
aggregate-error "^3.0.0"

p-map@^5.1.0, p-map@^5.3.0:
p-map@^5.1.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/p-map/-/p-map-5.5.0.tgz#054ca8ca778dfa4cf3f8db6638ccb5b937266715"
integrity sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==
dependencies:
aggregate-error "^4.0.0"

p-map@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/p-map/-/p-map-6.0.0.tgz#4d9c40d3171632f86c47601b709f4b4acd70fed4"
integrity sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw==

p-pipe@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-3.1.0.tgz#48b57c922aa2e1af6a6404cb7c6bf0eb9cc8e60e"
Expand Down Expand Up @@ -11429,14 +11433,14 @@ p-timeout@^2.0.1:
dependencies:
p-finally "^1.0.0"

p-timeout@^3.1.0, p-timeout@^3.2.0:
p-timeout@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe"
integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==
dependencies:
p-finally "^1.0.0"

p-timeout@^5.1.0:
p-timeout@^5.0.2, p-timeout@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-5.1.0.tgz#b3c691cf4415138ce2d9cfe071dba11f0fee085b"
integrity sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==
Expand Down

0 comments on commit f2f347a

Please sign in to comment.