-
Notifications
You must be signed in to change notification settings - Fork 80
Update dependencies #575
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 dependencies #575
Changes from 1 commit
0388318
1ea311b
47bcd51
bc7e890
24a316c
e5bb71d
76c4c58
1ddf0db
7535c06
a26c302
361e4fa
f529d2d
d60f41d
621cd47
5cea356
9bdc025
3c453c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,18 +25,4 @@ describe("LocalizationProvider - validation", () => { | |
); | ||
expect(renderer.toJSON()).toMatchInlineSnapshot(`<div />`); | ||
}); | ||
|
||
test("without a child", () => { | ||
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. Suggestion (blocking): I'm nervous about this change, since we can't do this with TypeScript type checks, but our users might. For instance in Firefox DevTools this is used without type checks. 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. This PR drops two tests. They expected these to throw: <LocalizationProvider l10n={new ReactLocalization([])} /> <LocalizationProvider /> I don't think there's any actual benefit from throwing for these, and doing so is in fact surprising. A The second checks that the @gregtatum Would you like me to add a more specific test to the 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 think there is some value in exercising these code paths as users of this package could do surprising things with it. Without the throws, I'm less opinionated if the tests stay or if they go. |
||
expect(() => { | ||
TestRenderer.create( | ||
<LocalizationProvider l10n={new ReactLocalization([])} /> | ||
); | ||
}).toThrow(/required/); | ||
}); | ||
|
||
test("without the l10n prop", () => { | ||
expect(() => { | ||
TestRenderer.create(<LocalizationProvider />); | ||
}).toThrow(/marked as required/); | ||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Question: Is this a behavior change for our users? Not everyone uses TypeScript, and this could provide valuable runtime checks if users are relying on the added safety here.
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.
The
prop-types
methods are effectively no-ops in production, so I don't think that this should be considered a change in behaviour. It's removed here because issues like facebook/prop-types#354 make it difficult to supportreact@17
while keeping it as a dependency.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.
I would somewhat disagree with the change in behavior, as it's still used in development mode. However, I won't block on this change if you feel the dependency management is too complex.