From 2e167ca088a6aae5443f1084f7359c53c1bad61a Mon Sep 17 00:00:00 2001 From: Chi-Hsuan Huang Date: Wed, 29 Jun 2022 13:02:56 +0800 Subject: [PATCH] Fix borken react admin commands (#33649) * Fix admin build:packages and test:packages * Add changelog --- plugins/woocommerce-admin/package.json | 4 ++-- plugins/woocommerce/changelog/dev-fix-admin-commands | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 plugins/woocommerce/changelog/dev-fix-admin-commands diff --git a/plugins/woocommerce-admin/package.json b/plugins/woocommerce-admin/package.json index 4b5c0d8ffcf..5d959e3d349 100644 --- a/plugins/woocommerce-admin/package.json +++ b/plugins/woocommerce-admin/package.json @@ -12,7 +12,7 @@ "analyze": "cross-env NODE_ENV=production ANALYZE=true webpack", "build": "node ./node_modules/require-turbo && pnpm run install-if-deps-outdated && pnpm run clean && WC_ADMIN_PHASE=core pnpm run build:packages && WC_ADMIN_PHASE=core pnpm run build:feature-config && cross-env NODE_ENV=production WC_ADMIN_PHASE=core webpack", "build:feature-config": "php ../woocommerce/bin/generate-feature-config.php", - "build:packages": "cross-env NODE_ENV=production pnpm run:packages -- build", + "build:packages": "cross-env NODE_ENV=production pnpm -w exec turbo run build --filter='./packages/js/*'", "clean": "rimraf ../woocommerce/assets/client/admin/* && pnpm run:packages -- clean --parallel", "client:watch": "cross-env WC_ADMIN_PHASE=development pnpm run build:feature-config && cross-env WC_ADMIN_PHASE=development webpack --watch", "create-hook-reference": "node ./bin/hook-reference/index.js", @@ -47,7 +47,7 @@ "test:client": "jest --config client/jest.config.js", "test:debug": "node --inspect-brk ./node_modules/.bin/jest --config client/jest.config.js --watch --runInBand --no-cache", "test:help": "wp-scripts test-unit-js --help", - "test:packages": "pnpm run --filter ../../packages/js/ --filter !api-core-tests test", + "test:packages": "pnpm -w exec turbo run test --filter='./packages/js/*'", "test:update-snapshots": "pnpm run test:client -- --updateSnapshot && pnpm run --filter @woocommerce/components test:update-snapshots", "test:watch": "pnpm run test:client -- --watch", "ts:check": "tsc --build ./tsconfig.json --pretty", diff --git a/plugins/woocommerce/changelog/dev-fix-admin-commands b/plugins/woocommerce/changelog/dev-fix-admin-commands new file mode 100644 index 00000000000..ec53196910c --- /dev/null +++ b/plugins/woocommerce/changelog/dev-fix-admin-commands @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Fix admin build:packages and test:packages commands + +