From 781f349778ce7232ad8d3e4c139aea8d3d24e7da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Aug 2021 22:06:34 +0000 Subject: [PATCH 1/2] Bump filesize from 7.0.0 to 8.0.0 Bumps [filesize](https://github.com/avoidwork/filesize.js) from 7.0.0 to 8.0.0. - [Release notes](https://github.com/avoidwork/filesize.js/releases) - [Changelog](https://github.com/avoidwork/filesize.js/blob/master/CHANGELOG.md) - [Commits](https://github.com/avoidwork/filesize.js/compare/7.0.0...8.0.0) --- updated-dependencies: - dependency-name: filesize dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 4 ++-- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index efd079825..d72ca5e43 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "eslint-plugin-prettier": "^3.3.1", "eslint-plugin-vue": "^7.2.0", "file-loader": "^6.2.0", - "filesize": "^7.0.0", + "filesize": "^8.0.0", "focus-trap": "^6.4.0", "focus-trap-vue": "^1.1.1", "friendly-errors-webpack-plugin": "^1.7.0", @@ -142,7 +142,7 @@ "yaml": "^1.10.2" }, "peerDependencies": { - "filesize": "^7.0.0", + "filesize": "^8.0.0", "focus-trap": "^6.4.0", "focus-trap-vue": "^1.1.1", "fuse.js": "^6.4.6", diff --git a/yarn.lock b/yarn.lock index a1e156bd9..ca1c4bec5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5637,10 +5637,10 @@ filesize@6.1.0: resolved "https://registry.yarnpkg.com/filesize/-/filesize-6.1.0.tgz#e81bdaa780e2451d714d71c0d7a4f3238d37ad00" integrity sha512-LpCHtPQ3sFx67z+uh2HnSyWSLLu5Jxo21795uRDuar/EOuYWXib5EmPaGIBuSnRqH2IODiKA2k5re/K9OnN/Yg== -filesize@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-7.0.0.tgz#9d4b3ce384ec7731a9e68c64ee29fb4934ad657d" - integrity sha512-Wsstw+O1lZ9gVmOI1thyeQvODsaoId2qw14lCqIzUhoHKXX7T2hVpB7BR6SvgodMBgWccrx/y2eyV8L7tDmY6A== +filesize@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-8.0.0.tgz#532db71cb8a04df7d403da054a28de1b648534e0" + integrity sha512-sb690gQx3y/5KZIztgWAKM/r4Hf1V3R8mkAE0OhasMw2FDYduFTYCji8YN9BVpsGoMxrHPFvia1BMxwfLHX+fQ== fill-range@^4.0.0: version "4.0.0" From 1849b227c00a2157259d9140c570df92c7054840 Mon Sep 17 00:00:00 2001 From: pwengerter Date: Tue, 24 Aug 2021 12:54:38 +0100 Subject: [PATCH 2/2] Fix tests for default changes in fileSize library --- src/components/resource/OcResourceSize.spec.js | 6 +++--- src/components/table/OcTableFiles.spec.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/resource/OcResourceSize.spec.js b/src/components/resource/OcResourceSize.spec.js index cd4f8280d..b5ef901d5 100644 --- a/src/components/resource/OcResourceSize.spec.js +++ b/src/components/resource/OcResourceSize.spec.js @@ -29,12 +29,12 @@ describe("OcResourceSize", () => { size: 24064, }, }) - expect(wrapper.find(".oc-resource-size").text()).toEqual("24 KB") + expect(wrapper.find(".oc-resource-size").text()).toEqual("24 kB") await wrapper.setProps({ size: 44145049, }) - expect(wrapper.find(".oc-resource-size").text()).toEqual("42.1 MB") + expect(wrapper.find(".oc-resource-size").text()).toEqual("44.1 MB") }) it("converts strings to numbers", () => { @@ -43,7 +43,7 @@ describe("OcResourceSize", () => { size: "24064", }, }) - expect(wrapper.find(".oc-resource-size").text()).toEqual("24 KB") + expect(wrapper.find(".oc-resource-size").text()).toEqual("24 kB") }) describe("language is not defined", () => { diff --git a/src/components/table/OcTableFiles.spec.js b/src/components/table/OcTableFiles.spec.js index cf0aaf65b..d5691f6c0 100644 --- a/src/components/table/OcTableFiles.spec.js +++ b/src/components/table/OcTableFiles.spec.js @@ -144,7 +144,7 @@ describe("OcTableFiles", () => { }) it("formats the resource size to a human readable format", () => { - expect(wrapper.find(".oc-tbody-tr-forest .oc-table-data-cell-size").text()).toEqual("105.9 MB") + expect(wrapper.find(".oc-tbody-tr-forest .oc-table-data-cell-size").text()).toEqual("111 MB") expect(wrapper.find(".oc-tbody-tr-documents .oc-table-data-cell-size").text()).toEqual("--") expect(wrapper.find(".oc-tbody-tr-notes .oc-table-data-cell-size").text()).toEqual("?") })