Skip to content

[@types/react] fix: remove onPointerEnterCapture & onPointerLeaveCapture#68984

Merged
eps1lon merged 1 commit intoDefinitelyTyped:masterfrom
matej-marcisovsky:fix-pointer-events
Mar 14, 2024
Merged

[@types/react] fix: remove onPointerEnterCapture & onPointerLeaveCapture#68984
eps1lon merged 1 commit intoDefinitelyTyped:masterfrom
matej-marcisovsky:fix-pointer-events

Conversation

@matej-marcisovsky
Copy link
Copy Markdown
Contributor

  • Use a meaningful title for the pull request. Include the name of the package modified.

  • Test the change in your own code. (Compile and run.)

  • Add or edit tests to reflect the change.

  • Follow the advice from the readme.

  • Avoid common mistakes.

  • Run pnpm test <package to test>.

  • Provide a URL to documentation or source code which provides context for the suggested changes: codesandbox.io example

  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the package.json.

The onPointerEnter and onPointerLeave events do not have capture versions similarly to the onMouseEnter and onMouseLeave events. React will ignore them and log a warning to the console. You can verify this by opening the provided example. I tested this for React 18, 17, and 16.

Tests were not updated because I do not think that this is testable.

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Mar 14, 2024

@matej-marcisovsky Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Only a DT maintainer can approve changes without tests

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 68984,
  "author": "matej-marcisovsky",
  "headCommitOid": "bac8b217858022c941474c9e7fe6f5f66b4668cd",
  "mergeBaseOid": "6c31c706695910736af0ee24a5724f3837bfcd9a",
  "lastPushDate": "2024-03-14T11:24:14.000Z",
  "lastActivityDate": "2024-03-14T11:34:14.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "react",
      "kind": "edit",
      "files": [
        {
          "path": "types/react/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react/ts5.0/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react/v16/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react/v17/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "johnnyreilly",
        "bbenezech",
        "pzavolinsky",
        "ericanderson",
        "DovydasNavickas",
        "theruther4d",
        "guilhermehubner",
        "ferdaber",
        "jrakotoharisoa",
        "pascaloliv",
        "hotell",
        "franklixuefei",
        "Jessidhia",
        "saranshkataria",
        "lukyth",
        "eps1lon",
        "zieka",
        "dancerphil",
        "dimitropoulos",
        "disjukr",
        "vhfmag",
        "hellatan",
        "priyanshurav",
        "Semigradsky",
        "mattpocock"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "eps1lon",
      "date": "2024-03-14T11:34:14.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 1997227583,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Critical package Untested Change This PR does not touch tests labels Mar 14, 2024
@typescript-bot
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Collaborator

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Nice catch, thank you!

@Thulof
Copy link
Copy Markdown
Contributor

Thulof commented Mar 15, 2024

This PR has led to type-checking failures in numerous projects. To resolve this issue, we have to update the version specified in package.json from 18.x to 18.2.65.

@eps1lon
Copy link
Copy Markdown
Collaborator

eps1lon commented Mar 15, 2024

@Thulof You probably have duplicate versions of @types/react installed. Hopefully https://solverfox.dev/writing/duplicate-types-react helps you have the latest version installed.

Otherwise please file an issue illustrating the breakage. Maybe other packages were also wrongly relying on onPointerCapture

@Thulof
Copy link
Copy Markdown
Contributor

Thulof commented Mar 15, 2024

@Thulof You probably have duplicate versions of @types/react installed. Hopefully https://solverfox.dev/writing/duplicate-types-react helps you have the latest version installed.@Thulof

Otherwise please file an issue illustrating the breakage. Maybe other packages were also wrongly relying on onPointerCapture

@eps1lon Thank you very much, I have successfully resolved the issue within my project.

However, I must point out that this PR has affected numerous other projects, as can be seen from the mentions within this PR's discussion. Perhaps it would have been more appropriate to classify it as a minor version release rather than a patch, given its wide-ranging impact.

image

@Thulof
Copy link
Copy Markdown
Contributor

Thulof commented Mar 15, 2024

@eps1lon Apologies, I mistakenly created this issue instead of a discussion. Please head over to the discussion section to continue our conversation. #69006

Thulof added a commit to Thulof/DefinitelyTyped that referenced this pull request Mar 15, 2024
eps1lon added a commit to eps1lon/DefinitelyTyped that referenced this pull request Mar 18, 2024
…eaveCapture (DefinitelyTyped#68984)"

This reverts commit 73b5985 for older versions.
It breaks too much of the ecosystem to be worth it.
Backports should be reserved for critical bug fixes e.g. a behavior change of TypeScript.
Thulof added a commit to Thulof/DefinitelyTyped that referenced this pull request Mar 18, 2024
eps1lon added a commit that referenced this pull request Mar 18, 2024
…eaveCapture (#68984) (#69005)

Co-authored-by: eps1lon <silbermann.sebastian@gmail.com>
liuwin7 added a commit to liuwin7/stencil that referenced this pull request Mar 19, 2024
Remove `onPointerEnterCapture` and `onPointerLeaveCapture` because of the definition change in 
 `@types/react` DefinitelyTyped/DefinitelyTyped#68984
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Owner Approved A listed owner of this package signed off on the pull request. Untested Change This PR does not touch tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants