Skip to content

Commit 475e4a3

Browse files
authored
Revert support for React 19 (#6278)
* Revert "chore: remove temporary pin to react 18 in react@latest build tests (#6274)" This reverts commit d9ee32d. * Revert "fix(docs): remove typo from liveness detector core docs (#6256)" This reverts commit 9d71dd8. * Revert "chore(react): remove radix-ui upgrades (#6268)" This reverts commit c623990. * Revert "chore(changeset): update react 19 changeset from patch to minor bump (#6269)" This reverts commit 7045aed. * Revert "chore(storage-browser): bump up package size limit (#6267)" This reverts commit a79b8e9. * Revert "chore(react): add support for react 19 (#5826)" This reverts commit 954e9be. * chore: add changeset
1 parent d9ee32d commit 475e4a3

File tree

258 files changed

+596
-562
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+596
-562
lines changed

.changeset/five-doors-hide.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@aws-amplify/ui-react-core-notifications': patch
3+
'@aws-amplify/ui-react-notifications': patch
4+
'@aws-amplify/ui-react-liveness': patch
5+
'@aws-amplify/ui-react-storage': patch
6+
'@aws-amplify/ui-react-native': patch
7+
'@aws-amplify/ui-react-core': patch
8+
'@aws-amplify/ui-react-geo': patch
9+
'@aws-amplify/ui-react-ai': patch
10+
'@aws-amplify/ui-react': patch
11+
---
12+
13+
revert changes introduced for React 19 support

.github/workflows/reusable-build-system-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
framework: [react]
31-
framework-version: [latest]
31+
# temporarily pointing all react tests to v18
32+
# framework-version: [latest]
33+
framework-version: [18]
3234
build-tool: [next, vite]
3335
build-tool-version: [latest]
3436
pkg-manager: [npm]

build-system-tests/templates/components/react-native/cli/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function SignOutButton() {
2323
return <Button title="Sign Out" onPress={signOut} />;
2424
}
2525

26-
function App(): React.JSX.Element {
26+
function App(): JSX.Element {
2727
return (
2828
<>
2929
<Authenticator.Provider>

docs/.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": ["next", "next/core-web-vitals"],
2+
"extends": "next/core-web-vitals",
33
"rules": {
44
"react-hooks/exhaustive-deps": "error" // override next eslint default
55
}

docs/__tests__/__snapshots__/props-table.test.ts.snap

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2970,7 +2970,7 @@ exports[`Props Table 1`] = `
29702970
},
29712971
"children": {
29722972
"name": "children",
2973-
"type": "(item: Item, index: number) => React.JSX.Element",
2973+
"type": "(item: Item, index: number) => JSX.Element",
29742974
"description": "The component to be repeated\\nSame interface as Array.prototype.map",
29752975
"category": "CollectionChildren",
29762976
"isOptional": false
@@ -7712,10 +7712,10 @@ exports[`Props Table 1`] = `
77127712
"category": "BaseInputProps",
77137713
"isOptional": true
77147714
},
7715-
"enterKeyHint": {
7716-
"name": "enterKeyHint",
7717-
"type": "EnterKeyHint | undefined",
7718-
"description": "Defines what action label (or icon) to present for the enter key on virtual keyboards. See: [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint)",
7715+
"placeholder": {
7716+
"name": "placeholder",
7717+
"type": "string | undefined",
7718+
"description": "Placeholder text shown when field is empty Accessibility tip: avoid putting important instructions for filling out the TextField in the placeholder. Use descriptiveText for important instructions.",
77197719
"category": "BaseInputProps",
77207720
"isOptional": true
77217721
},
@@ -7747,13 +7747,6 @@ exports[`Props Table 1`] = `
77477747
"category": "BaseInputProps",
77487748
"isOptional": true
77497749
},
7750-
"name": {
7751-
"name": "name",
7752-
"type": "string | undefined",
7753-
"description": "Name of the field. Submitted with the form as part of a name/value pair.",
7754-
"category": "BaseInputProps",
7755-
"isOptional": true
7756-
},
77577750
"autoComplete": {
77587751
"name": "autoComplete",
77597752
"type": "string | undefined",
@@ -7775,6 +7768,13 @@ exports[`Props Table 1`] = `
77757768
"category": "BaseInputProps",
77767769
"isOptional": true
77777770
},
7771+
"enterKeyHint": {
7772+
"name": "enterKeyHint",
7773+
"type": "EnterKeyHint | undefined",
7774+
"description": "Defines what action label (or icon) to present for the enter key on virtual keyboards. See: [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint)",
7775+
"category": "BaseInputProps",
7776+
"isOptional": true
7777+
},
77787778
"isReadOnly": {
77797779
"name": "isReadOnly",
77807780
"type": "boolean | undefined",
@@ -7789,10 +7789,10 @@ exports[`Props Table 1`] = `
77897789
"category": "BaseInputProps",
77907790
"isOptional": true
77917791
},
7792-
"placeholder": {
7793-
"name": "placeholder",
7792+
"name": {
7793+
"name": "name",
77947794
"type": "string | undefined",
7795-
"description": "Placeholder text shown when field is empty Accessibility tip: avoid putting important instructions for filling out the TextField in the placeholder. Use descriptiveText for important instructions.",
7795+
"description": "Name of the field. Submitted with the form as part of a name/value pair.",
77967796
"category": "BaseInputProps",
77977797
"isOptional": true
77987798
},
@@ -8394,10 +8394,10 @@ exports[`Props Table 1`] = `
83948394
"category": "BaseInputProps",
83958395
"isOptional": true
83968396
},
8397-
"enterKeyHint": {
8398-
"name": "enterKeyHint",
8399-
"type": "EnterKeyHint | undefined",
8400-
"description": "Defines what action label (or icon) to present for the enter key on virtual keyboards. See: [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint)",
8397+
"placeholder": {
8398+
"name": "placeholder",
8399+
"type": "string | undefined",
8400+
"description": "Placeholder text shown when field is empty Accessibility tip: avoid putting important instructions for filling out the TextField in the placeholder. Use descriptiveText for important instructions.",
84018401
"category": "BaseInputProps",
84028402
"isOptional": true
84038403
},
@@ -8436,6 +8436,13 @@ exports[`Props Table 1`] = `
84368436
"category": "BaseInputProps",
84378437
"isOptional": true
84388438
},
8439+
"enterKeyHint": {
8440+
"name": "enterKeyHint",
8441+
"type": "EnterKeyHint | undefined",
8442+
"description": "Defines what action label (or icon) to present for the enter key on virtual keyboards. See: [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint)",
8443+
"category": "BaseInputProps",
8444+
"isOptional": true
8445+
},
84398446
"isReadOnly": {
84408447
"name": "isReadOnly",
84418448
"type": "boolean | undefined",
@@ -8449,13 +8456,6 @@ exports[`Props Table 1`] = `
84498456
"description": "Whether field should be marked required.",
84508457
"category": "BaseInputProps",
84518458
"isOptional": true
8452-
},
8453-
"placeholder": {
8454-
"name": "placeholder",
8455-
"type": "string | undefined",
8456-
"description": "Placeholder text shown when field is empty Accessibility tip: avoid putting important instructions for filling out the TextField in the placeholder. Use descriptiveText for important instructions.",
8457-
"category": "BaseInputProps",
8458-
"isOptional": true
84598459
}
84608460
}
84618461
},
@@ -8936,7 +8936,7 @@ exports[`Props Table 1`] = `
89368936
},
89378937
"emptyIcon": {
89388938
"name": "emptyIcon",
8939-
"type": "React.JSX.Element | undefined",
8939+
"type": "JSX.Element | undefined",
89408940
"description": "This will override which icon to use as the empty icon. This will only\\noverride the empty icon an will create a rating component that uses\\ndifferent icons for filled and empty icons.",
89418941
"category": "RatingOptions",
89428942
"isOptional": true
@@ -8950,7 +8950,7 @@ exports[`Props Table 1`] = `
89508950
},
89518951
"icon": {
89528952
"name": "icon",
8953-
"type": "React.JSX.Element | undefined",
8953+
"type": "JSX.Element | undefined",
89548954
"description": "This will override which icon to use. This will override both\\nthe filled and empty icon values unless an empty icon is specified\\nwith the emptyIcon prop\\nDefault is <IconStar />",
89558955
"category": "RatingOptions",
89568956
"isOptional": true

docs/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
"postbuild:sitemap": "node --require esbuild-register ./scripts/generate-sitemap-robotstxt.ts",
2121
"start": "next start",
2222
"test": "jest",
23-
"test:links": "node --require esbuild-register ./scripts/link-checker-puppeteer.ts",
24-
"typecheck": "tsc --noEmit"
23+
"test:links": "node --require esbuild-register ./scripts/link-checker-puppeteer.ts"
2524
},
2625
"dependencies": {
2726
"@aws-amplify/ui-react": "6.8.0",
@@ -39,9 +38,9 @@
3938
"next-plugin-preval": "^1.2.1",
4039
"prism-react-renderer": "1.2.1",
4140
"raw-loader": "^4.0.2",
42-
"react": "^18.3.0",
41+
"react": "18.2.0",
4342
"react-copy-to-clipboard": "^5.0.4",
44-
"react-dom": "^18.3.0",
43+
"react-dom": "18.2.0",
4544
"react-icons": "^4.3.1",
4645
"react-live": "^4.1.8",
4746
"rehype": "^11.0.0",

docs/src/components/CodeHighlight.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,17 @@ export const CodeHighlight = ({
4343
>
4444
<View as="code" className={classNames(className, prismClassName)}>
4545
{tokens.map((line, i) => (
46-
<View {...getLineProps({ line })} className="code-line" key={i}>
46+
<View
47+
className="code-line"
48+
key={i}
49+
{...getLineProps({ line, key: i })}
50+
>
4751
{line.map((token, key) => (
48-
<Text {...getTokenProps({ token })} as="span" key={key} />
52+
<Text
53+
as="span"
54+
key={key}
55+
{...getTokenProps({ token, key })}
56+
/>
4957
))}
5058
</View>
5159
))}

docs/src/components/ExpoSnack.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const ExpoSnack = (options: SnackOptions) => {
6565
// We need a unique ID b/c we need to listen to window events that the iframe
6666
// will send and it sends the iframe id
6767
const id = React.useRef(Math.random().toString(36).substring(2, 10));
68-
const ref = React.useRef<HTMLIFrameElement>(undefined);
68+
const ref = React.useRef<HTMLIFrameElement>();
6969
const [theme, setTheme] = React.useState('light');
7070

7171
React.useLayoutEffect(() => {

docs/src/components/Layout/GlobalNav/components/DesktopNav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface DesktopNavProps {
1212
navLinksContainerRef: MutableRefObject<HTMLDivElement>;
1313
navLinksRightRef: MutableRefObject<HTMLDivElement>;
1414
hasSecondaryNav: boolean;
15-
secondaryNavDesktop?: React.JSX.Element;
15+
secondaryNavDesktop?: JSX.Element;
1616
}
1717

1818
export function DesktopNav({

docs/src/components/Layout/GlobalNav/components/NavMenuLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function NavMenuLink({
1515
setShowGlobalNav?: Dispatch<SetStateAction<boolean>>;
1616
}) {
1717
const label: string = navMenuItem.label;
18-
const linkContent: React.JSX.Element =
18+
const linkContent: JSX.Element =
1919
navMenuItem.type === 'EXTERNAL' ? (
2020
<ExternalLink>{label}</ExternalLink>
2121
) : (

0 commit comments

Comments
 (0)