Skip to content

[react-draft-wysiwyg] Fix tests assuming instances in ref callbacks are non-nullable#58958

Merged
typescript-bot merged 1 commit intoDefinitelyTyped:masterfrom
eps1lon:fix/ref-bivariance/react-draft-wysiwyg
Mar 16, 2022
Merged

[react-draft-wysiwyg] Fix tests assuming instances in ref callbacks are non-nullable#58958
typescript-bot merged 1 commit intoDefinitelyTyped:masterfrom
eps1lon:fix/ref-bivariance/react-draft-wysiwyg

Conversation

@eps1lon
Copy link
Copy Markdown
Collaborator

@eps1lon eps1lon commented Feb 24, 2022

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

@DangerBotOSS
Copy link
Copy Markdown

Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files.
The check for missing properties isn't always right, so take this list as advice, not a requirement.

yeoman-environment (unpkg)

was missing the following properties:

  1. UNKNOWN_NAMESPACE
  2. UNKNOWN_RESOLVED
  3. queues
  4. lookups
  5. repository

Generated by 🚫 dangerJS against 19e4a1a

@eps1lon eps1lon marked this pull request as ready for review February 24, 2022 18:37
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Feb 24, 2022

@eps1lon Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because 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

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by type definition owners or DT maintainers

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": 58958,
  "author": "eps1lon",
  "headCommitOid": "19e4a1a4f717bc2db2c93034f6c9e1d303c3318f",
  "mergeBaseOid": "322b09e7e97422bbeb564159b9ffaafdd1c1827f",
  "lastPushDate": "2022-02-24T18:17:50.000Z",
  "lastActivityDate": "2022-03-16T07:13:33.000Z",
  "mergeOfferDate": "2022-03-15T20:27:29.000Z",
  "mergeRequestDate": "2022-03-16T07:13:33.000Z",
  "mergeRequestUser": "eps1lon",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "react-draft-wysiwyg",
      "kind": "edit",
      "files": [
        {
          "path": "types/react-draft-wysiwyg/test/basic-tests.tsx",
          "kind": "test"
        }
      ],
      "owners": [
        "imechZhangLY",
        "brunoMaurice",
        "ldanet",
        "MunifTanjim",
        "n-zeplo"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "peterblazejewicz",
      "date": "2022-03-15T20:26:49.000Z",
      "isMaintainer": true
    }
  ],
  "mainBotCommentID": 1050147616,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added the Popular package This PR affects a popular package (as counted by NPM download counts). label Feb 24, 2022
@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @imechZhangLY @brunoMaurice @ldanet @MunifTanjim @n-zeplo — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot
Copy link
Copy Markdown
Contributor

Re-ping @imechZhangLY, @brunoMaurice, @ldanet, @MunifTanjim, @n-zeplo:

This PR has been out for over a week, yet I haven't seen any reviews.

Could someone please give it some attention? Thanks!

@typescript-bot typescript-bot added the Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. label Mar 7, 2022
@typescript-bot
Copy link
Copy Markdown
Contributor

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 @imechZhangLY, @brunoMaurice, @ldanet, @MunifTanjim, @n-zeplo.)

Copy link
Copy Markdown
Member

@peterblazejewicz peterblazejewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optionally, consider my comment on regular user syntax, thx!

@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner and removed Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. labels Mar 15, 2022
@eps1lon
Copy link
Copy Markdown
Collaborator Author

eps1lon commented Mar 16, 2022

Ready to merge

@typescript-bot typescript-bot merged commit 5a9ca53 into DefinitelyTyped:master Mar 16, 2022
@eps1lon
Copy link
Copy Markdown
Collaborator Author

eps1lon commented Mar 16, 2022

@peterblazejewicz Oh and just to elaborate since this is the second review I'm not incorporating: in any other repo I wouldn't have a problem doing these since a particular style doesn't concern me much. But PRs here take weeks to get a review. I was afraid that a push would prolong this another 3 weeks and this would interrupt other scheduled work.

@eps1lon eps1lon deleted the fix/ref-bivariance/react-draft-wysiwyg branch March 16, 2022 07:15
@peterblazejewicz
Copy link
Copy Markdown
Member

But PRs here take weeks to get a review. I was afraid that a push would prolong this another 3 weeks

please feel free to reference me directly for that kind of changes you're doing, thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintainer Approved Popular package This PR affects a popular package (as counted by NPM download counts). Self Merge This PR can now be self-merged by the PR author or an owner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants