-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update react types #5237
Update react types #5237
Changes from 12 commits
a7fed41
f195c37
1c201da
e035406
1ef9647
3a03d1e
52d6ab5
4872f12
e6bd0c6
e807b54
bbe25ac
07c9cf8
3c3957f
f6d2cbe
4156b72
7a5e6b8
204c7dc
3787860
9c020a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import {Key} from 'react' | ||
import {Key} from '@react-types/shared'; | ||
|
||
interface Journal{ | ||
rate: Key, | ||
description: string, | ||
rate: Key, | ||
description: string, | ||
id: number | ||
} | ||
|
||
export default Journal | ||
export default Journal |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ import React from "react"; | |
|
||
interface SectionProps { | ||
title: string; | ||
children: JSX.Element | JSX.Element[]; | ||
children: React.JSX.Element | React.JSX.Element[]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. React got rid of the global namespace, but JSX is still in the React namespace, so reference through that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. deprecated but not removed. Doesn't really explain why it broke. Any idea? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It broke between RAC alpha 4 and alpha 5 https://unpkg.com/browse/react-aria-components@1.0.0-alpha.5/dist/ in alpha 4, we exported using the global namespace which included JSX. in alpha 5, we stopped doing that and started exporting the React namespaced version. I suspect some parcel or update to types in our own repo which caused us to stop using the global namespace, but I haven't nailed it down yet. Upgrading the types caused it to be marked as deprecated in our own code base, but the problem was already present. I'm following up with the issue author because I suspect they have multiple copies of react types. I suspect users just need to upgrade their types and dedupe. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it "broke" in 1123b0f I haven't actually "fixed" it in this PR, I think people have to update themselves which is what I followed up with the issue author to do. In addition to explicit references to the global JSX (RAC DialogTrigger), we also have many implicit references to it. Any inferred component's return value for instance. So if we wanted to "fix" this by using the global JSX namespace again, we'd need to handle both of these. |
||
} | ||
|
||
export default function Section(props: SectionProps) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ | |
"copyrights": "babel-node --presets @babel/env ./scripts/addHeaders.js", | ||
"build:icons": "babel-node --presets @babel/env ./scripts/buildIcons.js", | ||
"clean:icons": "babel-node --presets @babel/env ./scripts/cleanIcons.js", | ||
"postinstall": "yarn build:icons && patch-package", | ||
"postinstall": "patch-package && yarn build:icons", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. run first so that we can fix lodash types before icons build since they'll fail if the types are bad |
||
"plop": "plop --plopfile scripts/plopfile.js", | ||
"chromatic": "NODE_ENV=production CHROMATIC=1 chromatic --project-token $CHROMATIC_PROJECT_TOKEN --build-script-name 'build:chromatic'", | ||
"chromatic:forced-colors": "NODE_ENV=production CHROMATIC=1 chromatic --project-token $CHROMATIC_FC_PROJECT_TOKEN --build-script-name 'build:chromatic-fc'", | ||
|
@@ -98,10 +98,10 @@ | |
"@testing-library/jest-dom": "^5.16.5", | ||
"@testing-library/react": "^14.0.0", | ||
"@testing-library/user-event": "^14.4.3", | ||
"@types/react": "^18.2.7", | ||
"@types/react": "^18.2.28", | ||
"@types/storybook__react": "^5.2.1", | ||
"@typescript-eslint/eslint-plugin": "^5.40.0", | ||
"@typescript-eslint/parser": "^5.40.0", | ||
"@typescript-eslint/eslint-plugin": "^6.7.5", | ||
"@typescript-eslint/parser": "^6.7.5", | ||
"autoprefixer": "^9.6.0", | ||
"axe-core": "^4.6.3", | ||
"axe-playwright": "^1.1.11", | ||
|
@@ -169,7 +169,7 @@ | |
"tailwindcss": "^3.2.2", | ||
"tailwindcss-animate": "^1.0.7", | ||
"tempy": "^0.5.0", | ||
"typescript": "5.0.4", | ||
"typescript": "5.2.2", | ||
"typescript-strict-plugin": "^2.0.0", | ||
"verdaccio": "^5.13.0", | ||
"walk-object": "^4.0.0", | ||
|
@@ -178,6 +178,7 @@ | |
}, | ||
"resolutions": { | ||
"@babel/core": "7.12.10", | ||
"@types/react": "18.2.28", | ||
"postcss": "8.4.24", | ||
"postcss-custom-properties": "13.2.0", | ||
"postcss-import": "15.1.0", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested via verdaccio build
see https://github.com/adobe/react-spectrum/pull/5237/commits commit See if we fixed the key issue in the CRA app circle ci build