[react-datepicker] Fix tests assuming instances in ref callbacks are non-nullable#58955
Conversation
|
@eps1lon Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause you edited one package and there were no type definition changes, I can help you merge this PR once someone else signs off on it. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 58955,
"author": "eps1lon",
"headCommitOid": "777c0f97684068f0500d7783901ec14adc5f852a",
"mergeBaseOid": "322b09e7e97422bbeb564159b9ffaafdd1c1827f",
"lastPushDate": "2022-02-24T18:17:48.000Z",
"lastActivityDate": "2022-03-16T07:11:41.000Z",
"mergeOfferDate": "2022-03-15T20:43:30.000Z",
"mergeRequestDate": "2022-03-16T07:11:41.000Z",
"mergeRequestUser": "eps1lon",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": "react-datepicker",
"kind": "edit",
"files": [
{
"path": "types/react-datepicker/react-datepicker-tests.tsx",
"kind": "test"
}
],
"owners": [
"radziksh",
"smrq",
"royxue",
"KoalaHuman",
"justingrant",
"jakeboone02",
"Ky6uk",
"aviklai",
"seckie",
"kerry-g",
"ShiftrTechSAS",
"1pete"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "peterblazejewicz",
"date": "2022-03-15T20:42:47.000Z",
"isMaintainer": true
}
],
"mainBotCommentID": 1050149597,
"ciResult": "pass"
} |
|
🔔 @radziksh @smrq @royxue @KoalaHuman @justingrant @jakeboone02 @Ky6uk @aviklai @seckie @Kerry-G @ShiftrTechSAS @1pete — please review this PR in the next few days. Be sure to explicitly select |
|
Re-ping @radziksh, @smrq, @royxue, @KoalaHuman, @justingrant, @jakeboone02, @Ky6uk, @aviklai, @seckie, @Kerry-G, @ShiftrTechSAS, @1pete: This PR has been out for over a week, yet I haven't seen any reviews. Could someone please give it some attention? Thanks! |
|
It has been more than two weeks and this PR still has no reviews. I'll bump it to the DT maintainer queue. Thank you for your patience, @eps1lon. (Ping @radziksh, @smrq, @royxue, @KoalaHuman, @justingrant, @jakeboone02, @Ky6uk, @aviklai, @seckie, @Kerry-G, @ShiftrTechSAS, @1pete.) |
|
@eps1lon: Everything looks good here. I am ready to merge this PR (at 777c0f9) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@radziksh, @smrq, @royxue, @KoalaHuman, @justingrant, @jakeboone02, @Ky6uk, @aviklai, @seckie, @Kerry-G, @ShiftrTechSAS, @1pete: you can do this too.) |
|
Ready to merge |
Currently instances in ref callbacks are allowed to be nullable due to our bivariance hack. However, during runtime these instances can be null: https://codesandbox.io/s/refs-are-nullable-m44vxx
We'll likely remove the bivariance hack to catch these issues in the future. In the meantime, existing packages and tests should guard against nullable instances regardless.
The issue was first reported in #58464