box / box-content-preview

JavaScript library for rendering files stored on Box
https://developer.box.com/docs/box-content-preview
Other
107 stars 114 forks source link

feat: upgrade react-intl #1509

Closed soygitana closed 5 months ago

soygitana commented 1 year ago

❗ On hold: https://github.com/box/box-ui-elements/pull/3466 (stable version is needed) should go first, then Preview and Annotations

IMPORTANT:

Changes:

  1. react-intl lib has been upgrade to v6.4.2

  2. deprecated addLocaleData (react-intl/locale-data has been removed from react-intl) has been removed (doc).


    Testing:

Make sure application and strings are not broken when language is changed.


For more information, please check:

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

soygitana commented 1 year ago

2686de8:

I have to add resolution for react-intl to package.json file ( "**/react-intl/**/@types/react": "^17.0.2"). react-intl has set @types/react to version 16 || 17 || 18 (https://github.com/formatjs/formatjs/blob/main/package.json#L61) so yarn install the latest one, however @types/react 17 i 18 are incompatible. It caused a mismatch of types in some components.

soygitana commented 1 year ago

@bfoxx1906 Is there a specific reason why @box/frontend is set to "^6.4.0" when the latest version is 9? Should it remain on version 6 or can I upgrade it?

bfoxx1906 commented 1 year ago
  • official upgrade guide

No we just haven't updated it.

soygitana commented 1 year ago

Regarding @box/frontend package:

It seems that this repository only relies on the 'prettier' and 'eslint' modules from @box/frontend. It doesn't make use of i18n functions like language bundles, so there's no need to upgrade it in relation to the react-intl update. I'll keep @box/frontend at version 6, and you can update it later if necessary.

soygitana commented 10 months ago

❗ On hold: BUIE should go first, then Preview and Annotations (confirmed by @greg-in-a-box)