From 7859e37221da941da4edcb1599ebbe97e77d31e7 Mon Sep 17 00:00:00 2001 From: louwie17 Date: Fri, 16 Apr 2021 00:34:15 -0300 Subject: [PATCH] Making experimental package public and updating its dependency versions (https://github.com/woocommerce/woocommerce-admin/pull/6810) * Making experimental package public, and updating the dependency versions * add experimental to webpack and make explat public * bump DEWP package version * use filepath for inter package dependencies * load experimental script * remove check for experimental Co-authored-by: Sam Seay Co-authored-by: Paul Sealock --- .../bin/starter-pack/_package.json | 2 +- plugins/woocommerce-admin/package-lock.json | 39 ++++++++++++------- .../packages/components/CHANGELOG.md | 4 ++ .../packages/components/package.json | 12 +++--- .../packages/currency/package.json | 2 +- .../packages/data/package.json | 4 +- .../CHANGELOG.md | 3 +- .../package.json | 2 +- .../src/index.js | 5 --- .../packages/experimental/package.json | 3 +- .../packages/navigation/CHANGELOG.md | 4 ++ .../packages/navigation/package.json | 2 +- plugins/woocommerce-admin/src/Loader.php | 1 + plugins/woocommerce-admin/webpack.config.js | 3 +- 14 files changed, 51 insertions(+), 35 deletions(-) diff --git a/plugins/woocommerce-admin/bin/starter-pack/_package.json b/plugins/woocommerce-admin/bin/starter-pack/_package.json index 8090b5e120d..96cd1bb0829 100644 --- a/plugins/woocommerce-admin/bin/starter-pack/_package.json +++ b/plugins/woocommerce-admin/bin/starter-pack/_package.json @@ -22,6 +22,6 @@ "devDependencies": { "@wordpress/scripts": "^12.2.1", "@woocommerce/eslint-plugin": "1.1.0", - "@woocommerce/dependency-extraction-webpack-plugin": "1.4.0" + "@woocommerce/dependency-extraction-webpack-plugin": "1.5.0" } } diff --git a/plugins/woocommerce-admin/package-lock.json b/plugins/woocommerce-admin/package-lock.json index adf95c4a1d7..ae6704249cf 100644 --- a/plugins/woocommerce-admin/package-lock.json +++ b/plugins/woocommerce-admin/package-lock.json @@ -9132,6 +9132,12 @@ "version": "file:packages/components", "dev": true, "requires": { + "@woocommerce/csv-export": "1.3.0", + "@woocommerce/currency": "3.0.0", + "@woocommerce/data": "1.1.1", + "@woocommerce/date": "2.1.0", + "@woocommerce/experimental": "1.0.0", + "@woocommerce/navigation": "5.2.0", "@wordpress/api-fetch": "^3.21.5", "@wordpress/components": "10.2.0", "@wordpress/compose": "3.23.1", @@ -9152,9 +9158,11 @@ "d3-selection": "1.4.2", "d3-shape": "1.3.7", "d3-time-format": "2.3.0", + "dompurify": "2.2.7", "emoji-flags": "1.3.0", "gridicons": "3.3.1", "interpolate-components": "1.1.1", + "md5": "2.3.0", "memoize-one": "5.1.1", "moment": "2.29.1", "prop-types": "15.7.2", @@ -9537,6 +9545,7 @@ "version": "file:packages/currency", "dev": true, "requires": { + "@woocommerce/number": "2.1.0", "@wordpress/deprecated": "^2.9.0", "@wordpress/html-entities": "2.10.0" }, @@ -9661,6 +9670,8 @@ "version": "file:packages/data", "dev": true, "requires": { + "@woocommerce/date": "2.1.0", + "@woocommerce/navigation": "5.2.0", "rememo": "^3.0.0" }, "dependencies": { @@ -10338,15 +10349,15 @@ } }, "@woocommerce/e2e-utils": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@woocommerce/e2e-utils/-/e2e-utils-0.1.2.tgz", - "integrity": "sha512-jea/yTDzkpFvbwi8g0FZ6p+FAK1FUH8OTboRV447SUpALnuQB57N0p33Dwfab2B5ZrGPVgLUxlAgt+q6acOqXw==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@woocommerce/e2e-utils/-/e2e-utils-0.1.4.tgz", + "integrity": "sha512-7MZKT1hgaJWyF66YTxQvBUIgXiAuw4BNJOCX1hkWbeTEUNRp6jIXcePzHReNH4b3IXGYhS/BIqD0vKrxqg17Vw==", "requires": { "@wordpress/deprecated": "^2.10.0", "@wordpress/e2e-test-utils": "^4.6.0", "config": "3.3.3", "faker": "^5.1.0", - "fishery": "^1.0.1" + "fishery": "^1.2.0" }, "dependencies": { "config": { @@ -10783,7 +10794,7 @@ "version": "file:packages/navigation", "dev": true, "requires": { - "@woocommerce/experimental": "file:packages/experimental", + "@woocommerce/experimental": "1.0.0", "history": "4.10.1", "qs": "6.9.6" }, @@ -18052,6 +18063,12 @@ "safe-buffer": "~5.1.1" } }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "dev": true + }, "cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", @@ -21138,12 +21155,6 @@ "vary": "~1.1.2" }, "dependencies": { - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", - "dev": true - }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -21297,9 +21308,9 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "faker": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/faker/-/faker-5.5.2.tgz", - "integrity": "sha512-6G3lzZXWjWfqTJDS9KhHFIislZMGdrzDqews3T14E/dsANVbs3YT4A3jSNDrbA/gbtmjLuKJx9DzcLucdXBqBw==" + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/faker/-/faker-5.5.3.tgz", + "integrity": "sha512-wLTv2a28wjUyWkbnX7u/ABZBkUkIF2fCd73V6P2oFqEGEktDfzWx4UxrSqtPRw0xPRAcjeAOIiJWqZm3pP4u3g==" }, "fast-deep-equal": { "version": "3.1.3", diff --git a/plugins/woocommerce-admin/packages/components/CHANGELOG.md b/plugins/woocommerce-admin/packages/components/CHANGELOG.md index 9e5e32ee5a9..a763f0c1e79 100644 --- a/plugins/woocommerce-admin/packages/components/CHANGELOG.md +++ b/plugins/woocommerce-admin/packages/components/CHANGELOG.md @@ -1,3 +1,7 @@ +# 6.1.2 + +- Update dependencies. + # 6.1.1 - Update dependencies. diff --git a/plugins/woocommerce-admin/packages/components/package.json b/plugins/woocommerce-admin/packages/components/package.json index ebe6277392b..96ff8c96f08 100644 --- a/plugins/woocommerce-admin/packages/components/package.json +++ b/plugins/woocommerce-admin/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@woocommerce/components", - "version": "6.1.1", + "version": "6.1.2", "description": "UI components for WooCommerce.", "author": "Automattic", "license": "GPL-3.0-or-later", @@ -21,12 +21,12 @@ "module": "build-module/index.js", "react-native": "src/index", "dependencies": { - "@woocommerce/csv-export": "1.3.0", - "@woocommerce/currency": "3.0.0", - "@woocommerce/data": "1.1.1", - "@woocommerce/date": "2.1.0", + "@woocommerce/csv-export": "file:../csv-export", + "@woocommerce/currency": "file:../currency", + "@woocommerce/data": "file:../data", + "@woocommerce/date": "file:../date", "@woocommerce/experimental": "file:../experimental", - "@woocommerce/navigation": "5.2.0", + "@woocommerce/navigation": "file:../navigation", "@wordpress/api-fetch": "^3.21.5", "@wordpress/components": "10.2.0", "@wordpress/compose": "3.23.1", diff --git a/plugins/woocommerce-admin/packages/currency/package.json b/plugins/woocommerce-admin/packages/currency/package.json index eb23e9e3d7a..6765fd75445 100644 --- a/plugins/woocommerce-admin/packages/currency/package.json +++ b/plugins/woocommerce-admin/packages/currency/package.json @@ -21,7 +21,7 @@ "module": "build-module/index.js", "react-native": "src/index", "dependencies": { - "@woocommerce/number": "2.1.0", + "@woocommerce/number": "file:../number", "@wordpress/deprecated": "^2.9.0", "@wordpress/html-entities": "2.10.0" }, diff --git a/plugins/woocommerce-admin/packages/data/package.json b/plugins/woocommerce-admin/packages/data/package.json index 585b69e2c2b..02047ae203f 100644 --- a/plugins/woocommerce-admin/packages/data/package.json +++ b/plugins/woocommerce-admin/packages/data/package.json @@ -21,8 +21,8 @@ "module": "build-module/index.js", "react-native": "src/index", "dependencies": { - "@woocommerce/date": "2.1.0", - "@woocommerce/navigation": "5.2.0", + "@woocommerce/date": "file:../date", + "@woocommerce/navigation": "file:../navigation", "rememo": "^3.0.0" }, "publishConfig": { diff --git a/plugins/woocommerce-admin/packages/dependency-extraction-webpack-plugin/CHANGELOG.md b/plugins/woocommerce-admin/packages/dependency-extraction-webpack-plugin/CHANGELOG.md index f301b3ea160..60f0c3fab4e 100644 --- a/plugins/woocommerce-admin/packages/dependency-extraction-webpack-plugin/CHANGELOG.md +++ b/plugins/woocommerce-admin/packages/dependency-extraction-webpack-plugin/CHANGELOG.md @@ -1,6 +1,7 @@ -# Unreleased +# 1.5.0 - Add `@woocommerce/explat` to list of packages. +- Add `@woocommerce/experimental` to list of packages. # 1.4.0 diff --git a/plugins/woocommerce-admin/packages/dependency-extraction-webpack-plugin/package.json b/plugins/woocommerce-admin/packages/dependency-extraction-webpack-plugin/package.json index a5c59a7d00c..169bc081c0a 100644 --- a/plugins/woocommerce-admin/packages/dependency-extraction-webpack-plugin/package.json +++ b/plugins/woocommerce-admin/packages/dependency-extraction-webpack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@woocommerce/dependency-extraction-webpack-plugin", - "version": "1.4.0", + "version": "1.5.0", "description": "WooCommerce Dependency Extraction Webpack Plugin", "author": "Automattic", "license": "GPL-2.0-or-later", diff --git a/plugins/woocommerce-admin/packages/dependency-extraction-webpack-plugin/src/index.js b/plugins/woocommerce-admin/packages/dependency-extraction-webpack-plugin/src/index.js index a9f5493bda7..d836dab95c8 100644 --- a/plugins/woocommerce-admin/packages/dependency-extraction-webpack-plugin/src/index.js +++ b/plugins/woocommerce-admin/packages/dependency-extraction-webpack-plugin/src/index.js @@ -25,11 +25,6 @@ const wooRequestToExternal = ( request ) => { settings: [ 'wc', 'wcSettings' ], }; - const excludedExternals = [ 'experimental' ]; - if ( excludedExternals.includes( handle ) ) { - return; - } - if ( irregularExternalMap[ handle ] ) { return irregularExternalMap[ handle ]; } diff --git a/plugins/woocommerce-admin/packages/experimental/package.json b/plugins/woocommerce-admin/packages/experimental/package.json index adec379c1bf..0df5b18edec 100644 --- a/plugins/woocommerce-admin/packages/experimental/package.json +++ b/plugins/woocommerce-admin/packages/experimental/package.json @@ -26,6 +26,5 @@ }, "publishConfig": { "access": "public" - }, - "private": true + } } diff --git a/plugins/woocommerce-admin/packages/navigation/CHANGELOG.md b/plugins/woocommerce-admin/packages/navigation/CHANGELOG.md index fac08720f42..41e7faa151f 100644 --- a/plugins/woocommerce-admin/packages/navigation/CHANGELOG.md +++ b/plugins/woocommerce-admin/packages/navigation/CHANGELOG.md @@ -1,3 +1,7 @@ +# 6.0.1 + +- Update dependencies. + # 6.0.0 - Moving `addHistoryListener()` to this package, which supports adding a listener that is executed for history changes. diff --git a/plugins/woocommerce-admin/packages/navigation/package.json b/plugins/woocommerce-admin/packages/navigation/package.json index 11c01ffc3db..d455884bb00 100644 --- a/plugins/woocommerce-admin/packages/navigation/package.json +++ b/plugins/woocommerce-admin/packages/navigation/package.json @@ -1,6 +1,6 @@ { "name": "@woocommerce/navigation", - "version": "6.0.0", + "version": "6.0.1", "description": "WooCommerce navigation utilities.", "author": "Automattic", "license": "GPL-3.0-or-later", diff --git a/plugins/woocommerce-admin/src/Loader.php b/plugins/woocommerce-admin/src/Loader.php index f4ed026cc33..6ff1331c021 100644 --- a/plugins/woocommerce-admin/src/Loader.php +++ b/plugins/woocommerce-admin/src/Loader.php @@ -340,6 +340,7 @@ class Loader { $scripts = array( 'wc-explat', + '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-notices', diff --git a/plugins/woocommerce-admin/webpack.config.js b/plugins/woocommerce-admin/webpack.config.js index 40027255798..314c7d60c71 100644 --- a/plugins/woocommerce-admin/webpack.config.js +++ b/plugins/woocommerce-admin/webpack.config.js @@ -25,12 +25,13 @@ const NODE_ENV = process.env.NODE_ENV || 'development'; const WC_ADMIN_PHASE = process.env.WC_ADMIN_PHASE || 'development'; const wcAdminPackages = [ - 'explat', 'components', 'csv-export', 'currency', 'customer-effort-score', 'date', + 'experimental', + 'explat', 'navigation', 'notices', 'number',