From 1d502efbac3ac4de0d95519b47a2e021d8752470 Mon Sep 17 00:00:00 2001 From: plizon Date: Tue, 11 Jun 2024 13:42:56 +0200 Subject: [PATCH 1/3] feat: update to react-intl 6 --- package.json | 5 +- yarn.lock | 165 ++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 119 insertions(+), 51 deletions(-) diff --git a/package.json b/package.json index 4688a10cf..1aec7403d 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "raw-loader": "^3.1.0", "react": "^17.0.1", "react-dom": "^17.0.1", - "react-intl": "^2.9.0", + "react-intl": "^6.4.2", "react-tether": "^1.0.5", "sass": "1.34.1", "sass-loader": "^7.1.0", @@ -152,6 +152,7 @@ } }, "resolutions": { - "mojito-rb-gen/merge": "1.2.1" + "mojito-rb-gen/merge": "1.2.1", + "**/react-intl/**/@types/react": "^17.0.2" } } diff --git a/yarn.lock b/yarn.lock index c4e8bf826..0d4d9c970 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1500,6 +1500,63 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.43.0.tgz#559ca3d9ddbd6bf907ad524320a0d14b85586af0" integrity sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg== +"@formatjs/ecma402-abstract@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-2.0.0.tgz#39197ab90b1c78b7342b129a56a7acdb8f512e17" + integrity sha512-rRqXOqdFmk7RYvj4khklyqzcfQl9vEL/usogncBHRZfZBDOwMGuSRNFl02fu5KGHXdbinju+YXyuR+Nk8xlr/g== + dependencies: + "@formatjs/intl-localematcher" "0.5.4" + tslib "^2.4.0" + +"@formatjs/fast-memoize@2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@formatjs/fast-memoize/-/fast-memoize-2.2.0.tgz#33bd616d2e486c3e8ef4e68c99648c196887802b" + integrity sha512-hnk/nY8FyrL5YxwP9e4r9dqeM6cAbo8PeU9UjyXojZMNvVad2Z06FAVHyR3Ecw6fza+0GH7vdJgiKIVXTMbSBA== + dependencies: + tslib "^2.4.0" + +"@formatjs/icu-messageformat-parser@2.7.8": + version "2.7.8" + resolved "https://registry.yarnpkg.com/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.7.8.tgz#f6d7643001e9bb5930d812f1f9a9856f30fa0343" + integrity sha512-nBZJYmhpcSX0WeJ5SDYUkZ42AgR3xiyhNCsQweFx3cz/ULJjym8bHAzWKvG5e2+1XO98dBYC0fWeeAECAVSwLA== + dependencies: + "@formatjs/ecma402-abstract" "2.0.0" + "@formatjs/icu-skeleton-parser" "1.8.2" + tslib "^2.4.0" + +"@formatjs/icu-skeleton-parser@1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.8.2.tgz#2252c949ae84ee66930e726130ea66731a123c9f" + integrity sha512-k4ERKgw7aKGWJZgTarIcNEmvyTVD9FYh0mTrrBMHZ1b8hUu6iOJ4SzsZlo3UNAvHYa+PnvntIwRPt1/vy4nA9Q== + dependencies: + "@formatjs/ecma402-abstract" "2.0.0" + tslib "^2.4.0" + +"@formatjs/intl-displaynames@6.6.8": + version "6.6.8" + resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-6.6.8.tgz#2f5afac8df83167f5a6ef8543600eaf1ef99c885" + integrity sha512-Lgx6n5KxN16B3Pb05z3NLEBQkGoXnGjkTBNCZI+Cn17YjHJ3fhCeEJJUqRlIZmJdmaXQhjcQVDp6WIiNeRYT5g== + dependencies: + "@formatjs/ecma402-abstract" "2.0.0" + "@formatjs/intl-localematcher" "0.5.4" + tslib "^2.4.0" + +"@formatjs/intl-listformat@7.5.7": + version "7.5.7" + resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-7.5.7.tgz#125e05105fabd1ae5f11881d6ab74484f2098ee4" + integrity sha512-MG2TSChQJQT9f7Rlv+eXwUFiG24mKSzmF144PLb8m8OixyXqn4+YWU+5wZracZGCgVTVmx8viCf7IH3QXoiB2g== + dependencies: + "@formatjs/ecma402-abstract" "2.0.0" + "@formatjs/intl-localematcher" "0.5.4" + tslib "^2.4.0" + +"@formatjs/intl-localematcher@0.5.4": + version "0.5.4" + resolved "https://registry.yarnpkg.com/@formatjs/intl-localematcher/-/intl-localematcher-0.5.4.tgz#caa71f2e40d93e37d58be35cfffe57865f2b366f" + integrity sha512-zTwEpWOzZ2CiKcB93BLngUX59hQkuZjT2+SAQEscSm52peDW/getsawMcWF1rGRpMCX6D7nSJA3CzJ8gn13N/g== + dependencies: + tslib "^2.4.0" + "@formatjs/intl-unified-numberformat@^3.2.0": version "3.3.7" resolved "https://registry.yarnpkg.com/@formatjs/intl-unified-numberformat/-/intl-unified-numberformat-3.3.7.tgz#9995a24568908188e716d81a1de5b702b2ee00e2" @@ -1512,6 +1569,19 @@ resolved "https://registry.yarnpkg.com/@formatjs/intl-utils/-/intl-utils-2.3.0.tgz#2dc8c57044de0340eb53a7ba602e59abf80dc799" integrity sha512-KWk80UPIzPmUg+P0rKh6TqspRw0G6eux1PuJr+zz47ftMaZ9QDwbGzHZbtzWkl5hgayM/qrKRutllRC7D/vVXQ== +"@formatjs/intl@2.10.4": + version "2.10.4" + resolved "https://registry.yarnpkg.com/@formatjs/intl/-/intl-2.10.4.tgz#e1819e0858fb05ca65923a020f346bc74e894e92" + integrity sha512-56483O+HVcL0c7VucAS2tyH020mt9XTozZO67cwtGg0a7KWDukS/FzW3OnvaHmTHDuYsoPIzO+ZHVfU6fT/bJw== + dependencies: + "@formatjs/ecma402-abstract" "2.0.0" + "@formatjs/fast-memoize" "2.2.0" + "@formatjs/icu-messageformat-parser" "2.7.8" + "@formatjs/intl-displaynames" "6.6.8" + "@formatjs/intl-listformat" "7.5.7" + intl-messageformat "10.5.14" + tslib "^2.4.0" + "@hapi/hoek@^9.0.0", "@hapi/hoek@^9.3.0": version "9.3.0" resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" @@ -2033,6 +2103,14 @@ dependencies: "@types/node" "*" +"@types/hoist-non-react-statics@^3.3.1": + version "3.3.5" + resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz#dab7867ef789d87e2b4b0003c9d65c49cc44a494" + integrity sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg== + dependencies: + "@types/react" "*" + hoist-non-react-statics "^3.3.0" + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.4" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" @@ -2127,19 +2205,19 @@ dependencies: "@types/react" "^17" -"@types/react@^16": - version "16.14.43" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.43.tgz#bc6e7a0e99826809591d38ddf1193955de32c446" - integrity sha512-7zdjv7jvoLLQg1tTvpQsm+hyNUMT2mPlNV1+d0I8fbGhkJl82spopMyBlu4wb1dviZAxpGdk5eHu/muacknnfw== +"@types/react@*", "@types/react@16 || 17 || 18", "@types/react@^17", "@types/react@^17.0.2": + version "17.0.62" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.62.tgz#2efe8ddf8533500ec44b1334dd1a97caa2f860e3" + integrity sha512-eANCyz9DG8p/Vdhr0ZKST8JV12PhH2ACCDYlFw6DIO+D+ca+uP4jtEDEpVqXZrh/uZdXQGwk7whJa3ah5DtyLw== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^17", "@types/react@^17.0.2": - version "17.0.62" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.62.tgz#2efe8ddf8533500ec44b1334dd1a97caa2f860e3" - integrity sha512-eANCyz9DG8p/Vdhr0ZKST8JV12PhH2ACCDYlFw6DIO+D+ca+uP4jtEDEpVqXZrh/uZdXQGwk7whJa3ah5DtyLw== +"@types/react@^16": + version "16.14.43" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.43.tgz#bc6e7a0e99826809591d38ddf1193955de32c446" + integrity sha512-7zdjv7jvoLLQg1tTvpQsm+hyNUMT2mPlNV1+d0I8fbGhkJl82spopMyBlu4wb1dviZAxpGdk5eHu/muacknnfw== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -7132,7 +7210,7 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoist-non-react-statics@^3.3.0: +hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== @@ -7530,16 +7608,6 @@ interpret@^1.0.0, interpret@^1.4.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== -intl-format-cache@^2.0.5: - version "2.2.9" - resolved "https://registry.yarnpkg.com/intl-format-cache/-/intl-format-cache-2.2.9.tgz#fb560de20c549cda20b569cf1ffb6dc62b5b93b4" - integrity sha512-Zv/u8wRpekckv0cLkwpVdABYST4hZNTDaX7reFetrYTJwxExR2VyTqQm+l0WmL0Qo8Mjb9Tf33qnfj0T7pjxdQ== - -intl-messageformat-parser@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/intl-messageformat-parser/-/intl-messageformat-parser-1.4.0.tgz#b43d45a97468cadbe44331d74bb1e8dea44fc075" - integrity sha512-/XkqFHKezO6UcF4Av2/Lzfrez18R0jyw7kRFhSeB/YRakdrgSc9QfFZUwNJI9swMwMoNPygK1ArC5wdFSjPw+A== - intl-messageformat-parser@^3.6.4: version "3.6.4" resolved "https://registry.yarnpkg.com/intl-messageformat-parser/-/intl-messageformat-parser-3.6.4.tgz#5199d106d816c3dda26ee0694362a9cf823978fb" @@ -7547,19 +7615,15 @@ intl-messageformat-parser@^3.6.4: dependencies: "@formatjs/intl-unified-numberformat" "^3.2.0" -intl-messageformat@^2.0.0, intl-messageformat@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-2.2.0.tgz#345bcd46de630b7683330c2e52177ff5eab484fc" - integrity sha512-I+tSvHnXqJYjDfNmY95tpFMj30yoakC6OXAo+wu/wTMy6tA/4Fd4mvV7Uzs4cqK/Ap29sHhwjcY+78a8eifcXw== - dependencies: - intl-messageformat-parser "1.4.0" - -intl-relativeformat@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/intl-relativeformat/-/intl-relativeformat-2.2.0.tgz#6aca95d019ec8d30b6c5653b6629f9983ea5b6c5" - integrity sha512-4bV/7kSKaPEmu6ArxXf9xjv1ny74Zkwuey8Pm01NH4zggPP7JHwg2STk8Y3JdspCKRDriwIyLRfEXnj2ZLr4Bw== +intl-messageformat@10.5.14: + version "10.5.14" + resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-10.5.14.tgz#e5bb373f8a37b88fbe647d7b941f3ab2a37ed00a" + integrity sha512-IjC6sI0X7YRjjyVH9aUgdftcmZK7WXdHeil4KwbjDnRWjnVitKpAx3rr6t6di1joFp5188VqKcobOPA6mCLG/w== dependencies: - intl-messageformat "^2.0.0" + "@formatjs/ecma402-abstract" "2.0.0" + "@formatjs/fast-memoize" "2.2.0" + "@formatjs/icu-messageformat-parser" "2.7.8" + tslib "^2.4.0" into-stream@^3.1.0: version "3.1.0" @@ -7569,13 +7633,6 @@ into-stream@^3.1.0: from2 "^2.1.1" p-is-promise "^1.1.0" -invariant@^2.1.1: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - ip-regex@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" @@ -9179,7 +9236,7 @@ longest-streak@^2.0.1: resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-2.0.4.tgz#b8599957da5b5dab64dee3fe316fa774597d90e4" integrity sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg== -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4.0: +loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -11313,16 +11370,21 @@ react-dom@^17.0.1: object-assign "^4.1.1" scheduler "^0.20.2" -react-intl@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-2.9.0.tgz#c97c5d17d4718f1575fdbd5a769f96018a3b1843" - integrity sha512-27jnDlb/d2A7mSJwrbOBnUgD+rPep+abmoJE511Tf8BnoONIAUehy/U1zZCHGO17mnOwMWxqN4qC0nW11cD6rA== - dependencies: - hoist-non-react-statics "^3.3.0" - intl-format-cache "^2.0.5" - intl-messageformat "^2.1.0" - intl-relativeformat "^2.1.0" - invariant "^2.1.1" +react-intl@^6.4.2: + version "6.6.8" + resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-6.6.8.tgz#cb60c90502d0025caf9f86ec298cdc4348da17c2" + integrity sha512-M0pkhzcgV31h++2901BiRXWl69hp2zPyLxRrSwRjd1ErXbNoubz/f4M6DrRTd4OiSUrT4ajRQzrmtS5plG4FtA== + dependencies: + "@formatjs/ecma402-abstract" "2.0.0" + "@formatjs/icu-messageformat-parser" "2.7.8" + "@formatjs/intl" "2.10.4" + "@formatjs/intl-displaynames" "6.6.8" + "@formatjs/intl-listformat" "7.5.7" + "@types/hoist-non-react-statics" "^3.3.1" + "@types/react" "16 || 17 || 18" + hoist-non-react-statics "^3.3.2" + intl-messageformat "10.5.14" + tslib "^2.4.0" "react-is@^16.12.0 || ^17.0.0 || ^18.0.0", react-is@^18.0.0: version "18.2.0" @@ -13292,6 +13354,11 @@ tslib@^2.1.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3" integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA== +tslib@^2.4.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== + tsutils@^3.17.1, tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" From cb16de99d5dc8154cb603636b106d8f39182824a Mon Sep 17 00:00:00 2001 From: plizon Date: Tue, 11 Jun 2024 13:50:42 +0200 Subject: [PATCH 2/3] feat: update to buie 20 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 1aec7403d..6e0886871 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "babel-loader": "^8.3.0", "babel-plugin-transform-require-ignore": "^0.1.1", "box-annotations": "^2.3.0", - "box-ui-elements": "^18.1.0", + "box-ui-elements": "^20.0.0", "chai": "^4.2.0", "classnames": "^2.2.6", "conventional-changelog-cli": "^2.0.28", diff --git a/yarn.lock b/yarn.lock index 0d4d9c970..8caf2153c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3365,10 +3365,10 @@ box-annotations@^2.3.0: resolved "https://registry.yarnpkg.com/box-annotations/-/box-annotations-2.3.0.tgz#5cac38171f7f8d9283659e2b243310f19d5ab7d3" integrity sha512-Ea7tPgyJjX7vcnmZIfCorbzHd6oYx/OHVMPnZVQL/dUHR5vRKhLM0610xqwmVlUpk627sqHw5x/APaa+kt4SXg== -box-ui-elements@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/box-ui-elements/-/box-ui-elements-18.1.0.tgz#59524c99596b3a9bc39b79eefa8d320dc487c7ad" - integrity sha512-D1r1qn0BfzHMHg3qVR+tJfB4jowUtmKtBGjyN1F9oE6dmj/mbp2t12WMpU+x57BRVY/h5COHYwBsYyGjets7tA== +box-ui-elements@^20.0.0: + version "20.0.0" + resolved "https://registry.yarnpkg.com/box-ui-elements/-/box-ui-elements-20.0.0.tgz#a1777a692a5e2f71a79d6dbbcaa785af9a5f8c7c" + integrity sha512-56jY34zxigRi77tja4y+4KF3Z6nqgF7xWz2H0fMwLxD2VPuQVFG2k6GSxGWFBWTHP8JMLzQQ2y+/rxfCdTUhtg== brace-expansion@^1.1.7: version "1.1.11" From abcc5d091cc83519f4a1a45ec5f078d4a79177e6 Mon Sep 17 00:00:00 2001 From: plizon Date: Tue, 11 Jun 2024 13:55:08 +0200 Subject: [PATCH 3/3] feat: remove locale-data --- build/jest/react-intl-mock.js | 4 ---- build/webpack.common.config.js | 2 -- jest.config.js | 1 - src/lib/viewers/archive/ArchiveExplorer.js | 4 ---- 4 files changed, 11 deletions(-) diff --git a/build/jest/react-intl-mock.js b/build/jest/react-intl-mock.js index 99a13a1a2..14ea21308 100644 --- a/build/jest/react-intl-mock.js +++ b/build/jest/react-intl-mock.js @@ -14,14 +14,10 @@ FormattedTime.displayName = 'FormattedTime'; export const FormattedMessage = () =>
; FormattedMessage.displayName = 'FormattedMessage'; -export const addLocaleData = () => {}; - export const createIntl = () => intlMock; export const defineMessages = messages => messages; -export const intlShape = {}; - export const injectIntl = Component => { const WrapperComponent = props => { const injectedProps = { ...props, intl: intlMock }; diff --git a/build/webpack.common.config.js b/build/webpack.common.config.js index ff7300024..c4e58cabd 100644 --- a/build/webpack.common.config.js +++ b/build/webpack.common.config.js @@ -11,7 +11,6 @@ const isLinked = process.env.IS_LINKED === '1'; /* eslint-disable import/no-dynamic-require */ module.exports = language => { const langJson = require(`${path.resolve('src/i18n/json')}/${language}.json`); - const locale = language ? language.substr(0, language.indexOf('-')) : 'en'; return { bail: true, @@ -67,7 +66,6 @@ module.exports = language => { alias: { 'box-annotations-messages': path.resolve(`node_modules/box-annotations/i18n/${language}`), 'box-elements-messages': path.resolve(`node_modules/box-ui-elements/i18n/${language}`), - 'react-intl-locale-data': path.resolve(`node_modules/react-intl/locale-data/${locale}`), }, extensions: ['.tsx', '.ts', '.js'], symlinks: !isLinked, diff --git a/jest.config.js b/jest.config.js index 3c5f276da..32b5b0f30 100644 --- a/jest.config.js +++ b/jest.config.js @@ -13,7 +13,6 @@ module.exports = { '@box/react-virtualized/dist/es': '@box/react-virtualized/dist/commonjs', 'box-elements-messages': '/build/jest/i18nMock.js', 'react-intl': '/build/jest/react-intl-mock.js', - 'react-intl-locale-data': '/node_modules/react-intl/locale-data/en.js', THREE: '/src/third-party/model3d/1.12.0/three.min.js', }, restoreMocks: true, diff --git a/src/lib/viewers/archive/ArchiveExplorer.js b/src/lib/viewers/archive/ArchiveExplorer.js index 337383b4c..ce074d579 100644 --- a/src/lib/viewers/archive/ArchiveExplorer.js +++ b/src/lib/viewers/archive/ArchiveExplorer.js @@ -1,7 +1,6 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import elementsMessages from 'box-elements-messages'; // eslint-disable-line -import intlLocaleData from 'react-intl-locale-data'; // eslint-disable-line import Internationalize from 'box-ui-elements/es/elements/common/Internationalize'; import VirtualizedTable from 'box-ui-elements/es/features/virtualized-table/VirtualizedTable'; import fuzzySearch from 'box-ui-elements/es/utils/fuzzySearch'; @@ -10,7 +9,6 @@ import readableTimeCellRenderer from 'box-ui-elements/es/features/virtualized-ta import sizeCellRenderer from 'box-ui-elements/es/features/virtualized-table-renderers/sizeCellRenderer'; import sortableColumnHeaderRenderer from 'box-ui-elements/es/features/virtualized-table-renderers/sortableColumnHeaderRenderer'; import { AutoSizer, Column, SortDirection } from '@box/react-virtualized'; -import { addLocaleData } from 'react-intl'; import Breadcrumbs from './Breadcrumbs'; import SearchBar from './SearchBar'; import { ROOT_FOLDER, TABLE_COLUMNS, VIEWS } from './constants'; @@ -43,8 +41,6 @@ class ArchiveExplorer extends React.Component { constructor(props) { super(props); - addLocaleData(intlLocaleData); - this.state = { fullPath: ROOT_FOLDER, searchQuery: '',