Skip to content

Fix wordpress__components & wordpress__compose type mismatch after change to React v18#63716

Merged
sandersn merged 6 commits intoDefinitelyTyped:masterfrom
danieliser:master
Dec 29, 2022
Merged

Fix wordpress__components & wordpress__compose type mismatch after change to React v18#63716
sandersn merged 6 commits intoDefinitelyTyped:masterfrom
danieliser:master

Conversation

@danieliser
Copy link
Copy Markdown
Contributor

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: Upgrade React packages to v18 WordPress/gutenberg#45235
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Dec 24, 2022

@danieliser Thank you for submitting this PR!

This is a live comment which I will keep updated.

2 packages in this PR

Code Reviews

Because this PR edits multiple packages, it can be merged once it's reviewed by a DT maintainer.

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

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 A DT maintainer needs to approve changes which affect more than one package

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": 63716,
  "author": "danieliser",
  "headCommitOid": "e22ca61a9561b2cdf1920913b1a7675e888b345f",
  "mergeBaseOid": "04d5ce209125122ab55ad7502c88a5ef05c1b9a8",
  "lastPushDate": "2022-12-24T07:55:09.000Z",
  "lastActivityDate": "2022-12-28T07:06:09.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": "wordpress__components",
      "kind": "edit",
      "files": [
        {
          "path": "types/wordpress__components/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__components/package.json",
          "kind": "package-meta-ok"
        }
      ],
      "owners": [
        "dsifford",
        "sirreal",
        "p-jackson",
        "sarayourfriend",
        "michaelhthomas",
        "manzoorwanijk",
        "bastolen"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    },
    {
      "name": "wordpress__compose",
      "kind": "edit",
      "files": [
        {
          "path": "types/wordpress__compose/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__compose/package.json",
          "kind": "package-meta-ok"
        }
      ],
      "owners": [
        "dsifford"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "sirreal",
      "date": "2022-12-28T07:06:09.000Z",
      "isMaintainer": false
    },
    {
      "type": "approved",
      "reviewer": "noahtallen",
      "date": "2022-12-27T20:05:54.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 1364444605,
  "ciResult": "pass"
}

@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @dsifford @sirreal @p-jackson @sarayourfriend @michaelhthomas @manzoorwanijk @bastolen — 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.

@danieliser
Copy link
Copy Markdown
Contributor Author

@typescript-bot Test changes were not necessary as the type mismatch came from a dependency version mismatch.

@DangerBotOSS
Copy link
Copy Markdown

DangerBotOSS commented Dec 24, 2022

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.

wordpress__components (unpkg)

was missing the following properties:

  1. CustomGradientPicker
  2. DuotonePicker
  3. DuotoneSwatch
  4. GradientPicker
  5. GuidePage
as well as these 6 other properties...

Line, SearchControl, TextHighlight, ToolbarDropdownMenu, ToolbarItem, useBaseControlProps

wordpress__compose (unpkg)

was missing the following properties:

  1. pipe
  2. useAsyncList
  3. useConstrainedTabbing
  4. useCopyOnClick
  5. useCopyToClipboard
as well as these 15 other properties...

useDebounce, useDisabled, useFocusOnMount, useFocusReturn, useFocusableIframe, useInstanceId, useIsomorphicLayoutEffect, useKeyboardShortcut, useMergeRefs, usePrevious, useRefEffect, useResizeObserver, useThrottle, useViewportMatch, useWarnOnChange

Generated by 🚫 dangerJS against e22ca61

@danieliser danieliser changed the title Fix wordpress__components type mismatch after change to React v18 Fix wordpress__components & wordpress__compose type mismatch after change to React v18 Dec 24, 2022
@danieliser
Copy link
Copy Markdown
Contributor Author

Didn't realize this PR included the update for @types/wordpress__compose as well, so bumped the version for it as well. Same issue fixed in both packages still.

Copy link
Copy Markdown
Contributor

@noahtallen noahtallen left a comment

Choose a reason for hiding this comment

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

Makes sense to me, but I don't know if it will accept my approval!

@typescript-bot typescript-bot added the Other Approved This PR was reviewed and signed-off by a community member. label Dec 27, 2022
@danieliser
Copy link
Copy Markdown
Contributor Author

danieliser commented Dec 28, 2022

@noahtallen - thanks, seems to have resolved everything we were seeing with react/JSX component type mismatches and loading of multiple @type/wordpress__ version library conflicts.

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Dec 28, 2022
@sandersn sandersn merged commit acfd64b into DefinitelyTyped:master Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Edits multiple packages Other Approved This PR was reviewed and signed-off by a community member. 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.

6 participants