Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] FEC-156: migration to React 19 #3687

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .changeset/heavy-flowers-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
'@commercetools-applications/merchant-center-custom-view-template-starter-typescript': major
'@commercetools-applications/merchant-center-template-starter-typescript': major
'@commercetools-frontend/application-shell-connectors': major
'@commercetools-frontend/application-components': major
'@commercetools-applications/merchant-center-custom-view-template-starter': major
'@commercetools-applications/merchant-center-template-starter': major
'@commercetools-website/components-playground': major
'@commercetools-frontend/react-notifications': major
'@commercetools-frontend/application-config': major
'@commercetools-frontend/jest-preset-mc-app': major
'@commercetools-frontend/application-shell': major
'@commercetools-frontend/actions-global': major
'@commercetools-frontend/permissions': major
'@commercetools-local/visual-testing-app': major
'@commercetools-frontend/sentry': major
'@commercetools-frontend/i18n': major
'@commercetools-frontend/l10n': major
'@commercetools-frontend/sdk': major
'@commercetools-local/playground': major
'@commercetools-backend/eslint-config-node': major
'@commercetools-backend/express': major
'@commercetools-backend/loggers': major
'@commercetools-frontend/assets': major
'@commercetools-frontend/babel-preset-mc-app': major
'@commercetools-frontend/browser-history': major
'@commercetools-frontend/codemod': major
'@commercetools-frontend/constants': major
'@commercetools-frontend/create-mc-app': major
'@commercetools-frontend/cypress': major
'@commercetools-frontend/eslint-config-mc-app': major
'@commercetools-frontend/jest-stylelint-runner': major
'@commercetools-frontend/mc-dev-authentication': major
'@commercetools-frontend/mc-html-template': major
'@commercetools-frontend/mc-scripts': major
'@commercetools-frontend/notifications': major
'@commercetools-frontend/url-utils': major
---

Upgrade to React 19
51 changes: 25 additions & 26 deletions application-templates/starter-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,35 +40,34 @@
"@commercetools-test-data/channel": "8.5.0",
"@commercetools-test-data/commons": "8.5.0",
"@commercetools-test-data/core": "8.5.0",
"@commercetools-uikit/constraints": "^19.17.1",
"@commercetools-uikit/data-table": "^19.17.1",
"@commercetools-uikit/flat-button": "^19.17.1",
"@commercetools-uikit/grid": "^19.17.1",
"@commercetools-uikit/hooks": "^19.17.1",
"@commercetools-uikit/icons": "^19.17.1",
"@commercetools-uikit/link": "^19.17.1",
"@commercetools-uikit/loading-spinner": "^19.17.1",
"@commercetools-uikit/localized-text-field": "^19.17.1",
"@commercetools-uikit/localized-text-input": "^19.17.1",
"@commercetools-uikit/notifications": "^19.17.1",
"@commercetools-uikit/pagination": "^19.17.1",
"@commercetools-uikit/select-field": "^19.17.1",
"@commercetools-uikit/spacings": "^19.17.1",
"@commercetools-uikit/text": "^19.17.1",
"@commercetools-uikit/text-field": "^19.17.1",
"@commercetools-uikit/text-input": "^19.17.1",
"@commercetools-uikit/constraints": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/data-table": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/flat-button": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/grid": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/hooks": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/icons": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/link": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/loading-spinner": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/localized-text-field": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/localized-text-input": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/notifications": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/pagination": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/select-field": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/spacings": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/text": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/text-field": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/text-input": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools/sync-actions": "^5.14.0",
"@emotion/react": "^11.11.4",
"@formatjs/cli": "6.2.12",
"@jest/types": "29.6.3",
"@manypkg/cli": "0.21.4",
"@testing-library/dom": "^9.3.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "12.1.5",
"@testing-library/react-hooks": "8.0.1",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "16.1.0",
"@types/jest": "^29.5.4",
"@types/react": "^17.0.83",
"@types/react-dom": "^17.0.19",
"@types/react": "^19.0.3",
"@types/react-dom": "^19.0.2",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@types/testing-library__jest-dom": "^5.14.9",
Expand All @@ -85,9 +84,9 @@
"msw": "0.49.3",
"omit-empty-es": "1.2.0",
"prettier": "2.8.8",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-intl": "^6.4.7",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-intl": "^7.1.0",
"react-redux": "7.2.9",
"react-router-dom": "5.3.4",
"redux": "4.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type TChannelDetailsFormProps = {
initialValues: TFormValues;
isReadOnly: boolean;
dataLocale: string;
children: (formProps: FormProps) => JSX.Element;
children: (formProps: FormProps) => React.JSX.Element;
};

