Skip to content

Commit f87d6aa

Browse files
authored
chore(rich-text-alpha): bump forma36 to v6; modify emotion import [TOL-3884] (#2110)
This upgrade bumps packages to use dependency/devDependency and/or peerDependency of @contentful/f36-components@6.7.1, @contentful/f36-icons@6.7.1 and @contentful/f36-tokens@6.1.2 Adds explicit react (>=18.3.1) as peer dependencies to make the React version requirement visible to consumers, rather than leaving it as an implicit transitive dependency through F36 v6. Deprecated emotion@10 in order to use emotion/css@^11.13.5 and follow the Forma36 pattern. * chore: bump forma36 to v6; modify emotion import * chore: bump react version as peerDependency BREAKING CHANGE: Migrate from emotion@10. to emotion/css@^11.13.4. Consumers also must be on Forma 36 v6 and React 18.3.1+
1 parent 634ffd8 commit f87d6aa

File tree

10 files changed

+16
-15
lines changed

10 files changed

+16
-15
lines changed

packages/rich-text-alpha/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@
3737
},
3838
"dependencies": {
3939
"@contentful/app-sdk": "^4.42.0",
40-
"@contentful/f36-components": "^5.4.1",
41-
"@contentful/f36-icons": "^5.4.1",
42-
"@contentful/f36-tokens": "^5.1.0",
43-
"@contentful/f36-utils": "^5.1.0",
40+
"@contentful/f36-components": "^6.7.1",
41+
"@contentful/f36-icons": "^6.7.1",
42+
"@contentful/f36-tokens": "^6.1.2",
43+
"@contentful/f36-utils": "^6.1.0",
44+
"@emotion/css": "^11.13.5",
4445
"@contentful/field-editor-reference": "^7.0.1",
4546
"@contentful/field-editor-shared": "^3.0.1",
4647
"@contentful/field-editor-validation-errors": "^3.0.1",
@@ -63,8 +64,8 @@
6364
"peerDependencies": {
6465
"@lingui/core": "^5.3.0",
6566
"@tanstack/react-query": "^4.3.9",
66-
"react": ">=17",
67-
"react-dom": ">=17",
67+
"react": ">=18.3.1",
68+
"react-dom": ">=18.3.1",
6869
"react-reconciler": ">=0.26.1 <=0.33.0"
6970
},
7071
"devDependencies": {

packages/rich-text-alpha/src/components/Doc.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import type { FieldAppSDK } from '@contentful/app-sdk';
44
import tokens from '@contentful/f36-tokens';
55
import { EntityProvider } from '@contentful/field-editor-reference';
66
import type { Document } from '@contentful/rich-text-types';
7+
import { css, cx } from '@emotion/css';
78
import { ProseMirror, ProseMirrorDoc } from '@handlewithcare/react-prosemirror';
8-
import { css, cx } from 'emotion';
99

1010
import { createEditor } from '../plugins';
1111

packages/rich-text-alpha/src/plugins/blockquote.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import tokens from '@contentful/f36-tokens';
2-
import { css } from 'emotion';
2+
import { css } from '@emotion/css';
33
import { wrapIn, lift } from 'prosemirror-commands';
44
import type { NodeSpec } from 'prosemirror-model';
55
import type { Command } from 'prosemirror-state';

packages/rich-text-alpha/src/plugins/embeds/components/FetchingWrappedInlineEntryCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
useContentType,
1515
} from '@contentful/field-editor-shared/react-query';
1616
import { INLINES } from '@contentful/rich-text-types';
17-
import { css } from 'emotion';
17+
import { css } from '@emotion/css';
1818

1919
const { getEntryTitle, getEntityStatus } = entityHelpers;
2020

packages/rich-text-alpha/src/plugins/embeds/inline.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import * as React from 'react';
22

33
import tokens from '@contentful/f36-tokens';
44
import { INLINES } from '@contentful/rich-text-types';
5+
import { css } from '@emotion/css';
56
import { useIsNodeSelected, type NodeViewComponentProps } from '@handlewithcare/react-prosemirror';
6-
import { css } from 'emotion';
77
import type { NodeSpec } from 'prosemirror-model';
88
import type { Command } from 'prosemirror-state';
99
import { assert, object, union, string, literal } from 'superstruct';

packages/rich-text-alpha/src/plugins/heading.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import tokens from '@contentful/f36-tokens';
2-
import { css } from 'emotion';
2+
import { css } from '@emotion/css';
33
import { setBlockType } from 'prosemirror-commands';
44
import type { NodeSpec } from 'prosemirror-model';
55
import type { Command } from 'prosemirror-state';

packages/rich-text-alpha/src/plugins/hr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import tokens from '@contentful/f36-tokens';
2-
import { css } from 'emotion';
2+
import { css } from '@emotion/css';
33
import type { NodeSpec } from 'prosemirror-model';
44
import type { EditorState } from 'prosemirror-state';
55
import { Decoration, DecorationSet } from 'prosemirror-view';

packages/rich-text-alpha/src/plugins/link/dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import tokens from '@contentful/f36-tokens';
1515
import { EntityProvider, Entity } from '@contentful/field-editor-reference';
1616
import { FieldAppSDK, ModalDialogLauncher } from '@contentful/field-editor-shared';
1717
import { INLINES, ResourceLink, Link } from '@contentful/rich-text-types';
18-
import { css } from 'emotion';
18+
import { css } from '@emotion/css';
1919
import type { Except, SetRequired } from 'type-fest';
2020

2121
import { FetchingWrappedAssetCard } from '../../components/FetchingWrappedAssetCard';

packages/rich-text-alpha/src/plugins/link/link.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import tokens from '@contentful/f36-tokens';
2-
import { css } from 'emotion';
2+
import { css } from '@emotion/css';
33
import type { MarkSpec } from 'prosemirror-model';
44
import type { Command } from 'prosemirror-state';
55
import { assert, enums, object, union, string, literal } from 'superstruct';

packages/rich-text-alpha/src/plugins/paragraph.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import tokens from '@contentful/f36-tokens';
2-
import { css } from 'emotion';
2+
import { css } from '@emotion/css';
33
import { setBlockType } from 'prosemirror-commands';
44
import type { NodeSpec } from 'prosemirror-model';
55
import type { Command } from 'prosemirror-state';

0 commit comments

Comments
 (0)