-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
[core] React 19 compatibility #605
Changes from all commits
e4b2791
f73b90c
61442e7
a50c971
532b7c7
18cd409
fba6e6a
8e9cb19
a3468ad
22302ba
a48cf6c
3f47481
6e13642
08c4972
a71517d
c1c2f41
10978a0
ddb980c
7690aad
76e7adb
3e174c8
9b037d0
0544b4e
75f56af
26c88a1
e1403e9
2c00014
82dc038
669c720
53fc104
0ecf2d3
d0176ba
a4b8623
9cf306e
50020eb
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 |
---|---|---|
|
@@ -63,6 +63,7 @@ const nextConfig = { | |
: {}), | ||
experimental: { | ||
esmExternals: true, | ||
workerThreads: false, | ||
}, | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,4 +47,4 @@ export const ToggleButtonGroup = React.forwardRef(function ToggleButtonGroup< | |
); | ||
}) as <Option extends { value: string; label: string }>( | ||
props: ToggleButtonGroupProps<Option> & { ref?: React.Ref<HTMLDivElement> }, | ||
) => 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. 👍 to bring this to the main branch 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. I intend to have everything (except for package.json changes) merged to master. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ describe('<Field.Validity />', () => { | |
fireEvent.change(input, { target: { value: 'test' } }); | ||
fireEvent.blur(input); | ||
|
||
const [data] = handleValidity.args[8]; | ||
const [data] = handleValidity.lastCall.args; | ||
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. @atomiks, could you please verify that with these changes the intent of these checks is the same? 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. Yes, that's fine |
||
|
||
expect(data.value).to.equal('test'); | ||
expect(data.validity.valueMissing).to.equal(false); | ||
|
@@ -44,8 +44,8 @@ describe('<Field.Validity />', () => { | |
fireEvent.focus(input); | ||
fireEvent.blur(input); | ||
|
||
expect(handleValidity.args[6][0].error).to.equal('error'); | ||
expect(handleValidity.args[6][0].errors).to.deep.equal(['error']); | ||
expect(handleValidity.lastCall.args[0].error).to.equal('error'); | ||
expect(handleValidity.lastCall.args[0].errors).to.deep.equal(['error']); | ||
}); | ||
|
||
it('should correctly pass errors when validate function returns an array of strings', () => { | ||
|
@@ -63,7 +63,7 @@ describe('<Field.Validity />', () => { | |
fireEvent.focus(input); | ||
fireEvent.blur(input); | ||
|
||
expect(handleValidity.args[6][0].error).to.equal('1'); | ||
expect(handleValidity.args[6][0].errors).to.deep.equal(['1', '2']); | ||
expect(handleValidity.lastCall.args[0].error).to.equal('1'); | ||
expect(handleValidity.lastCall.args[0].errors).to.deep.equal(['1', '2']); | ||
}); | ||
}); |
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.
It's not clear to me why it started to fail now, but I guess it's a good thing it fails.