From 5047d0a5699b3054f7aab2e0c67bff4c83bbd14d Mon Sep 17 00:00:00 2001 From: Calypso Bot Date: Fri, 13 Dec 2024 06:11:43 +0100 Subject: [PATCH] Update dependency @wordpress/dataviews to v4.10.0 (#40598) * Update dependency @wordpress/dataviews to v4.10.0 * Add hack for WordPress/gutenberg#67897 * ThreatsDataViews: Fix defaultLayouts (#40600) * Updates defaultLayouts fields * Changelog * Update title field label --------- Co-authored-by: Brad Jorsch --------- Co-authored-by: Renovate Bot Co-authored-by: Brad Jorsch Co-authored-by: dkmyta <43220201+dkmyta@users.noreply.github.com> --- .../@wordpress__dataviews@4.10.0.patch | 15 +++++++++ package.json | 7 +++- pnpm-lock.yaml | 33 +++++++++++-------- ...ponents-threats-data-views-default-layouts | 4 +++ .../changelog/renovate-wordpress-monorepo#2 | 4 +++ .../threats-data-views/constants.ts | 4 +-- .../components/threats-data-views/index.tsx | 31 +++++------------ projects/js-packages/components/package.json | 2 +- .../changelog/renovate-wordpress-monorepo#2 | 4 +++ .../publicize-components/package.json | 2 +- 10 files changed, 64 insertions(+), 42 deletions(-) create mode 100644 .pnpm-patches/@wordpress__dataviews@4.10.0.patch create mode 100644 projects/js-packages/components/changelog/fix-components-threats-data-views-default-layouts create mode 100644 projects/js-packages/components/changelog/renovate-wordpress-monorepo#2 create mode 100644 projects/js-packages/publicize-components/changelog/renovate-wordpress-monorepo#2 diff --git a/.pnpm-patches/@wordpress__dataviews@4.10.0.patch b/.pnpm-patches/@wordpress__dataviews@4.10.0.patch new file mode 100644 index 0000000000000..49656b5f977cc --- /dev/null +++ b/.pnpm-patches/@wordpress__dataviews@4.10.0.patch @@ -0,0 +1,15 @@ +Hack for https://github.com/WordPress/gutenberg/issues/67897 + +diff --git a/package.json b/package.json +index d7af17fea3f59f807a9d7234cf9ce79131538383..c862b012af312c9fc5cf1d2d884ec332ee079d0b 100644 +--- a/package.json ++++ b/package.json +@@ -27,7 +27,7 @@ + "exports": { + ".": { + "types": "./build-types/index.d.ts", +- "import": "./build-module/index.js" ++ "default": "./build/index.js" + }, + "./wp": { + "types": "./build-types/index.d.ts", diff --git a/package.json b/package.json index 605f3c28d9302..c48245d935c8a 100644 --- a/package.json +++ b/package.json @@ -37,5 +37,10 @@ "node": "^22.9.0", "pnpm": "^9.3.0 <9.12.0" }, - "packageManager": "pnpm@9.3.0" + "packageManager": "pnpm@9.3.0", + "pnpm": { + "patchedDependencies": { + "@wordpress/dataviews@4.10.0": ".pnpm-patches/@wordpress__dataviews@4.10.0.patch" + } + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6603514fe6e9..4af216da4b55c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,11 @@ settings: pnpmfileChecksum: kmseazxfbymwdp5ie53bnph5mq +patchedDependencies: + '@wordpress/dataviews@4.10.0': + hash: of6mtpeubmoicukrgy5ohupf6a + path: .pnpm-patches/@wordpress__dataviews@4.10.0.patch + importers: .: @@ -379,8 +384,8 @@ importers: specifier: 10.14.0 version: 10.14.0(react@18.3.1) '@wordpress/dataviews': - specifier: 4.9.0 - version: 4.9.0(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 4.10.0 + version: 4.10.0(patch_hash=of6mtpeubmoicukrgy5ohupf6a)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/date': specifier: 5.14.0 version: 5.14.0 @@ -1067,8 +1072,8 @@ importers: specifier: 10.14.0 version: 10.14.0(react@18.3.1) '@wordpress/dataviews': - specifier: 4.9.0 - version: 4.9.0(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 4.10.0 + version: 4.10.0(patch_hash=of6mtpeubmoicukrgy5ohupf6a)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/date': specifier: 5.14.0 version: 5.14.0 @@ -8126,8 +8131,8 @@ packages: peerDependencies: react: ^18.0.0 - '@wordpress/dataviews@4.9.0': - resolution: {integrity: sha512-ucAQx1dwlHU8WyhNSfl/OEc8hFNwIy2/XkNAjduelrMqbNiOOue5mfKjO43zqKT/ZFVvju/gUU7gnTX1A98tCA==} + '@wordpress/dataviews@4.10.0': + resolution: {integrity: sha512-Rsp5wUTTGAJlbWdkdFHGXq06LU6F/Kvki6IT9byexu+984h3F+VNIyVCP1BQPqNAWhsUHD4o0gIZKzH17zrCbw==} engines: {node: '>=18.12.0', npm: '>=8.19.2'} peerDependencies: react: ^18.0.0 @@ -19618,7 +19623,7 @@ snapshots: rememo: 4.0.2 use-memo-one: 1.1.3(react@18.3.1) - '@wordpress/dataviews@4.9.0(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@wordpress/dataviews@4.10.0(patch_hash=of6mtpeubmoicukrgy5ohupf6a)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@ariakit/react': 0.4.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@babel/runtime': 7.25.7 @@ -19640,7 +19645,7 @@ snapshots: - react-dom - supports-color - '@wordpress/dataviews@4.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@wordpress/dataviews@4.10.0(patch_hash=of6mtpeubmoicukrgy5ohupf6a)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@ariakit/react': 0.4.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@babel/runtime': 7.25.7 @@ -19789,7 +19794,7 @@ snapshots: '@wordpress/compose': 7.14.0(react@18.3.1) '@wordpress/core-data': 7.14.0(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/data': 10.14.0(react@18.3.1) - '@wordpress/dataviews': 4.9.0(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@wordpress/dataviews': 4.10.0(patch_hash=of6mtpeubmoicukrgy5ohupf6a)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/date': 5.14.0 '@wordpress/deprecated': 4.13.0 '@wordpress/dom': 4.13.0 @@ -19848,7 +19853,7 @@ snapshots: '@wordpress/compose': 7.14.0(react@18.3.1) '@wordpress/core-data': 7.14.0(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/data': 10.14.0(react@18.3.1) - '@wordpress/dataviews': 4.9.0(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@wordpress/dataviews': 4.10.0(patch_hash=of6mtpeubmoicukrgy5ohupf6a)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/date': 5.14.0 '@wordpress/deprecated': 4.13.0 '@wordpress/dom': 4.13.0 @@ -19907,7 +19912,7 @@ snapshots: '@wordpress/compose': 7.14.0(react@18.3.1) '@wordpress/core-data': 7.14.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/data': 10.14.0(react@18.3.1) - '@wordpress/dataviews': 4.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@wordpress/dataviews': 4.10.0(patch_hash=of6mtpeubmoicukrgy5ohupf6a)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/date': 5.14.0 '@wordpress/deprecated': 4.13.0 '@wordpress/dom': 4.13.0 @@ -20003,7 +20008,7 @@ snapshots: '@wordpress/compose': 7.14.0(react@18.3.1) '@wordpress/core-data': 7.14.0(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/data': 10.14.0(react@18.3.1) - '@wordpress/dataviews': 4.9.0(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@wordpress/dataviews': 4.10.0(patch_hash=of6mtpeubmoicukrgy5ohupf6a)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/date': 5.14.0 '@wordpress/element': 6.14.0 '@wordpress/hooks': 4.14.0 @@ -20042,7 +20047,7 @@ snapshots: '@wordpress/compose': 7.14.0(react@18.3.1) '@wordpress/core-data': 7.14.0(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/data': 10.14.0(react@18.3.1) - '@wordpress/dataviews': 4.9.0(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@wordpress/dataviews': 4.10.0(patch_hash=of6mtpeubmoicukrgy5ohupf6a)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/date': 5.14.0 '@wordpress/element': 6.14.0 '@wordpress/hooks': 4.14.0 @@ -20081,7 +20086,7 @@ snapshots: '@wordpress/compose': 7.14.0(react@18.3.1) '@wordpress/core-data': 7.14.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/data': 10.14.0(react@18.3.1) - '@wordpress/dataviews': 4.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@wordpress/dataviews': 4.10.0(patch_hash=of6mtpeubmoicukrgy5ohupf6a)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/date': 5.14.0 '@wordpress/element': 6.14.0 '@wordpress/hooks': 4.14.0 diff --git a/projects/js-packages/components/changelog/fix-components-threats-data-views-default-layouts b/projects/js-packages/components/changelog/fix-components-threats-data-views-default-layouts new file mode 100644 index 0000000000000..64fa3036e7810 --- /dev/null +++ b/projects/js-packages/components/changelog/fix-components-threats-data-views-default-layouts @@ -0,0 +1,4 @@ +Significance: minor +Type: changed + +Fixes ThreatsDataViews defaultLayouts diff --git a/projects/js-packages/components/changelog/renovate-wordpress-monorepo#2 b/projects/js-packages/components/changelog/renovate-wordpress-monorepo#2 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/js-packages/components/changelog/renovate-wordpress-monorepo#2 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/js-packages/components/components/threats-data-views/constants.ts b/projects/js-packages/components/components/threats-data-views/constants.ts index 59b79a7618453..cc37c28c7b39b 100644 --- a/projects/js-packages/components/components/threats-data-views/constants.ts +++ b/projects/js-packages/components/components/threats-data-views/constants.ts @@ -22,8 +22,8 @@ export const THREAT_TYPES = [ ]; export const THREAT_ICONS = { - plugin: pluginIcon, - theme: themeIcon, + plugins: pluginIcon, + themes: themeIcon, core: coreIcon, file: fileIcon, default: shieldIcon, diff --git a/projects/js-packages/components/components/threats-data-views/index.tsx b/projects/js-packages/components/components/threats-data-views/index.tsx index 6af7c028f4c3a..44efc998dc3ae 100644 --- a/projects/js-packages/components/components/threats-data-views/index.tsx +++ b/projects/js-packages/components/components/threats-data-views/index.tsx @@ -33,7 +33,6 @@ import { THREAT_FIELD_SIGNATURE, THREAT_FIELD_STATUS, THREAT_FIELD_THEME, - THREAT_FIELD_THREAT, THREAT_FIELD_TITLE, THREAT_FIELD_TYPE, THREAT_ICONS, @@ -101,23 +100,10 @@ export default function ThreatsDataViews( { const defaultLayouts: SupportedLayouts = { table: { ...baseView, - fields: [ - THREAT_FIELD_SEVERITY, - THREAT_FIELD_THREAT, - THREAT_FIELD_TYPE, - THREAT_FIELD_AUTO_FIX, - ], - layout: { - primaryField: THREAT_FIELD_SEVERITY, - combinedFields: [ - { - id: THREAT_FIELD_THREAT, - label: __( 'Threat', 'jetpack-components' ), - children: [ THREAT_FIELD_TITLE, THREAT_FIELD_DESCRIPTION ], - direction: 'vertical', - }, - ], - }, + fields: [ THREAT_FIELD_SEVERITY, THREAT_FIELD_TYPE, THREAT_FIELD_AUTO_FIX ], + titleField: THREAT_FIELD_TITLE, + descriptionField: THREAT_FIELD_DESCRIPTION, + showMedia: false, }, list: { ...baseView, @@ -127,10 +113,9 @@ export default function ThreatsDataViews( { THREAT_FIELD_EXTENSION, THREAT_FIELD_SIGNATURE, ], - layout: { - primaryField: THREAT_FIELD_TITLE, - mediaField: THREAT_FIELD_ICON, - }, + titleField: THREAT_FIELD_TITLE, + mediaField: THREAT_FIELD_ICON, + showMedia: true, }, }; @@ -222,7 +207,7 @@ export default function ThreatsDataViews( { const result: Field< Threat >[] = [ { id: THREAT_FIELD_TITLE, - label: __( 'Title', 'jetpack-components' ), + label: __( 'Threat', 'jetpack-components' ), enableGlobalSearch: true, enableHiding: false, render: ( { item }: { item: Threat } ) => ( diff --git a/projects/js-packages/components/package.json b/projects/js-packages/components/package.json index 25ea7c73ba5d0..df315974e18ed 100644 --- a/projects/js-packages/components/package.json +++ b/projects/js-packages/components/package.json @@ -22,7 +22,7 @@ "@wordpress/components": "29.0.0", "@wordpress/compose": "7.14.0", "@wordpress/data": "10.14.0", - "@wordpress/dataviews": "4.9.0", + "@wordpress/dataviews": "4.10.0", "@wordpress/date": "5.14.0", "@wordpress/element": "6.14.0", "@wordpress/i18n": "5.14.0", diff --git a/projects/js-packages/publicize-components/changelog/renovate-wordpress-monorepo#2 b/projects/js-packages/publicize-components/changelog/renovate-wordpress-monorepo#2 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/js-packages/publicize-components/changelog/renovate-wordpress-monorepo#2 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/js-packages/publicize-components/package.json b/projects/js-packages/publicize-components/package.json index 6ec1c474d893c..9a9c568e62665 100644 --- a/projects/js-packages/publicize-components/package.json +++ b/projects/js-packages/publicize-components/package.json @@ -34,7 +34,7 @@ "@wordpress/compose": "7.14.0", "@wordpress/core-data": "7.14.0", "@wordpress/data": "10.14.0", - "@wordpress/dataviews": "4.9.0", + "@wordpress/dataviews": "4.10.0", "@wordpress/date": "5.14.0", "@wordpress/edit-post": "8.14.0", "@wordpress/editor": "14.14.0",