From ae73cd7ccca4e51bcee267bb2c3267ce7d86e4b2 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Wed, 3 Jul 2024 13:03:49 -0400 Subject: [PATCH 1/2] use classNames remove imports of `classnames` since its already imported as `classNames` in webpack updates methods passed to modules as needed --- src/app/components/app-nav/index.js | 2 -- src/app/index.js | 4 +--- src/app/pages/admin/index.js | 1 - src/app/pages/home/accountCard.js | 1 - src/app/pages/marketplace/index.js | 3 +-- src/app/pages/performance/index.js | 2 -- src/app/pages/settings/index.js | 1 - src/app/pages/staging/index.js | 3 +-- 8 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/app/components/app-nav/index.js b/src/app/components/app-nav/index.js index 13af77e95..c8f45bb54 100644 --- a/src/app/components/app-nav/index.js +++ b/src/app/components/app-nav/index.js @@ -2,7 +2,6 @@ import { useEffect, useState } from '@wordpress/element'; import apiFetch from '@wordpress/api-fetch'; import { useViewportMatch } from '@wordpress/compose'; import { addQueryArgs } from '@wordpress/url'; -import classnames from 'classnames'; import { filter } from 'lodash'; import { Modal, SidebarNavigation } from '@newfold/ui-component-library'; import { default as NewfoldNotifications } from '@modules/wp-module-notifications/assets/js/components/notifications/'; @@ -170,7 +169,6 @@ export const SideNav = () => { methods={ { apiFetch, addQueryArgs, - classnames, filter, useState, useEffect, diff --git a/src/app/index.js b/src/app/index.js index 8e1f549e1..cead4f968 100644 --- a/src/app/index.js +++ b/src/app/index.js @@ -5,7 +5,6 @@ import AppStore, { AppStoreProvider } from './data/store'; import { useLocation, HashRouter as Router } from 'react-router-dom'; import { NewfoldRuntime } from '@newfold-labs/wp-module-runtime'; import { SnackbarList, Spinner } from '@wordpress/components'; -import classnames from 'classnames'; import AppRoutes from './data/routes'; import ErrorCard from './components/errorCard'; import { useDispatch, useSelect } from '@wordpress/data'; @@ -56,7 +55,7 @@ const AppBody = ( props ) => { return (
{ methods={ { apiFetch, addQueryArgs, - classnames, filter, useState, useEffect, diff --git a/src/app/pages/admin/index.js b/src/app/pages/admin/index.js index 4f0e2dcd2..3366c3ced 100644 --- a/src/app/pages/admin/index.js +++ b/src/app/pages/admin/index.js @@ -1,4 +1,3 @@ -import classNames from 'classnames'; import HelpCenterSettings from '../settings/helpCenterSettings'; import WonderBlocksSettings from '../settings/wonderBlocksSettings'; import StagingFeatureSettings from '../settings/stagingFeatureSettings'; diff --git a/src/app/pages/home/accountCard.js b/src/app/pages/home/accountCard.js index 801a4ace1..6b813ede6 100644 --- a/src/app/pages/home/accountCard.js +++ b/src/app/pages/home/accountCard.js @@ -13,7 +13,6 @@ import { getPlatformBaseUrl, isJarvis, } from '../../util/helpers'; -import classNames from 'classnames'; const base = [ { diff --git a/src/app/pages/marketplace/index.js b/src/app/pages/marketplace/index.js index a920acd52..fda70e677 100644 --- a/src/app/pages/marketplace/index.js +++ b/src/app/pages/marketplace/index.js @@ -1,7 +1,6 @@ import apiFetch from '@wordpress/api-fetch'; import { useState, useEffect } from '@wordpress/element'; import { useLocation, useMatch, useNavigate } from 'react-router-dom'; -import classnames from 'classnames'; import { Container, Page } from '@newfold/ui-component-library'; import { NewfoldRuntime } from '@newfold-labs/wp-module-runtime'; // component sourced from marketplace module @@ -44,7 +43,7 @@ const MarketplacePage = () => { // methods to pass to module const moduleMethods = { apiFetch, - classnames, + classNames, useState, useEffect, useLocation, diff --git a/src/app/pages/performance/index.js b/src/app/pages/performance/index.js index d1b4e3b32..526632b3a 100644 --- a/src/app/pages/performance/index.js +++ b/src/app/pages/performance/index.js @@ -1,7 +1,6 @@ import apiFetch from '@wordpress/api-fetch'; import { useState, useEffect, useContext, Fragment } from '@wordpress/element'; import { useUpdateEffect } from 'react-use'; -import classnames from 'classnames'; import { Container, Page } from '@newfold/ui-component-library'; import { NewfoldRuntime } from '@newfold-labs/wp-module-runtime'; import AppStore from '../../data/store'; @@ -20,7 +19,6 @@ const PerformancePage = () => { // methods to pass to module const moduleMethods = { apiFetch, - classnames, useState, useEffect, useContext, diff --git a/src/app/pages/settings/index.js b/src/app/pages/settings/index.js index ddf18ba60..8d0f24d85 100644 --- a/src/app/pages/settings/index.js +++ b/src/app/pages/settings/index.js @@ -1,4 +1,3 @@ -import classNames from 'classnames'; import { Container, Page } from '@newfold/ui-component-library'; import useContainerBlockIsTarget from 'App/util/hooks/useContainerBlockTarget'; import ComingSoon from './comingSoon'; diff --git a/src/app/pages/staging/index.js b/src/app/pages/staging/index.js index f6ecbd651..68ad95d37 100644 --- a/src/app/pages/staging/index.js +++ b/src/app/pages/staging/index.js @@ -1,7 +1,6 @@ import './stylesheet.scss'; import { useState, useEffect } from '@wordpress/element'; import apiFetch from '@wordpress/api-fetch'; -import classnames from 'classnames'; import { NewfoldRuntime } from '@newfold-labs/wp-module-runtime'; import { useNotification } from 'App/components/notifications'; // component sourced from staging module @@ -18,7 +17,7 @@ const Staging = () => { // methods to pass to module const moduleMethods = { apiFetch, - classnames, + classNames, useState, useEffect, NewfoldRuntime, From a20c6f53e232474a980817120f8b0c05afb9dc29 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Wed, 3 Jul 2024 13:39:28 -0400 Subject: [PATCH 2/2] update modules with classnames fixes Marketplace@2.4.0, Notifications@1.4.0, Staging@2.1.0 --- composer.json | 8 ++++---- composer.lock | 38 +++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/composer.json b/composer.json index d72712eb2..4a6f8db35 100644 --- a/composer.json +++ b/composer.json @@ -85,16 +85,16 @@ "newfold-labs/wp-module-global-ctb": "^1.0.13", "newfold-labs/wp-module-help-center": "^2.0.0", "newfold-labs/wp-module-loader": "^1.0.10", - "newfold-labs/wp-module-marketplace": "^2.3.1", - "newfold-labs/wp-module-migration": "^1.0.7", - "newfold-labs/wp-module-notifications": "^1.3.0", + "newfold-labs/wp-module-marketplace": "^2.4.0", + "newfold-labs/wp-module-migration": "^1.0.8", + "newfold-labs/wp-module-notifications": "^1.4.0", "newfold-labs/wp-module-onboarding": "^2.3.5", "newfold-labs/wp-module-patterns": "2.0.0 as 1.9.9", "newfold-labs/wp-module-performance": "2.0.0 as 1.9.9", "newfold-labs/wp-module-runtime": "^1.0.11", "newfold-labs/wp-module-secure-passwords": "^1.1.1", "newfold-labs/wp-module-sso": "^1.0.5", - "newfold-labs/wp-module-staging": "^2.0.0", + "newfold-labs/wp-module-staging": "^2.1.0", "wp-forge/wp-update-handler": "^1.0.2", "wp-forge/wp-upgrade-handler": "^1.0" } diff --git a/composer.lock b/composer.lock index ff8cc6167..1c13d5ef4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5ac4713c83fa5d89cc5a1c4eb8e9b096", + "content-hash": "e20a3efd2ea7eb063728b831bca7dd9d", "packages": [ { "name": "doctrine/inflector", @@ -1034,16 +1034,16 @@ }, { "name": "newfold-labs/wp-module-marketplace", - "version": "2.3.1", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-marketplace.git", - "reference": "a3d9b4121d1de7dbf6ec1e23aa60cb851cf2f39c" + "reference": "71f46b229d1ba96abbd0c673d45b9fa03fdf4145" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-marketplace/zipball/a3d9b4121d1de7dbf6ec1e23aa60cb851cf2f39c", - "reference": "a3d9b4121d1de7dbf6ec1e23aa60cb851cf2f39c", + "url": "https://api.github.com/repos/newfold-labs/wp-module-marketplace/zipball/71f46b229d1ba96abbd0c673d45b9fa03fdf4145", + "reference": "71f46b229d1ba96abbd0c673d45b9fa03fdf4145", "shasum": "" }, "require": { @@ -1084,10 +1084,10 @@ ], "description": "A module for rendering product data and interacting with the Hiive marketplace API.", "support": { - "source": "https://github.com/newfold-labs/wp-module-marketplace/tree/2.3.1", + "source": "https://github.com/newfold-labs/wp-module-marketplace/tree/2.4.0", "issues": "https://github.com/newfold-labs/wp-module-marketplace/issues" }, - "time": "2024-06-26T20:22:11+00:00" + "time": "2024-07-03T17:26:23+00:00" }, { "name": "newfold-labs/wp-module-migration", @@ -1145,16 +1145,16 @@ }, { "name": "newfold-labs/wp-module-notifications", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-notifications.git", - "reference": "2e0474d648bafadb6367e7323ed898b429bc0ef2" + "reference": "7c9b2d94df068b8df52ff50f393014db785036b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-notifications/zipball/2e0474d648bafadb6367e7323ed898b429bc0ef2", - "reference": "2e0474d648bafadb6367e7323ed898b429bc0ef2", + "url": "https://api.github.com/repos/newfold-labs/wp-module-notifications/zipball/7c9b2d94df068b8df52ff50f393014db785036b1", + "reference": "7c9b2d94df068b8df52ff50f393014db785036b1", "shasum": "" }, "require": { @@ -1183,10 +1183,10 @@ ], "description": "A module for managing Newfold in-site notifications.", "support": { - "source": "https://github.com/newfold-labs/wp-module-notifications/tree/1.3.0", + "source": "https://github.com/newfold-labs/wp-module-notifications/tree/1.4.0", "issues": "https://github.com/newfold-labs/wp-module-notifications/issues" }, - "time": "2024-04-30T04:47:27+00:00" + "time": "2024-07-03T17:27:19+00:00" }, { "name": "newfold-labs/wp-module-onboarding", @@ -1555,16 +1555,16 @@ }, { "name": "newfold-labs/wp-module-staging", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-staging.git", - "reference": "dae822eec83521f6538844877ee98e637004514d" + "reference": "87116edaff795913173dd5d0dc4cb258d6cda8ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-staging/zipball/dae822eec83521f6538844877ee98e637004514d", - "reference": "dae822eec83521f6538844877ee98e637004514d", + "url": "https://api.github.com/repos/newfold-labs/wp-module-staging/zipball/87116edaff795913173dd5d0dc4cb258d6cda8ef", + "reference": "87116edaff795913173dd5d0dc4cb258d6cda8ef", "shasum": "" }, "require": { @@ -1602,10 +1602,10 @@ ], "description": "Newfold module for staging functionality in brand plugins", "support": { - "source": "https://github.com/newfold-labs/wp-module-staging/tree/2.0.0", + "source": "https://github.com/newfold-labs/wp-module-staging/tree/2.1.0", "issues": "https://github.com/newfold-labs/wp-module-staging/issues" }, - "time": "2024-05-29T14:18:17+00:00" + "time": "2024-07-03T17:28:16+00:00" }, { "name": "newfold-labs/wp-module-survey",