From bb320a935a2ebe00643feffa7e31ca943832c1e3 Mon Sep 17 00:00:00 2001 From: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com> Date: Fri, 3 Jun 2022 16:05:26 -0700 Subject: [PATCH] Removed `@woocommerce/notices` Internal Prefix (#33283) Since we're exposing the package in some form, we cannot rename it since that would break backwards compatibility. This commit changes it back. --- .../dependency-extraction-webpack-plugin/assets/packages.js | 2 +- packages/js/{internal-notices => notices}/.eslintrc.js | 0 packages/js/{internal-notices => notices}/.npmrc | 0 packages/js/{internal-notices => notices}/CHANGELOG.md | 0 packages/js/{internal-notices => notices}/README.md | 0 packages/js/{internal-notices => notices}/package.json | 6 +++--- packages/js/{internal-notices => notices}/project.json | 4 ++-- packages/js/{internal-notices => notices}/src/index.ts | 0 .../js/{internal-notices => notices}/src/store/actions.ts | 0 .../js/{internal-notices => notices}/src/store/constants.ts | 0 .../js/{internal-notices => notices}/src/store/controls.ts | 0 .../js/{internal-notices => notices}/src/store/index.ts | 0 .../js/{internal-notices => notices}/src/store/reducer.ts | 0 .../js/{internal-notices => notices}/src/store/selectors.ts | 0 .../js/{internal-notices => notices}/src/store/types.ts | 0 .../src/store/utils/on-sub-key.ts | 0 packages/js/{internal-notices => notices}/tsconfig-cjs.json | 0 packages/js/{internal-notices => notices}/tsconfig.json | 0 plugins/woocommerce-admin/client/layout/index.js | 2 +- plugins/woocommerce-admin/package.json | 2 +- plugins/woocommerce-admin/webpack.config.js | 2 +- plugins/woocommerce/src/Internal/Admin/WCAdminAssets.php | 4 ++-- pnpm-lock.yaml | 6 +++--- tsconfig.base.json | 2 +- workspace.json | 2 +- 25 files changed, 16 insertions(+), 16 deletions(-) rename packages/js/{internal-notices => notices}/.eslintrc.js (100%) rename packages/js/{internal-notices => notices}/.npmrc (100%) rename packages/js/{internal-notices => notices}/CHANGELOG.md (100%) rename packages/js/{internal-notices => notices}/README.md (100%) rename packages/js/{internal-notices => notices}/package.json (91%) rename packages/js/{internal-notices => notices}/project.json (83%) rename packages/js/{internal-notices => notices}/src/index.ts (100%) rename packages/js/{internal-notices => notices}/src/store/actions.ts (100%) rename packages/js/{internal-notices => notices}/src/store/constants.ts (100%) rename packages/js/{internal-notices => notices}/src/store/controls.ts (100%) rename packages/js/{internal-notices => notices}/src/store/index.ts (100%) rename packages/js/{internal-notices => notices}/src/store/reducer.ts (100%) rename packages/js/{internal-notices => notices}/src/store/selectors.ts (100%) rename packages/js/{internal-notices => notices}/src/store/types.ts (100%) rename packages/js/{internal-notices => notices}/src/store/utils/on-sub-key.ts (100%) rename packages/js/{internal-notices => notices}/tsconfig-cjs.json (100%) rename packages/js/{internal-notices => notices}/tsconfig.json (100%) diff --git a/packages/js/dependency-extraction-webpack-plugin/assets/packages.js b/packages/js/dependency-extraction-webpack-plugin/assets/packages.js index fd788ef8635..7f053d7acf2 100644 --- a/packages/js/dependency-extraction-webpack-plugin/assets/packages.js +++ b/packages/js/dependency-extraction-webpack-plugin/assets/packages.js @@ -12,7 +12,7 @@ module.exports = [ '@woocommerce/explat', '@woocommerce/extend-cart-checkout-block', '@woocommerce/navigation', - '@woocommerce/internal-notices', + '@woocommerce/notices', '@woocommerce/number', '@woocommerce/tracks', // wc-blocks packages diff --git a/packages/js/internal-notices/.eslintrc.js b/packages/js/notices/.eslintrc.js similarity index 100% rename from packages/js/internal-notices/.eslintrc.js rename to packages/js/notices/.eslintrc.js diff --git a/packages/js/internal-notices/.npmrc b/packages/js/notices/.npmrc similarity index 100% rename from packages/js/internal-notices/.npmrc rename to packages/js/notices/.npmrc diff --git a/packages/js/internal-notices/CHANGELOG.md b/packages/js/notices/CHANGELOG.md similarity index 100% rename from packages/js/internal-notices/CHANGELOG.md rename to packages/js/notices/CHANGELOG.md diff --git a/packages/js/internal-notices/README.md b/packages/js/notices/README.md similarity index 100% rename from packages/js/internal-notices/README.md rename to packages/js/notices/README.md diff --git a/packages/js/internal-notices/package.json b/packages/js/notices/package.json similarity index 91% rename from packages/js/internal-notices/package.json rename to packages/js/notices/package.json index bf9d43b3dc5..e019f5a2450 100644 --- a/packages/js/internal-notices/package.json +++ b/packages/js/notices/package.json @@ -1,5 +1,5 @@ { - "name": "@woocommerce/internal-notices", + "name": "@woocommerce/notices", "version": "4.0.1", "description": "State management for notices.", "author": "The WordPress Contributors", @@ -9,11 +9,11 @@ "gutenberg", "notices" ], - "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/internal-notices/README.md", + "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/notices/README.md", "repository": { "type": "git", "url": "https://github.com/woocommerce/woocommerge.git", - "directory": "packages/js/internal-notices" + "directory": "packages/js/notices" }, "bugs": { "url": "https://github.com/woocommerce/woocommerce/issues" diff --git a/packages/js/internal-notices/project.json b/packages/js/notices/project.json similarity index 83% rename from packages/js/internal-notices/project.json rename to packages/js/notices/project.json index d0991943736..33f1da11cee 100644 --- a/packages/js/internal-notices/project.json +++ b/packages/js/notices/project.json @@ -1,6 +1,6 @@ { - "root": "packages/js/internal-notices", - "sourceRoot": "packages/js/internal-notices/src", + "root": "packages/js/notices", + "sourceRoot": "packages/js/notices/src", "projectType": "library", "targets": { "build": { diff --git a/packages/js/internal-notices/src/index.ts b/packages/js/notices/src/index.ts similarity index 100% rename from packages/js/internal-notices/src/index.ts rename to packages/js/notices/src/index.ts diff --git a/packages/js/internal-notices/src/store/actions.ts b/packages/js/notices/src/store/actions.ts similarity index 100% rename from packages/js/internal-notices/src/store/actions.ts rename to packages/js/notices/src/store/actions.ts diff --git a/packages/js/internal-notices/src/store/constants.ts b/packages/js/notices/src/store/constants.ts similarity index 100% rename from packages/js/internal-notices/src/store/constants.ts rename to packages/js/notices/src/store/constants.ts diff --git a/packages/js/internal-notices/src/store/controls.ts b/packages/js/notices/src/store/controls.ts similarity index 100% rename from packages/js/internal-notices/src/store/controls.ts rename to packages/js/notices/src/store/controls.ts diff --git a/packages/js/internal-notices/src/store/index.ts b/packages/js/notices/src/store/index.ts similarity index 100% rename from packages/js/internal-notices/src/store/index.ts rename to packages/js/notices/src/store/index.ts diff --git a/packages/js/internal-notices/src/store/reducer.ts b/packages/js/notices/src/store/reducer.ts similarity index 100% rename from packages/js/internal-notices/src/store/reducer.ts rename to packages/js/notices/src/store/reducer.ts diff --git a/packages/js/internal-notices/src/store/selectors.ts b/packages/js/notices/src/store/selectors.ts similarity index 100% rename from packages/js/internal-notices/src/store/selectors.ts rename to packages/js/notices/src/store/selectors.ts diff --git a/packages/js/internal-notices/src/store/types.ts b/packages/js/notices/src/store/types.ts similarity index 100% rename from packages/js/internal-notices/src/store/types.ts rename to packages/js/notices/src/store/types.ts diff --git a/packages/js/internal-notices/src/store/utils/on-sub-key.ts b/packages/js/notices/src/store/utils/on-sub-key.ts similarity index 100% rename from packages/js/internal-notices/src/store/utils/on-sub-key.ts rename to packages/js/notices/src/store/utils/on-sub-key.ts diff --git a/packages/js/internal-notices/tsconfig-cjs.json b/packages/js/notices/tsconfig-cjs.json similarity index 100% rename from packages/js/internal-notices/tsconfig-cjs.json rename to packages/js/notices/tsconfig-cjs.json diff --git a/packages/js/internal-notices/tsconfig.json b/packages/js/notices/tsconfig.json similarity index 100% rename from packages/js/internal-notices/tsconfig.json rename to packages/js/notices/tsconfig.json diff --git a/plugins/woocommerce-admin/client/layout/index.js b/plugins/woocommerce-admin/client/layout/index.js index 4a47962a165..53df9bff39a 100644 --- a/plugins/woocommerce-admin/client/layout/index.js +++ b/plugins/woocommerce-admin/client/layout/index.js @@ -25,7 +25,7 @@ import { withOptionsHydration, } from '@woocommerce/data'; import { recordPageView } from '@woocommerce/tracks'; -import '@woocommerce/internal-notices'; +import '@woocommerce/notices'; import { PluginArea } from '@wordpress/plugins'; /** diff --git a/plugins/woocommerce-admin/package.json b/plugins/woocommerce-admin/package.json index efd3da7e7bb..bd5cda66c7f 100644 --- a/plugins/woocommerce-admin/package.json +++ b/plugins/woocommerce-admin/package.json @@ -149,7 +149,7 @@ "@woocommerce/explat": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/navigation": "workspace:*", - "@woocommerce/internal-notices": "workspace:*", + "@woocommerce/notices": "workspace:*", "@woocommerce/number": "workspace:*", "@woocommerce/onboarding": "workspace:*", "@woocommerce/internal-style-build": "workspace:*", diff --git a/plugins/woocommerce-admin/webpack.config.js b/plugins/woocommerce-admin/webpack.config.js index b5a3c1bfa61..ed0cea98bd4 100644 --- a/plugins/woocommerce-admin/webpack.config.js +++ b/plugins/woocommerce-admin/webpack.config.js @@ -30,7 +30,7 @@ const wcAdminPackages = [ 'experimental', 'explat', 'navigation', - 'internal-notices', + 'notices', 'number', 'data', 'tracks', diff --git a/plugins/woocommerce/src/Internal/Admin/WCAdminAssets.php b/plugins/woocommerce/src/Internal/Admin/WCAdminAssets.php index 3b5d34e38ee..d8990800933 100644 --- a/plugins/woocommerce/src/Internal/Admin/WCAdminAssets.php +++ b/plugins/woocommerce/src/Internal/Admin/WCAdminAssets.php @@ -253,7 +253,7 @@ class WCAdminAssets { 'wc-experimental', 'wc-customer-effort-score', // NOTE: This should be removed when Gutenberg is updated and the notices package is removed from WooCommerce Admin. - 'wc-internal-notices', + 'wc-notices', 'wc-number', 'wc-tracks', 'wc-date', @@ -365,7 +365,7 @@ class WCAdminAssets { 'wc-navigation', // NOTE: This should be removed when Gutenberg is updated and // the notices package is removed from WooCommerce Admin. - 'wc-internal-notices', + 'wc-notices', 'wc-number', 'wc-date', 'wc-components', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15db9936fbf..aca5d5d9a6c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -973,7 +973,7 @@ importers: ts-jest: 27.1.3_b64eba0a9f1c7068f7f3a75addda5ccd typescript: 4.6.2 - packages/js/internal-notices: + packages/js/notices: specifiers: '@automattic/data-stores': ^2.0.1 '@babel/core': ^7.17.5 @@ -1332,7 +1332,7 @@ importers: '@woocommerce/experimental': workspace:* '@woocommerce/explat': workspace:* '@woocommerce/internal-js-tests': workspace:* - '@woocommerce/internal-notices': workspace:* + '@woocommerce/notices': workspace:* '@woocommerce/internal-style-build': workspace:* '@woocommerce/navigation': workspace:* '@woocommerce/number': workspace:* @@ -1536,7 +1536,7 @@ importers: '@woocommerce/experimental': link:../../packages/js/experimental '@woocommerce/explat': link:../../packages/js/explat '@woocommerce/internal-js-tests': link:../../packages/js/internal-js-tests - '@woocommerce/internal-notices': link:../../packages/js/internal-notices + '@woocommerce/notices': link:../../packages/js/notices '@woocommerce/internal-style-build': link:../../packages/js/internal-style-build '@woocommerce/navigation': link:../../packages/js/navigation '@woocommerce/number': link:../../packages/js/number diff --git a/tsconfig.base.json b/tsconfig.base.json index 6abe0652c86..1968d0bd40d 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -52,7 +52,7 @@ { "path": "./packages/js/explat" }, { "path": "./packages/js/internal-js-tests" }, { "path": "./packages/js/navigation" }, - { "path": "./packages/js/internal-notices" }, + { "path": "./packages/js/notices" }, { "path": "./packages/js/number" }, { "path": "./packages/js/onboarding" }, { "path": "./packages/js/tracks" } diff --git a/workspace.json b/workspace.json index 565a53d391e..f10a5f55b74 100644 --- a/workspace.json +++ b/workspace.json @@ -24,7 +24,7 @@ "@woocommerce/explat": "packages/js/explat", "@woocommerce/internal-js-tests": "packages/js/internal-js-tests", "@woocommerce/navigation": "packages/js/navigation", - "@woocommerce/internal-notices": "packages/js/internal-notices", + "@woocommerce/notices": "packages/js/notices", "@woocommerce/number": "packages/js/number", "@woocommerce/onboarding": "packages/js/onboarding", "@woocommerce/internal-style-build": "packages/js/internal-style-build",