From c0b14a148f31bcfd99a223dec9a12e8f27121acc Mon Sep 17 00:00:00 2001 From: AlexisG Date: Fri, 20 Dec 2024 15:16:02 +0100 Subject: [PATCH 1/2] feat(cozy-harvest): Upgrade cozy-ui to 115.0.2 BREAKING CHANGE: You must have `cozy-ui >= 115.0.2`, `cozy-client >= 51.6.1`, `cozy-intent >= 2.29.1` & `cozy-viewer >= 11.3.1` --- packages/cozy-harvest-lib/package.json | 12 +++---- .../src/datacards/FileDataCard.jsx | 2 +- packages/cozy-harvest-lib/src/locales/en.json | 6 ++-- packages/cozy-harvest-lib/src/locales/fr.json | 6 ++-- .../cozy-harvest-lib/src/locales/nl_NL.json | 6 ++-- yarn.lock | 33 ++++++++++++++++--- 6 files changed, 45 insertions(+), 20 deletions(-) diff --git a/packages/cozy-harvest-lib/package.json b/packages/cozy-harvest-lib/package.json index e8412fe9c5..d178403efa 100644 --- a/packages/cozy-harvest-lib/package.json +++ b/packages/cozy-harvest-lib/package.json @@ -65,7 +65,7 @@ "babel-jest": "26.6.3", "babel-plugin-inline-react-svg": "1.1.2", "babel-preset-cozy-app": "^2.8.1", - "cozy-client": "^50.0.0", + "cozy-client": "^51.6.1", "cozy-device-helper": "^3.7.1", "cozy-flags": "^4.6.1", "cozy-intent": "^2.29.1", @@ -73,7 +73,7 @@ "cozy-keys-lib": "^6.1.1", "cozy-realtime": "^5.6.2", "cozy-tsconfig": "^1.8.1", - "cozy-ui": "^113.1.0", + "cozy-ui": "^115.0.2", "cozy-viewer": "^11.3.1", "enzyme": "3.11.0", "enzyme-adapter-react-16": "1.15.6", @@ -97,15 +97,15 @@ "peerDependencies": { "@babel/runtime": ">=7.12.5", "@sentry/react": ">=7.118.0", - "cozy-client": ">=50.0.0", + "cozy-client": ">=51.6.1", "cozy-device-helper": ">=2.6.0", "cozy-flags": ">=2.3.5", - "cozy-intent": ">=2.26.0", + "cozy-intent": ">=2.29.1", "cozy-interapp": ">=0.9.0", "cozy-keys-lib": ">=6.1.1", "cozy-realtime": ">=4.2.8", - "cozy-ui": ">=112.2.0", - "cozy-viewer": ">=2.3.0", + "cozy-ui": ">=115.0.2", + "cozy-viewer": ">=11.3.1", "leaflet": "^1.7.1", "react-router-dom": ">=6.14.2" }, diff --git a/packages/cozy-harvest-lib/src/datacards/FileDataCard.jsx b/packages/cozy-harvest-lib/src/datacards/FileDataCard.jsx index ac5b61195d..bab66f5eee 100644 --- a/packages/cozy-harvest-lib/src/datacards/FileDataCard.jsx +++ b/packages/cozy-harvest-lib/src/datacards/FileDataCard.jsx @@ -56,7 +56,7 @@ const FileListItem = ({ divider, file, onClick, style }) => { secondary={ {t('datacards.files.imported', { - date: f(get(file, 'cozyMetadata.createdAt'), 'DD/MM/YYYY') + date: f(get(file, 'cozyMetadata.createdAt'), 'dd/LL/yyyy') })} } diff --git a/packages/cozy-harvest-lib/src/locales/en.json b/packages/cozy-harvest-lib/src/locales/en.json index a10e634e64..35b7b9258c 100644 --- a/packages/cozy-harvest-lib/src/locales/en.json +++ b/packages/cozy-harvest-lib/src/locales/en.json @@ -44,7 +44,7 @@ "handle-synchronization": "Handle my synchronizations", "desynchronized": { "message": "you have desynchronized this account on %{date}", - "dateFormat": "MM/DD/YY" + "dateFormat": "LL/dd/yy" } }, "contractForm": { @@ -100,7 +100,7 @@ "syncing": "Data recovery…", "unknown": "Last sync. unknown", "afterSomeTimes": "Sync. %{times} ago", - "format": "MM/DD/YYYY", + "format": "LL/dd/yyyy", "disconnected": "Disconnected", "justNow": "Sync. just now" }, @@ -144,7 +144,7 @@ } }, "default": { - "dateFormat": "MM/DD/YYYY", + "dateFormat": "LL/dd/yyyy", "baseDir": "/Administrative" }, "error": { diff --git a/packages/cozy-harvest-lib/src/locales/fr.json b/packages/cozy-harvest-lib/src/locales/fr.json index a047deb117..a11cf9e5f7 100644 --- a/packages/cozy-harvest-lib/src/locales/fr.json +++ b/packages/cozy-harvest-lib/src/locales/fr.json @@ -44,7 +44,7 @@ "handle-synchronization": "Gérer mes synchronisations", "desynchronized": { "message": "vous avez désynchronisé ce compte le %{date}", - "dateFormat": "DD/MM/YY" + "dateFormat": "dd/LL/yy" } }, "contractForm": { @@ -100,7 +100,7 @@ "syncing": "Récupération des données…", "unknown": "Dernière sync. inconnue", "afterSomeTimes": "Sync. il y a %{times}", - "format": "DD/MM/YYYY", + "format": "dd/LL/yyyy", "disconnected": "Déconnecté", "justNow": "Sync. à l'instant" }, @@ -144,7 +144,7 @@ } }, "default": { - "dateFormat": "DD/MM/YYYY", + "dateFormat": "dd/LL/yyyy", "baseDir": "/Administratif" }, "error": { diff --git a/packages/cozy-harvest-lib/src/locales/nl_NL.json b/packages/cozy-harvest-lib/src/locales/nl_NL.json index efa67d9b5e..2d11b215ad 100644 --- a/packages/cozy-harvest-lib/src/locales/nl_NL.json +++ b/packages/cozy-harvest-lib/src/locales/nl_NL.json @@ -44,7 +44,7 @@ "handle-synchronization": "Synchronisaties beheren", "desynchronized": { "message": "je hebt de synchroniastie met dit account stopgezet op %{date}", - "dateFormat": "DD-MM-YYYY" + "dateFormat": "dd-LL-yyyy" } }, "contractForm": { @@ -100,7 +100,7 @@ "syncing": "Gegevensherstel…", "unknown": "Onbekend", "afterSomeTimes": "%{times} geleden gesynchroniseerd", - "format": "DD-MM-YYYY", + "format": "dd-LL-yyyy", "disconnected": "Losgekoppeld", "justNow": "Zojuist gesynchroniseerd" }, @@ -144,7 +144,7 @@ } }, "default": { - "dateFormat": "DD-MM-YYYY", + "dateFormat": "dd-LL-yyyy", "baseDir": "/Administratief" }, "error": { diff --git a/yarn.lock b/yarn.lock index 43f85a429d..c62c81b71e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11163,6 +11163,31 @@ cozy-client@^51.6.1: sift "^6.0.0" url-search-params-polyfill "^8.0.0" +cozy-client@^51.6.1: + version "51.6.1" + resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-51.6.1.tgz#55ba89c3ddedf47444ef2aa2799b5e6d12e04f76" + integrity sha512-++MbwaarzQWEpZIfbovWRNWcGWpWwhTC40S5CHjIDIZzSWKLe7mq2nhPw/cgeorj+JWSR7t6CoekJp9E2aOInQ== + dependencies: + "@cozy/minilog" "1.0.0" + "@types/jest" "^26.0.20" + "@types/lodash" "^4.14.170" + btoa "^1.2.1" + cozy-stack-client "^51.6.0" + date-fns "2.29.3" + json-stable-stringify "^1.0.1" + lodash "^4.17.13" + microee "^0.0.6" + node-fetch "^2.6.1" + node-polyglot "2.4.2" + open "7.4.2" + prop-types "^15.6.2" + react-redux "^7.2.0" + redux "3 || 4" + redux-thunk "^2.3.0" + server-destroy "^1.0.1" + sift "^6.0.0" + url-search-params-polyfill "^8.0.0" + cozy-device-helper@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/cozy-device-helper/-/cozy-device-helper-2.0.0.tgz#1d08b6cb74709ef941b4d8214f13a6dc7e3910ec" @@ -11379,10 +11404,10 @@ cozy-ui@^111.19.0: react-swipeable-views "^0.13.3" rooks "^5.11.2" -cozy-ui@^113.1.0: - version "113.1.0" - resolved "https://registry.yarnpkg.com/cozy-ui/-/cozy-ui-113.1.0.tgz#0623a55f92069a0959f0a72953d6b2d2c5ef3370" - integrity sha512-Wtq1Tw1D2qIcqPV1FhMFcW0P7DuJa9kgRu7WnxUwf6epYbhGceR0uRn9v1+UV3X4O09LNcjePeTD8exHAuLH9w== +cozy-ui@^113.9.0: + version "113.9.0" + resolved "https://registry.yarnpkg.com/cozy-ui/-/cozy-ui-113.9.0.tgz#d41b80558c752ced8cc6c2421e2609fcc17254a2" + integrity sha512-ntENcdeTDy0Lkc2kW2FLCQHT4vE7/cxLzZ6H2oxce8kMWUQgZ3DnSswv6MYVXHLz7RfuGLO0f+3LLqxBjZZPXw== dependencies: "@babel/runtime" "^7.3.4" "@material-ui/core" "4.12.3" From 38a567ecc70b16bc3b790b456350e7b8b590eed0 Mon Sep 17 00:00:00 2001 From: AlexisG Date: Mon, 23 Dec 2024 14:21:47 +0100 Subject: [PATCH 2/2] feat(cozy-harvest): Replace jsdom-sixteen package --- packages/cozy-harvest-lib/jest.config.js | 2 +- packages/cozy-harvest-lib/package.json | 2 +- packages/cozy-harvest-lib/src/jest.setup.js | 2 +- yarn.lock | 55 --------------------- 4 files changed, 3 insertions(+), 58 deletions(-) diff --git a/packages/cozy-harvest-lib/jest.config.js b/packages/cozy-harvest-lib/jest.config.js index 7116415e4e..62948e2fb7 100644 --- a/packages/cozy-harvest-lib/jest.config.js +++ b/packages/cozy-harvest-lib/jest.config.js @@ -8,7 +8,7 @@ module.exports = { roots: ['src'], resolver: 'jest-resolve-cached', testPathIgnorePatterns: ['node_modules', 'dist'], - testEnvironment: 'jest-environment-jsdom-sixteen', + testEnvironment: 'jest-environment-jsdom', testURL: 'http://localhost/', moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'styl'], moduleDirectories: ['src', 'node_modules'], diff --git a/packages/cozy-harvest-lib/package.json b/packages/cozy-harvest-lib/package.json index d178403efa..e22b2258ad 100644 --- a/packages/cozy-harvest-lib/package.json +++ b/packages/cozy-harvest-lib/package.json @@ -81,7 +81,7 @@ "identity-obj-proxy": "3.0.0", "isomorphic-fetch": "^2.2.1", "jest": "26.6.3", - "jest-environment-jsdom-sixteen": "1.0.3", + "jest-environment-jsdom": "26.6.2", "jest-resolve-cached": "1.0.0", "jsdom": "16.5.0", "leaflet": "1.8.0", diff --git a/packages/cozy-harvest-lib/src/jest.setup.js b/packages/cozy-harvest-lib/src/jest.setup.js index 1420cd8a2b..d6e02cb388 100644 --- a/packages/cozy-harvest-lib/src/jest.setup.js +++ b/packages/cozy-harvest-lib/src/jest.setup.js @@ -1,5 +1,5 @@ import minilog from '@cozy/minilog' -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' import { configure } from 'enzyme' import Adapter from 'enzyme-adapter-react-16' import 'isomorphic-fetch' diff --git a/yarn.lock b/yarn.lock index c62c81b71e..1d7c9bd0c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11163,31 +11163,6 @@ cozy-client@^51.6.1: sift "^6.0.0" url-search-params-polyfill "^8.0.0" -cozy-client@^51.6.1: - version "51.6.1" - resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-51.6.1.tgz#55ba89c3ddedf47444ef2aa2799b5e6d12e04f76" - integrity sha512-++MbwaarzQWEpZIfbovWRNWcGWpWwhTC40S5CHjIDIZzSWKLe7mq2nhPw/cgeorj+JWSR7t6CoekJp9E2aOInQ== - dependencies: - "@cozy/minilog" "1.0.0" - "@types/jest" "^26.0.20" - "@types/lodash" "^4.14.170" - btoa "^1.2.1" - cozy-stack-client "^51.6.0" - date-fns "2.29.3" - json-stable-stringify "^1.0.1" - lodash "^4.17.13" - microee "^0.0.6" - node-fetch "^2.6.1" - node-polyglot "2.4.2" - open "7.4.2" - prop-types "^15.6.2" - react-redux "^7.2.0" - redux "3 || 4" - redux-thunk "^2.3.0" - server-destroy "^1.0.1" - sift "^6.0.0" - url-search-params-polyfill "^8.0.0" - cozy-device-helper@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/cozy-device-helper/-/cozy-device-helper-2.0.0.tgz#1d08b6cb74709ef941b4d8214f13a6dc7e3910ec" @@ -11404,36 +11379,6 @@ cozy-ui@^111.19.0: react-swipeable-views "^0.13.3" rooks "^5.11.2" -cozy-ui@^113.9.0: - version "113.9.0" - resolved "https://registry.yarnpkg.com/cozy-ui/-/cozy-ui-113.9.0.tgz#d41b80558c752ced8cc6c2421e2609fcc17254a2" - integrity sha512-ntENcdeTDy0Lkc2kW2FLCQHT4vE7/cxLzZ6H2oxce8kMWUQgZ3DnSswv6MYVXHLz7RfuGLO0f+3LLqxBjZZPXw== - dependencies: - "@babel/runtime" "^7.3.4" - "@material-ui/core" "4.12.3" - "@material-ui/lab" "^4.0.0-alpha.61" - "@popperjs/core" "^2.4.4" - chart.js "3.7.1" - classnames "^2.2.5" - cozy-interapp "^0.5.4" - date-fns "^1.28.5" - filesize "8.0.7" - hammerjs "^2.0.8" - intersection-observer "0.11.0" - mime-types "2.1.35" - mui-bottom-sheet "https://github.com/cozy/mui-bottom-sheet.git#v1.0.9" - node-polyglot "^2.5.0" - normalize.css "^8.0.0" - pdf-lib "1.17.1" - piwik-react-router "0.12.1" - react-chartjs-2 "4.1.0" - react-markdown "^4.0.8" - react-popper "^2.2.3" - react-remove-scroll "^2.4.0" - react-select "^4.3.0" - react-swipeable-views "^0.13.3" - rooks "^5.11.2" - cozy-ui@^115.0.2: version "115.0.2" resolved "https://registry.yarnpkg.com/cozy-ui/-/cozy-ui-115.0.2.tgz#8976de6e6141bd7255092f6e432ddacdb18d4689"