Skip to content
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

When installing @wordpress/components in a 3rd party repo, some types are broken #50157

Open
noahtallen opened this issue Apr 28, 2023 · 6 comments
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Comments

@noahtallen
Copy link
Member

Description

I recently experimented with updating @wordpress/components to the latest version (23.9.0), and found a few errors when trying to use it with Typescript:

node_modules/@wordpress/components/build-types/text/types.d.ts(46,32): error TS7016: Could not find a declaration file for module 'highlight-words-core'. '/Users/noahallen/source/wp-calypso/node_modules/highlight-words-core/dist/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/highlight-words-core` if it exists or add a new declaration (.d.ts) file containing `declare module 'highlight-words-core';`
node_modules/@wordpress/components/build-types/custom-gradient-picker/types.d.ts(5,33): error TS7016: Could not find a declaration file for module 'gradient-parser'. '/Users/noahallen/source/wp-calypso/node_modules/gradient-parser/build/node.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/gradient-parser` if it exists or add a new declaration (.d.ts) file containing `declare module 'gradient-parser';`
packages/components/dist/types/submenu-popover/index.d.ts(3,39): error TS2503: Cannot find namespace 'Popover'.

I think this could be related to us disabling the lib check in tsc for components:

"skipLibCheck": true,

Step-by-step reproduction instructions

Install the components package in a 3rd party package repo.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@noahtallen noahtallen added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components labels Apr 28, 2023
@ciampo
Copy link
Contributor

ciampo commented Apr 28, 2023

Re. @types/highlight-words-core and @types/gradient-parser, it was my impression that dev dependencies in Gutenberg are declared in the top-level package.json, and not in the individual components. Could you confirm that?

packages/components/dist/types/submenu-popover/index.d.ts(3,39): error TS2503: Cannot find namespace 'Popover'.

This seems to be due to how DT types used to expose a Popover namespace, with the Props property:

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/wordpress__components/popover/index.d.ts#L4-L5

We simply don't do that in our first-party types. I guess that could be easily fixed by doing something like

import type { Popover } from '@wordpress/components`;

type PopoverProps = React.ComponentProps< typeof Popover >;

@noahtallen
Copy link
Member Author

noahtallen commented Apr 28, 2023

Could you confirm that?

Yeah, I think this is true. I also think all @types packages are considered dev dependencies in Gutenberg, which might not always be true -- in this case, if the types aren't getting added to the published package, and it hopes to resolve them via node_modules in "production" (e.g. when it's consumed by other apps), they wouldn't be found

anomiex added a commit to Automattic/jetpack that referenced this issue May 1, 2023
GB switched to including types in the package instead of using a
`@types/` package.

This also necessitated some code changes, since they're not publishing
the component props (see WordPress/gutenberg#50157).

Also of note is that their types for `ClipboardButton` are broken, in
that they didn't declare that it also accepts all `Button`'s props.
Since that component is deprecated anyway, we just replace use of it
with the designated replacement.
@noahtallen
Copy link
Member Author

Yeah, I think we'll need to refine how we approach this in Gutenberg. (Here's a good description of the issue: https://stackoverflow.com/a/46011417). If our published types include "import x from y", then y needs to be resolvable from node_modules. This works fine in our internal repo, since everything is available in node_modules, but does not work anywhere else.

This also makes it tricky to add a CI rule, because it wouldn't get caught when running tsc in the internal repo unless we remove the node_modules that aren't directly associated with the package at hand -- which would probably cause other issues with actual dev tools.

Ideally, the linter rules about defining dependencies in package.json would catch this, but since the main dependency is defined already, that lint rule can't help us.

@noahtallen
Copy link
Member Author

I think skipLibCheck is a red herring here; it wouldn't catch this particular issue

@noahtallen
Copy link
Member Author

Another side of this is that certain dependencies, like @types/react wouldn't normally cause an issue in this exact situation because the consumer has likely installed them already. As a result, there could be even more of these issues that I didn't find, just because the repo I was testing in already has a lot of type dependencies.

It would probably be worth adding a script to try to report issues here; otherwise we might end up continuously having to fix these. (Though at the same time, we might not be adding @types dependencies frequently enough to justify that.)

anomiex added a commit to Automattic/jetpack that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>
matticbot pushed a commit to Automattic/eslint-config-target-es that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/i18n-loader-webpack-plugin that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-base-styles that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-assets that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-post-list that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-image-cdn that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-shared-extension-utils that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-connection that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-plugin-deactivation that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-lazy-images that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-action-bar that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-heartbeat that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-tracking that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-options that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-publicize-components that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-stats that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-abtest that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-licensing that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-partner that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-waf that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-plans that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-import that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-transport-helper that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-yoast-promo that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-wordads that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-identity-crisis that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-jitm that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-publicize that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-sync that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-forms that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-stats-admin that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-crm that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-videopress that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-blaze that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-backup that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-my-jetpack that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-backup-plugin that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-videopress-plugin that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/wpcom-migration that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-starter-plugin that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-protect-plugin that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-social-plugin that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-search that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-search-plugin that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-boost-production that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-storybook that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
matticbot pushed a commit to Automattic/jetpack-production that referenced this issue May 2, 2023
* Update wordpress monorepo
* Remove `@types/wordpress__components`

  GB switched to including types in the package instead of using a
  `@types/` package.

  This also necessitated some code changes, since they're not publishing
  the component props (see WordPress/gutenberg#50157).

  Also of note is that their types for `ClipboardButton` are broken, in
  that they didn't declare that it also accepts all `Button`'s props.
  Since that component is deprecated anyway, we just replace use of it
  with the designated replacement.

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4861850947
@mirka
Copy link
Member

mirka commented May 23, 2023

Adding a minimal CodeSandbox repro here for reference. npm run build compiles fine, but npx tsc --build will fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants