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

Add some @types packages as proper dependencies #50231

Merged
merged 3 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"IS_GUTENBERG_PLUGIN": true
},
"dependencies": {
"@types/gradient-parser": "0.1.2",
"@wordpress/a11y": "file:packages/a11y",
"@wordpress/annotations": "file:packages/annotations",
"@wordpress/api-fetch": "file:packages/api-fetch",
Expand Down Expand Up @@ -126,7 +125,6 @@
"@testing-library/user-event": "14.4.3",
"@types/eslint": "7.28.0",
"@types/estree": "0.0.50",
"@types/highlight-words-core": "1.2.1",
"@types/istanbul-lib-report": "3.0.0",
"@types/mime": "2.0.3",
"@types/npm-package-arg": "6.1.1",
Expand Down
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
- `ContextSystemProvider`: Move out of `ui/` ([#54847](https://github.com/WordPress/gutenberg/pull/54847)).
- `SlotFill`: Migrate to TypeScript and Convert to Functional Component `<Slot bubblesVirtually />`. ([#51350](https://github.com/WordPress/gutenberg/pull/51350)).
- `Components`: move `ui/utils` to `utils` and remove `ui/` folder ([#54922](https://github.com/WordPress/gutenberg/pull/54922)).
- Ensure `@types/` dependencies used by final type files are included in the main dependency field ([#50231](https://github.com/WordPress/gutenberg/pull/50231)).

## 25.8.0 (2023-09-20)

Expand Down
2 changes: 2 additions & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
"@emotion/utils": "^1.0.0",
"@floating-ui/react-dom": "^2.0.1",
"@radix-ui/react-dropdown-menu": "2.0.4",
"@types/gradient-parser": "0.1.3",
"@types/highlight-words-core": "1.2.1",
"@use-gesture/react": "^10.2.24",
"@wordpress/a11y": "file:../a11y",
"@wordpress/compose": "file:../compose",
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/text/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type { TruncateProps } from '../truncate/types';
* External dependencies
*/
import type { CSSProperties } from 'react';
import type { FindAllArgs } from 'highlight-words-core';

export type TextSize =
| 'body'
Expand Down Expand Up @@ -59,7 +60,7 @@ export interface Props extends TruncateProps {
/**
* Array of search words. String search terms are automatically cast to RegExps unless `highlightEscape` is true.
*/
highlightSanitize?: import('highlight-words-core').FindAllArgs[ 'sanitize' ];
highlightSanitize?: FindAllArgs[ 'sanitize' ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if it should be part of this PR or done as a follow-up, but just wanted to note that highlight-words-core is also used by packages/components/src/text/utils.js, which at this point could do with a TS refactor

/**
* Sets `Text` to have `display: block`.
*/
Expand Down