diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b9f1bc952d48a..ee48d87954770 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -318,8 +318,8 @@ importers: specifier: 10.9.0 version: 10.9.0(react@18.3.1) '@wordpress/dataviews': - specifier: 4.5.0 - version: 4.5.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 4.7.0 + version: 4.7.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/date': specifier: 5.9.0 version: 5.9.0 @@ -7827,6 +7827,12 @@ packages: peerDependencies: react: ^18.0.0 + '@wordpress/dataviews@4.7.0': + resolution: {integrity: sha512-Uc6iKqo7kbeX7eB1TjcWakD7wLLSCeo+61H0r/OnHWBBV61UVl1IekZ2QLbfVDl1wTLYKMZcz49g1WcB6iidZA==} + engines: {node: '>=18.12.0', npm: '>=8.19.2'} + peerDependencies: + react: ^18.0.0 + '@wordpress/date@5.9.0': resolution: {integrity: sha512-Iywz1bga3cPSrf7k4dh2mYVsACqzu0GXYhfu57ElAM9robGjcUxJdzgbWUZw90v473NOp2UpVYsWCuDEqNDcdw==} engines: {node: '>=18.12.0', npm: '>=8.19.2'} @@ -18589,10 +18595,32 @@ snapshots: - react-dom - supports-color - '@wordpress/dataviews@4.5.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@wordpress/dataviews@4.7.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@ariakit/react': 0.4.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@babel/runtime': 7.26.0 + '@babel/runtime': 7.25.7 + '@wordpress/components': 28.9.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@wordpress/compose': 7.9.0(react@18.3.1) + '@wordpress/data': 10.9.0(react@18.3.1) + '@wordpress/element': 6.9.0 + '@wordpress/i18n': 5.9.0 + '@wordpress/icons': 10.9.0(react@18.3.1) + '@wordpress/primitives': 4.9.0(react@18.3.1) + '@wordpress/private-apis': 1.10.0 + '@wordpress/warning': 3.10.0 + clsx: 2.1.1 + react: 18.3.1 + remove-accents: 0.5.0 + transitivePeerDependencies: + - '@emotion/is-prop-valid' + - '@types/react' + - react-dom + - supports-color + + '@wordpress/dataviews@4.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@ariakit/react': 0.4.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@babel/runtime': 7.25.7 '@wordpress/components': 28.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/compose': 7.9.0(react@18.3.1) '@wordpress/data': 10.9.0(react@18.3.1) @@ -18738,7 +18766,7 @@ snapshots: '@wordpress/compose': 7.9.0(react@18.3.1) '@wordpress/core-data': 7.9.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/data': 10.9.0(react@18.3.1) - '@wordpress/dataviews': 4.5.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@wordpress/dataviews': 4.7.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/date': 5.9.0 '@wordpress/deprecated': 4.9.0 '@wordpress/dom': 4.9.0 @@ -18797,7 +18825,7 @@ snapshots: '@wordpress/compose': 7.9.0(react@18.3.1) '@wordpress/core-data': 7.9.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/data': 10.9.0(react@18.3.1) - '@wordpress/dataviews': 4.5.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@wordpress/dataviews': 4.7.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/date': 5.9.0 '@wordpress/deprecated': 4.9.0 '@wordpress/dom': 4.9.0 @@ -18856,7 +18884,7 @@ snapshots: '@wordpress/compose': 7.9.0(react@18.3.1) '@wordpress/core-data': 7.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/data': 10.9.0(react@18.3.1) - '@wordpress/dataviews': 4.5.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@wordpress/dataviews': 4.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/date': 5.9.0 '@wordpress/deprecated': 4.9.0 '@wordpress/dom': 4.9.0 @@ -18969,7 +18997,7 @@ snapshots: '@wordpress/compose': 7.9.0(react@18.3.1) '@wordpress/core-data': 7.9.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/data': 10.9.0(react@18.3.1) - '@wordpress/dataviews': 4.5.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@wordpress/dataviews': 4.7.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/element': 6.9.0 '@wordpress/hooks': 4.9.0 '@wordpress/html-entities': 4.9.0 @@ -19003,7 +19031,7 @@ snapshots: '@wordpress/compose': 7.9.0(react@18.3.1) '@wordpress/core-data': 7.9.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/data': 10.9.0(react@18.3.1) - '@wordpress/dataviews': 4.5.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@wordpress/dataviews': 4.7.0(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/element': 6.9.0 '@wordpress/hooks': 4.9.0 '@wordpress/html-entities': 4.9.0 @@ -19037,7 +19065,7 @@ snapshots: '@wordpress/compose': 7.9.0(react@18.3.1) '@wordpress/core-data': 7.9.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/data': 10.9.0(react@18.3.1) - '@wordpress/dataviews': 4.5.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@wordpress/dataviews': 4.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wordpress/element': 6.9.0 '@wordpress/hooks': 4.9.0 '@wordpress/html-entities': 4.9.0 diff --git a/projects/js-packages/components/changelog/update-threats-data-views-component b/projects/js-packages/components/changelog/update-threats-data-views-component new file mode 100644 index 0000000000000..0b8fff39c6c6a --- /dev/null +++ b/projects/js-packages/components/changelog/update-threats-data-views-component @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Minor adjustments to the ThreatsDataViews component. + + diff --git a/projects/js-packages/components/package.json b/projects/js-packages/components/package.json index 00e5f8ca0c20d..529a2727158d3 100644 --- a/projects/js-packages/components/package.json +++ b/projects/js-packages/components/package.json @@ -22,7 +22,7 @@ "@wordpress/components": "28.9.0", "@wordpress/compose": "7.9.0", "@wordpress/data": "10.9.0", - "@wordpress/dataviews": "4.5.0", + "@wordpress/dataviews": "4.7.0", "@wordpress/date": "5.9.0", "@wordpress/element": "6.9.0", "@wordpress/i18n": "5.9.0", diff --git a/projects/js-packages/scan/jest.config.cjs b/projects/js-packages/scan/jest.config.cjs new file mode 100644 index 0000000000000..057829a25a0f1 --- /dev/null +++ b/projects/js-packages/scan/jest.config.cjs @@ -0,0 +1,11 @@ +const baseConfig = require( 'jetpack-js-tools/jest/config.base.js' ); + +module.exports = { + ...baseConfig, + transform: { + ...baseConfig.transform, + '\\.[jt]sx?$': require( 'jetpack-js-tools/jest/babel-jest-config-factory.js' )( + require.resolve + ), + }, +}; diff --git a/projects/js-packages/scan/package.json b/projects/js-packages/scan/package.json index 388548539c4df..3f10a9de856ff 100644 --- a/projects/js-packages/scan/package.json +++ b/projects/js-packages/scan/package.json @@ -15,7 +15,7 @@ "license": "GPL-2.0-or-later", "author": "Automattic", "scripts": { - "build": "pnpm run clean && webpack", + "build": "pnpm run clean && pnpm run compile-ts", "clean": "rm -rf build/", "compile-ts": "tsc --pretty", "test": "jest", @@ -53,7 +53,6 @@ "dependencies": { "@automattic/jetpack-api": "workspace:*", "@automattic/jetpack-base-styles": "workspace:*", - "@automattic/jetpack-webpack-config": "workspace:*", "@wordpress/api-fetch": "7.9.0", "@wordpress/element": "6.9.0", "@wordpress/i18n": "5.9.0", @@ -61,9 +60,7 @@ "@wordpress/url": "4.9.0", "debug": "4.3.4", "react": "^18.2.0", - "react-dom": "^18.2.0", - "webpack": "5.94.0", - "webpack-cli": "4.9.1" + "react-dom": "^18.2.0" }, "peerDependencies": { "@wordpress/i18n": "5.9.0", diff --git a/projects/js-packages/scan/webpack.config.cjs b/projects/js-packages/scan/webpack.config.cjs deleted file mode 100644 index 2fa9b2cfcf027..0000000000000 --- a/projects/js-packages/scan/webpack.config.cjs +++ /dev/null @@ -1,53 +0,0 @@ -const path = require( 'path' ); -const jetpackWebpackConfig = require( '@automattic/jetpack-webpack-config/webpack' ); - -module.exports = [ - { - entry: { - index: './src/index.ts', - }, - mode: jetpackWebpackConfig.mode, - devtool: jetpackWebpackConfig.devtool, - output: { - ...jetpackWebpackConfig.output, - path: path.resolve( './build' ), - }, - optimization: { - ...jetpackWebpackConfig.optimization, - }, - resolve: { - ...jetpackWebpackConfig.resolve, - }, - node: false, - plugins: [ ...jetpackWebpackConfig.StandardPlugins() ], - module: { - strictExportPresence: true, - rules: [ - // Transpile JavaScript - jetpackWebpackConfig.TranspileRule( { - exclude: /node_modules\//, - } ), - - // Transpile @automattic/jetpack-* in node_modules too. - jetpackWebpackConfig.TranspileRule( { - includeNodeModules: [ '@automattic/jetpack-' ], - } ), - - // Handle CSS. - jetpackWebpackConfig.CssRule( { - extensions: [ 'css', 'sass', 'scss' ], - extraLoaders: [ 'sass-loader' ], - } ), - - // Handle images. - jetpackWebpackConfig.FileRule(), - ], - }, - externals: { - ...jetpackWebpackConfig.externals, - jetpackConfig: JSON.stringify( { - consumer_slug: 'my_jetpack', - } ), - }, - }, -];