From 63ca8ad2497ede0680f6ccf44db59d1bea8cf6de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Nov 2021 16:02:31 +0000 Subject: [PATCH 1/4] Bump gatsby-plugin-robots-txt from 1.6.13 to 1.6.14 in /packages/website Bumps [gatsby-plugin-robots-txt](https://github.com/mdreizin/gatsby-plugin-robots-txt) from 1.6.13 to 1.6.14. - [Release notes](https://github.com/mdreizin/gatsby-plugin-robots-txt/releases) - [Commits](https://github.com/mdreizin/gatsby-plugin-robots-txt/compare/v1.6.13...v1.6.14) --- updated-dependencies: - dependency-name: gatsby-plugin-robots-txt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- packages/website/package.json | 2 +- packages/website/yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 2d50ab99..3fbb8da4 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -25,7 +25,7 @@ "gatsby-plugin-postcss": "^4.14.0", "gatsby-plugin-purgecss": "^6.1.0", "gatsby-plugin-react-helmet": "^4.14.0", - "gatsby-plugin-robots-txt": "^1.6.13", + "gatsby-plugin-robots-txt": "^1.6.14", "gatsby-plugin-sharp": "^4.0.1", "gatsby-plugin-svgr": "^3.0.0-beta.0", "gatsby-remark-classes": "^1.0.2", diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index 5874db1a..88c98c3d 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -6175,12 +6175,12 @@ gatsby-plugin-react-helmet@^4.14.0: dependencies: "@babel/runtime" "^7.15.4" -gatsby-plugin-robots-txt@^1.6.13: - version "1.6.13" - resolved "https://registry.yarnpkg.com/gatsby-plugin-robots-txt/-/gatsby-plugin-robots-txt-1.6.13.tgz#01e1ce68e3f4e07f957ac9a20cd2a9e12fdd3f79" - integrity sha512-MUPJsvkALwSmfRb1L3IVNmzIqwV35fol1RVot425ZYXvtD+s0OtZli5VnhLNxsX0beodyavzFl0SRJCCQZz0/g== +gatsby-plugin-robots-txt@^1.6.14: + version "1.6.14" + resolved "https://registry.yarnpkg.com/gatsby-plugin-robots-txt/-/gatsby-plugin-robots-txt-1.6.14.tgz#e7ce50b137fecc81c1ac384ddc544a4bafd8da89" + integrity sha512-5NLdgKPw7xHjvowNDU5aWzl/g3M3WU0Equn73aXGGdEue9Nuq7zh/Lh3oX+OM+MZolRCiM9GNHxdIvYPDWNXgA== dependencies: - "@babel/runtime" "^7.14.0" + "@babel/runtime" "^7.15.4" generate-robotstxt "^8.0.3" gatsby-plugin-sharp@^4.0.1: From 03c72653c5d18fa416726621a106ec9398cd11d3 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 4 Nov 2021 14:20:43 +0100 Subject: [PATCH 2/4] fix uploaded directory name --- packages/website/src/components/Uploader/UploaderElement.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/src/components/Uploader/UploaderElement.js b/packages/website/src/components/Uploader/UploaderElement.js index 86dd2ada..70557b63 100644 --- a/packages/website/src/components/Uploader/UploaderElement.js +++ b/packages/website/src/components/Uploader/UploaderElement.js @@ -85,7 +85,7 @@ export default function UploaderElement({ onUploadStateChange, upload }) { if (upload.mode === "directory") { const files = upload.file.files; const directory = files.reduce((acc, file) => ({ ...acc, [getRelativeFilePath(file)]: file }), {}); - const name = encodeURIComponent(upload.name); + const name = encodeURIComponent(upload.file.name); response = await client.uploadDirectory(directory, name, { onUploadProgress }); } else { From ffe7876854817c29bc6a4cedc5b6f624e72798df Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 4 Nov 2021 14:21:05 +0100 Subject: [PATCH 3/4] fix directory upload missing progress --- packages/website/src/components/Uploader/Uploader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/website/src/components/Uploader/Uploader.js b/packages/website/src/components/Uploader/Uploader.js index f5241f42..cdb86e15 100644 --- a/packages/website/src/components/Uploader/Uploader.js +++ b/packages/website/src/components/Uploader/Uploader.js @@ -47,8 +47,9 @@ const Uploader = () => { const handleDrop = async (files) => { if (mode === "directory" && files.length) { const name = getRootDirectory(files[0]); // get the file path from the first file + const size = files.reduce((acc, file) => acc + file.size, 0); - files = [{ name, files }]; + files = [{ name, size, files }]; } setUploads((uploads) => [...files.map((file) => ({ id: nanoid(), file, mode, status: "enqueued" })), ...uploads]); From f7f75ca2f3b9997b83bb3fa9c3500e0e5b586be9 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 4 Nov 2021 14:37:14 +0100 Subject: [PATCH 4/4] changelog entry --- .../bugs-fixed/undefined-dir-upload-name-and-empty-progress.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelog/items/bugs-fixed/undefined-dir-upload-name-and-empty-progress.md diff --git a/changelog/items/bugs-fixed/undefined-dir-upload-name-and-empty-progress.md b/changelog/items/bugs-fixed/undefined-dir-upload-name-and-empty-progress.md new file mode 100644 index 00000000..a6112e27 --- /dev/null +++ b/changelog/items/bugs-fixed/undefined-dir-upload-name-and-empty-progress.md @@ -0,0 +1,2 @@ +- fixed uploaded directory name (was "undefined" before) +- fixed empty directory upload progress (size was not calculated for directories)