const getRoleOptions = Object.keys(CHANNEL_ROLES).map((key) => ({
Expand Down
6 changes: 4 additions & 2 deletions application-templates/starter-typescript/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/// <reference types="@commercetools-frontend/application-config/client" />

import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import EntryPoint from './components/entry-point';

ReactDOM.render(<EntryPoint />, document.getElementById('app'));
const container = document.getElementById('app');
const root = createRoot(container as Element);
root.render(<EntryPoint />);
51 changes: 25 additions & 26 deletions application-templates/starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,34 @@
"@commercetools-test-data/channel": "8.5.0",
"@commercetools-test-data/commons": "8.5.0",
"@commercetools-test-data/core": "8.5.0",
"@commercetools-uikit/constraints": "^19.17.1",
"@commercetools-uikit/data-table": "^19.17.1",
"@commercetools-uikit/flat-button": "^19.17.1",
"@commercetools-uikit/grid": "^19.17.1",
"@commercetools-uikit/hooks": "^19.17.1",
"@commercetools-uikit/icons": "^19.17.1",
"@commercetools-uikit/link": "^19.17.1",
"@commercetools-uikit/loading-spinner": "^19.17.1",
"@commercetools-uikit/localized-text-field": "^19.17.1",
"@commercetools-uikit/localized-text-input": "^19.17.1",
"@commercetools-uikit/notifications": "^19.17.1",
"@commercetools-uikit/pagination": "^19.17.1",
"@commercetools-uikit/select-field": "^19.17.1",
"@commercetools-uikit/spacings": "^19.17.1",
"@commercetools-uikit/text": "^19.17.1",
"@commercetools-uikit/text-field": "^19.17.1",
"@commercetools-uikit/text-input": "^19.17.1",
"@commercetools-uikit/constraints": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/data-table": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/flat-button": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/grid": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/hooks": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/icons": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/link": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/loading-spinner": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/localized-text-field": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/localized-text-input": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/notifications": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/pagination": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/select-field": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/spacings": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/text": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/text-field": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/text-input": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools/sync-actions": "^5.14.0",
"@emotion/react": "^11.11.4",
"@formatjs/cli": "6.2.12",
"@jest/types": "29.6.3",
"@manypkg/cli": "0.21.4",
"@testing-library/dom": "^9.3.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "12.1.5",
"@testing-library/react-hooks": "8.0.1",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "16.1.0",
"@types/jest": "^29.5.4",
"@types/react": "^17.0.83",
"@types/react-dom": "^17.0.19",
"@types/react": "^19.0.3",
"@types/react-dom": "^19.0.2",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@types/testing-library__jest-dom": "^5.14.9",
Expand All @@ -84,9 +83,9 @@
"omit-empty-es": "1.2.0",
"prettier": "2.8.8",
"prop-types": "15.8.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-intl": "^6.4.7",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-intl": "^7.1.0",
"react-redux": "7.2.9",
"react-router-dom": "5.3.4",
"redux": "4.2.1"
Expand Down
6 changes: 4 additions & 2 deletions application-templates/starter/src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import EntryPoint from './components/entry-point';

ReactDOM.render(<EntryPoint />, document.getElementById('app'));
const container = document.getElementById('app');
const root = createRoot(container);
root.render(<EntryPoint />);
51 changes: 25 additions & 26 deletions custom-views-templates/starter-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,35 +40,34 @@
"@commercetools-test-data/channel": "8.5.0",
"@commercetools-test-data/commons": "8.5.0",
"@commercetools-test-data/core": "8.5.0",
"@commercetools-uikit/constraints": "^19.17.1",
"@commercetools-uikit/data-table": "^19.17.1",
"@commercetools-uikit/flat-button": "^19.17.1",
"@commercetools-uikit/grid": "^19.17.1",
"@commercetools-uikit/hooks": "^19.17.1",
"@commercetools-uikit/icons": "^19.17.1",
"@commercetools-uikit/link": "^19.17.1",
"@commercetools-uikit/loading-spinner": "^19.17.1",
"@commercetools-uikit/localized-text-field": "^19.17.1",
"@commercetools-uikit/localized-text-input": "^19.17.1",
"@commercetools-uikit/notifications": "^19.17.1",
"@commercetools-uikit/pagination": "^19.17.1",
"@commercetools-uikit/select-field": "^19.17.1",
"@commercetools-uikit/spacings": "^19.17.1",
"@commercetools-uikit/text": "^19.17.1",
"@commercetools-uikit/text-field": "^19.17.1",
"@commercetools-uikit/text-input": "^19.17.1",
"@commercetools-uikit/constraints": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/data-table": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/flat-button": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/grid": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/hooks": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/icons": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/link": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/loading-spinner": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/localized-text-field": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/localized-text-input": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/notifications": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/pagination": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/select-field": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/spacings": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/text": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/text-field": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/text-input": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools/sync-actions": "^5.14.0",
"@emotion/react": "^11.11.4",
"@formatjs/cli": "6.2.12",
"@jest/types": "29.6.3",
"@manypkg/cli": "0.21.4",
"@testing-library/dom": "^9.3.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "12.1.5",
"@testing-library/react-hooks": "8.0.1",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "16.1.0",
"@types/jest": "^29.5.4",
"@types/react": "^17.0.83",
"@types/react-dom": "^17.0.19",
"@types/react": "^19.0.3",
"@types/react-dom": "^19.0.2",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@types/testing-library__jest-dom": "^5.14.9",
Expand All @@ -85,9 +84,9 @@
"msw": "0.49.3",
"omit-empty-es": "1.2.0",
"prettier": "2.8.8",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-intl": "^6.4.7",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-intl": "^7.1.0",
"react-redux": "7.2.9",
"react-router-dom": "5.3.4",
"redux": "4.2.1",
Expand Down
6 changes: 4 additions & 2 deletions custom-views-templates/starter-typescript/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/// <reference types="@commercetools-frontend/application-config/client" />

import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import EntryPoint from './components/entry-point';

ReactDOM.render(<EntryPoint />, document.getElementById('app'));
const container = document.getElementById('app');
const root = createRoot(container as Element);
root.render(<EntryPoint />);
51 changes: 25 additions & 26 deletions custom-views-templates/starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,34 @@
"@commercetools-test-data/channel": "8.5.0",
"@commercetools-test-data/commons": "8.5.0",
"@commercetools-test-data/core": "8.5.0",
"@commercetools-uikit/constraints": "^19.17.1",
"@commercetools-uikit/data-table": "^19.17.1",
"@commercetools-uikit/flat-button": "^19.17.1",
"@commercetools-uikit/grid": "^19.17.1",
"@commercetools-uikit/hooks": "^19.17.1",
"@commercetools-uikit/icons": "^19.17.1",
"@commercetools-uikit/link": "^19.17.1",
"@commercetools-uikit/loading-spinner": "^19.17.1",
"@commercetools-uikit/localized-text-field": "^19.17.1",
"@commercetools-uikit/localized-text-input": "^19.17.1",
"@commercetools-uikit/notifications": "^19.17.1",
"@commercetools-uikit/pagination": "^19.17.1",
"@commercetools-uikit/select-field": "^19.17.1",
"@commercetools-uikit/spacings": "^19.17.1",
"@commercetools-uikit/text": "^19.17.1",
"@commercetools-uikit/text-field": "^19.17.1",
"@commercetools-uikit/text-input": "^19.17.1",
"@commercetools-uikit/constraints": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/data-table": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/flat-button": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/grid": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/hooks": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/icons": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/link": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/loading-spinner": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/localized-text-field": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/localized-text-input": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/notifications": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/pagination": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/select-field": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/spacings": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/text": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/text-field": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools-uikit/text-input": "^0.0.0-preview-fec-155-react-19-20250108172010",
"@commercetools/sync-actions": "^5.14.0",
"@emotion/react": "^11.11.4",
"@formatjs/cli": "6.2.12",
"@jest/types": "29.6.3",
"@manypkg/cli": "0.21.4",
"@testing-library/dom": "^9.3.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "12.1.5",
"@testing-library/react-hooks": "8.0.1",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "16.1.0",
"@types/jest": "^29.5.4",
"@types/react": "^17.0.83",
"@types/react-dom": "^17.0.19",
"@types/react": "^19.0.3",
"@types/react-dom": "^19.0.2",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@types/testing-library__jest-dom": "^5.14.9",
Expand All @@ -84,9 +83,9 @@
"omit-empty-es": "1.2.0",
"prettier": "2.8.8",
"prop-types": "15.8.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-intl": "^6.4.7",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-intl": "^7.1.0",
"react-redux": "7.2.9",
"react-router-dom": "5.3.4",
"redux": "4.2.1"
Expand Down
6 changes: 4 additions & 2 deletions custom-views-templates/starter/src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import EntryPoint from './components/entry-point';

ReactDOM.render(<EntryPoint />, document.getElementById('app'));
const container = document.getElementById('app');
const root = createRoot(container);
root.render(<EntryPoint />);
Loading
Loading