From fa011a431b13516eda4fd69877f6c0c75e481faf Mon Sep 17 00:00:00 2001 From: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com> Date: Tue, 28 Nov 2023 14:50:43 -0800 Subject: [PATCH] Removed Unnecessary `run` From `pnpm` --- .../setup-local-test-environment/action.yml | 2 +- .github/workflows/pr-build-and-e2e-tests.yml | 2 +- .github/workflows/pr-highlight-changes.yml | 4 +- .github/workflows/pr-lint-monorepo.yml | 2 +- .github/workflows/release-code-freeze.yml | 14 +-- .github/workflows/smoke-test-release.yml | 6 +- .github/workflows/syncpack.yml | 2 +- DEVELOPMENT.md | 2 +- README.md | 4 +- bin/pre-push.sh | 2 +- .../development-environment.md | 2 +- packages/js/admin-e2e-tests/package.json | 14 +-- packages/js/admin-layout/package.json | 14 +-- packages/js/ai/package.json | 14 +-- packages/js/api/package.json | 14 +-- packages/js/block-templates/package.json | 14 +-- packages/js/components/package.json | 16 +-- packages/js/csv-export/package.json | 14 +-- packages/js/currency/package.json | 14 +-- .../js/customer-effort-score/package.json | 14 +-- packages/js/data/package.json | 14 +-- packages/js/date/package.json | 14 +-- .../package.json | 4 +- packages/js/e2e-core-tests/package.json | 8 +- packages/js/e2e-environment/external.md | 2 +- packages/js/e2e-environment/package.json | 8 +- packages/js/e2e-utils/package.json | 8 +- packages/js/eslint-plugin/package.json | 4 +- packages/js/experimental/package.json | 14 +-- packages/js/explat/package.json | 14 +-- .../js/expression-evaluation/package.json | 14 +-- packages/js/integrate-plugin/package.json | 14 +-- packages/js/internal-e2e-builds/package.json | 4 +- packages/js/internal-js-tests/package.json | 14 +-- packages/js/internal-style-build/package.json | 4 +- packages/js/navigation/package.json | 14 +-- packages/js/notices/package.json | 14 +-- packages/js/number/package.json | 14 +-- packages/js/onboarding/package.json | 14 +-- packages/js/product-editor/package.json | 14 +-- packages/js/tracks/package.json | 14 +-- plugins/woo-ai/DEVELOPMENT.md | 6 +- plugins/woo-ai/package.json | 4 +- .../bin/hook-reference/README.md | 2 +- plugins/woocommerce-admin/package.json | 42 ++------ plugins/woocommerce-beta-tester/package.json | 14 +-- .../bin/generate-feature-config.php | 2 +- plugins/woocommerce/bin/package-update.sh | 2 +- .../woocommerce/client/legacy/package.json | 10 +- plugins/woocommerce/package.json | 14 +-- plugins/woocommerce/tests/e2e/README.md | 10 +- .../woocommerce/tests/performance/README.md | 4 +- tools/code-analyzer/README.md | 2 +- .../src/lib/__tests__/fixtures/diff.txt | 102 +++++++++--------- tools/create-extension/README.md | 2 +- tools/monorepo-utils/package.json | 2 +- tools/release-posts/README.md | 6 +- tools/storybook/package.json | 4 +- 58 files changed, 296 insertions(+), 326 deletions(-) diff --git a/.github/actions/tests/setup-local-test-environment/action.yml b/.github/actions/tests/setup-local-test-environment/action.yml index 6a6899873af..8ca7c4b5ee8 100644 --- a/.github/actions/tests/setup-local-test-environment/action.yml +++ b/.github/actions/tests/setup-local-test-environment/action.yml @@ -18,7 +18,7 @@ runs: if: ( inputs.test-type == 'e2e' ) || ( inputs.test-type == 'api' ) working-directory: plugins/woocommerce shell: bash - run: pnpm run env:test + run: pnpm env:test - name: Load docker images and start containers for k6 performance tests if: inputs.test-type == 'k6' diff --git a/.github/workflows/pr-build-and-e2e-tests.yml b/.github/workflows/pr-build-and-e2e-tests.yml index fafd94564d1..41f0149e107 100644 --- a/.github/workflows/pr-build-and-e2e-tests.yml +++ b/.github/workflows/pr-build-and-e2e-tests.yml @@ -35,7 +35,7 @@ jobs: working-directory: plugins/woocommerce env: WP_ENV_PHP_VERSION: 7.4 - run: pnpm run env:test + run: pnpm env:test - name: Download and install Chromium browser. working-directory: plugins/woocommerce diff --git a/.github/workflows/pr-highlight-changes.yml b/.github/workflows/pr-highlight-changes.yml index 8a9ddabdc7f..c2dea8419c1 100644 --- a/.github/workflows/pr-highlight-changes.yml +++ b/.github/workflows/pr-highlight-changes.yml @@ -28,8 +28,8 @@ jobs: working-directory: tools/code-analyzer run: | HEAD_REF=$(git rev-parse HEAD) - version=$(pnpm run analyzer major-minor "$HEAD_REF" "plugins/woocommerce/woocommerce.php" | tail -n 1) - pnpm run analyzer "$HEAD_REF" $version -o "github" + version=$(pnpm analyzer major-minor "$HEAD_REF" "plugins/woocommerce/woocommerce.php" | tail -n 1) + pnpm analyzer "$HEAD_REF" $version -o "github" - name: Check results uses: actions/github-script@v6 with: diff --git a/.github/workflows/pr-lint-monorepo.yml b/.github/workflows/pr-lint-monorepo.yml index 0903a94f62f..4a1e72224e4 100644 --- a/.github/workflows/pr-lint-monorepo.yml +++ b/.github/workflows/pr-lint-monorepo.yml @@ -32,4 +32,4 @@ jobs: run: php tools/monorepo/check-changelogger-use.php --debug "$BASE" "$HEAD" - name: Run changelog validation - run: pnpm run -r changelog validate + run: pnpm -r changelog validate diff --git a/.github/workflows/release-code-freeze.yml b/.github/workflows/release-code-freeze.yml index a835180d3ab..00d07c06ee4 100644 --- a/.github/workflows/release-code-freeze.yml +++ b/.github/workflows/release-code-freeze.yml @@ -74,35 +74,35 @@ jobs: if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: pnpm run utils code-freeze milestone -o ${{ github.repository_owner }} -m ${{ steps.get-versions.outputs.monthlyMilestone }} + run: pnpm utils code-freeze milestone -o ${{ github.repository_owner }} -m ${{ steps.get-versions.outputs.monthlyMilestone }} - name: Create next monthly release branch id: branch if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: pnpm run utils code-freeze branch -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.monthlyBranch }} + run: pnpm utils code-freeze branch -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.monthlyBranch }} - name: Create next accelerated release branch id: branch-accel if: steps.get-versions.outputs.isTodayAcceleratedFreeze == 'yes' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: pnpm run utils code-freeze branch -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.acceleratedBranch }} + run: pnpm utils code-freeze branch -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.acceleratedBranch }} - name: Bump versions for Beta.1 monthly release id: version-bump if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: pnpm run utils code-freeze version-bump -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.monthlyBranch }} -c ${{ steps.get-versions.outputs.monthlyVersion }}-beta.1 + run: pnpm utils code-freeze version-bump -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.monthlyBranch }} -c ${{ steps.get-versions.outputs.monthlyVersion }}-beta.1 - name: Bump versions for accelerated release id: version-bump-accel if: steps.get-versions.outputs.isTodayAcceleratedFreeze == 'yes' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: pnpm run utils code-freeze version-bump -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.acceleratedBranch }} -c ${{ steps.get-versions.outputs.acceleratedVersion }} -af + run: pnpm utils code-freeze version-bump -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.acceleratedBranch }} -c ${{ steps.get-versions.outputs.acceleratedVersion }} -af - name: Prep accelerated release id: accel-release-prep @@ -116,14 +116,14 @@ jobs: if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: pnpm run utils code-freeze version-bump ${{ steps.get-versions.outputs.monthlyMilestone }}-dev -o ${{ github.repository_owner }} + run: pnpm utils code-freeze version-bump ${{ steps.get-versions.outputs.monthlyMilestone }}-dev -o ${{ github.repository_owner }} - name: Generate changelog changes id: changelog if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: pnpm run utils code-freeze changelog -c -o ${{ github.repository_owner }} -v ${{ steps.get-versions.outputs.monthlyVersionXY }} + run: pnpm utils code-freeze changelog -c -o ${{ github.repository_owner }} -v ${{ steps.get-versions.outputs.monthlyVersionXY }} notify-slack: diff --git a/.github/workflows/smoke-test-release.yml b/.github/workflows/smoke-test-release.yml index fa0958d2029..f9d3c49f4fb 100644 --- a/.github/workflows/smoke-test-release.yml +++ b/.github/workflows/smoke-test-release.yml @@ -322,7 +322,7 @@ jobs: - name: Launch WP Env working-directory: plugins/woocommerce - run: pnpm run env:test + run: pnpm env:test env: WP_ENV_CORE: WordPress/WordPress#${{ steps.get-wp-latest-1.outputs.version }} @@ -467,7 +467,7 @@ jobs: working-directory: plugins/woocommerce env: WP_ENV_PHP_VERSION: ${{ matrix.php_version }} - run: pnpm run env:test + run: pnpm env:test - name: Verify PHP version working-directory: .github/workflows/scripts @@ -630,7 +630,7 @@ jobs: - name: Launch WP Env working-directory: plugins/woocommerce - run: pnpm run env:test + run: pnpm env:test - name: Download release zip id: download-zip diff --git a/.github/workflows/syncpack.yml b/.github/workflows/syncpack.yml index 3406ae02aee..8f7e92fe4e2 100644 --- a/.github/workflows/syncpack.yml +++ b/.github/workflows/syncpack.yml @@ -33,5 +33,5 @@ jobs: - name: 'Explain Remedy' if: failure() run: | - echo "Dependency version mismatch detected. This can usually be fixed automatically by updating the pinned version in \`.syncpackrc\` and then running: \`pnpm run sync-dependencies\`" + echo "Dependency version mismatch detected. This can usually be fixed automatically by updating the pinned version in \`.syncpackrc\` and then running: \`pnpm sync-dependencies\`" exit 1 diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 859f41fafb2..f6b77a94530 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -16,7 +16,7 @@ Here are some examples of the ways you can use `pnpm` commands: ```bash # Lint and build all plugins, packages, and tools. -pnpm lint && pnpm run build +pnpm lint && pnpm build # Build WooCommerce Core and all of its dependencies pnpm --filter='@woocommerce/plugin-woocommerce' build diff --git a/README.md b/README.md index fbbbb99413e..94f77e93f74 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,10 @@ nvm use # Install the PHP and Composer dependencies for all of the plugins, packages, and tools pnpm install # Build all of the plugins, packages, and tools in the monorepo -pnpm run build +pnpm build ``` -At this point you are now ready to begin developing and testing. All of the build outputs are cached running `pnpm run build` again will only build the plugins, packages, and tools that have changed since the last time you ran the command. +At this point you are now ready to begin developing and testing. All of the build outputs are cached running `pnpm build` again will only build the plugins, packages, and tools that have changed since the last time you ran the command. Check out [our development guide](DEVELOPMENT.md) if you would like a more comprehensive look at working in our repository. diff --git a/bin/pre-push.sh b/bin/pre-push.sh index 563b74c3f48..ec1147be3e7 100755 --- a/bin/pre-push.sh +++ b/bin/pre-push.sh @@ -27,7 +27,7 @@ pnpm exec syncpack -- list-mismatches if [ $? -ne 0 ]; then echo "You must sync the dependencies listed above before you can push this branch." - echo "This can usually be accomplished automatically by updating the pinned version in \`.syncpackrc\` and then running \`pnpm run sync-dependencies\`." + echo "This can usually be accomplished automatically by updating the pinned version in \`.syncpackrc\` and then running \`pnpm sync-dependencies\`." exit 1 fi diff --git a/docs/extension-development/development-environment.md b/docs/extension-development/development-environment.md index 3018c983368..84cf4f3b89f 100644 --- a/docs/extension-development/development-environment.md +++ b/docs/extension-development/development-environment.md @@ -99,7 +99,7 @@ pnpm install && composer install ### Build WooCommerce ```sh -pnpm run build +pnpm build ``` Running this script will compile the JavaScript and CSS that WooCommerce needs to operate. If you try to run WooCommerce on your server without generating the compiled assets, you may experience errors and other unwanted side-effects. diff --git a/packages/js/admin-e2e-tests/package.json b/packages/js/admin-e2e-tests/package.json index 96275d031b7..c535763bf3d 100644 --- a/packages/js/admin-e2e-tests/package.json +++ b/packages/js/admin-e2e-tests/package.json @@ -26,16 +26,16 @@ ], "sideEffects": false, "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:typescript": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", - "watch:build": "pnpm run build:project --watch" + "lint:lang:js": "eslint src", + "prepack": "pnpm build", + "watch:build": "pnpm build:project --watch" }, "lint-staged": { "*.(t|j)s?(x)": [ diff --git a/packages/js/admin-layout/package.json b/packages/js/admin-layout/package.json index 343e523a1f2..0e0febcf879 100644 --- a/packages/js/admin-layout/package.json +++ b/packages/js/admin-layout/package.json @@ -28,18 +28,18 @@ "access": "public" }, "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:bundle": "wireit", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", - "watch:build": "pnpm run build:project --watch" + "lint:lang:js": "eslint src", + "prepack": "pnpm build", + "watch:build": "pnpm build:project --watch" }, "devDependencies": { "@types/react": "^17.0.71", diff --git a/packages/js/ai/package.json b/packages/js/ai/package.json index 15110450d49..40631cad8ab 100644 --- a/packages/js/ai/package.json +++ b/packages/js/ai/package.json @@ -26,19 +26,19 @@ ], "private": true, "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:bundle": "wireit", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "dependencies": { "@wordpress/api-fetch": "wp-6.0", diff --git a/packages/js/api/package.json b/packages/js/api/package.json index 0ae350b1f4b..e9594484600 100644 --- a/packages/js/api/package.json +++ b/packages/js/api/package.json @@ -30,17 +30,17 @@ ], "sideEffects": false, "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:typescript": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "lint-staged": { "*.(t|j)s?(x)": [ diff --git a/packages/js/block-templates/package.json b/packages/js/block-templates/package.json index 910f4e9dcab..e90c1b9e62e 100644 --- a/packages/js/block-templates/package.json +++ b/packages/js/block-templates/package.json @@ -25,19 +25,19 @@ "src/**/*.scss" ], "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:bundle": "wireit", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "dependencies": { "@woocommerce/expression-evaluation": "workspace:*", diff --git a/packages/js/components/package.json b/packages/js/components/package.json index 6e3976c1dd2..119430eb4cc 100644 --- a/packages/js/components/package.json +++ b/packages/js/components/package.json @@ -30,19 +30,19 @@ ], "types": "build-types", "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:bundle": "wireit", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", - "lint:fix:lang:js": "eslint --output-file eslint_report.json --format json --ext=js,ts,tsx src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json --ext=js,ts,tsx src", - "prepack": "pnpm run build", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", + "lint:fix:lang:js": "eslint --ext=js,ts,tsx src --fix", + "lint:lang:js": "eslint --ext=js,ts,tsx src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "lint-staged": { "*.(t|j)s?(x)": [ diff --git a/packages/js/csv-export/package.json b/packages/js/csv-export/package.json index 2b2181ea49c..25ffcc3d6d6 100644 --- a/packages/js/csv-export/package.json +++ b/packages/js/csv-export/package.json @@ -26,18 +26,18 @@ "types": "build-types", "react-native": "src/index", "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "dependencies": { "@types/node": "^16.18.68", diff --git a/packages/js/currency/package.json b/packages/js/currency/package.json index 947595ac80f..fc4d69167d7 100644 --- a/packages/js/currency/package.json +++ b/packages/js/currency/package.json @@ -26,18 +26,18 @@ "types": "build-types", "react-native": "src/index", "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "lint-staged": { "*.(t|j)s?(x)": [ diff --git a/packages/js/customer-effort-score/package.json b/packages/js/customer-effort-score/package.json index 3b5eeaafb7a..73010924ffe 100644 --- a/packages/js/customer-effort-score/package.json +++ b/packages/js/customer-effort-score/package.json @@ -25,19 +25,19 @@ "types": "build-types", "react-native": "src/index", "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:bundle": "wireit", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "lint-staged": { "*.(t|j)s?(x)": [ diff --git a/packages/js/data/package.json b/packages/js/data/package.json index 017901ba59c..aaef50d3f22 100644 --- a/packages/js/data/package.json +++ b/packages/js/data/package.json @@ -25,18 +25,18 @@ "module": "build-module/index.js", "types": "build-types", "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "lint-staged": { "*.(t|j)s?(x)": [ diff --git a/packages/js/date/package.json b/packages/js/date/package.json index 988275b4349..3f5f8ca42b5 100644 --- a/packages/js/date/package.json +++ b/packages/js/date/package.json @@ -58,18 +58,18 @@ "access": "public" }, "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "lint-staged": { "*.(t|j)s?(x)": [ diff --git a/packages/js/dependency-extraction-webpack-plugin/package.json b/packages/js/dependency-extraction-webpack-plugin/package.json index 914db0474a0..d6518bfa952 100644 --- a/packages/js/dependency-extraction-webpack-plugin/package.json +++ b/packages/js/dependency-extraction-webpack-plugin/package.json @@ -42,8 +42,8 @@ }, "scripts": { "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", "lint:lang:js": "eslint --output-file eslint_report.json --format json src" }, diff --git a/packages/js/e2e-core-tests/package.json b/packages/js/e2e-core-tests/package.json index d2213294ca0..62b440b804c 100644 --- a/packages/js/e2e-core-tests/package.json +++ b/packages/js/e2e-core-tests/package.json @@ -23,12 +23,12 @@ "CHANGELOG.md" ], "scripts": { - "build": "./bin/build.sh && pnpm run clean && pnpm run compile", + "build": "./bin/build.sh && pnpm clean && pnpm compile", "clean": "rm -rf ./build ./build-module", "compile": "e2e-builds", - "lint": "eslint --output-file eslint_report.json --format json --ext=js,ts,tsx src", - "lint:fix": "eslint --output-file eslint_report.json --format json --ext=js,ts,tsx src --fix", - "prepack": "pnpm run build" + "lint": "eslint --ext=js,ts,tsx src", + "lint:fix": "eslint --ext=js,ts,tsx src --fix", + "prepack": "pnpm build" }, "lint-staged": { "*.(t|j)s?(x)": [ diff --git a/packages/js/e2e-environment/external.md b/packages/js/e2e-environment/external.md index f2100ea5a07..b147cce6065 100644 --- a/packages/js/e2e-environment/external.md +++ b/packages/js/e2e-environment/external.md @@ -38,7 +38,7 @@ Again, if you don't have shell access to your test site, through WP Admin ensure 3. You have an admin user set up (if their credentials differ from u/ `admin` and p/ `password` be sure to update `/plugins/woocommerce/tests/e2e/config/default.json`) 4. You have a customer user set up named 'Jane Smith'. This user should be a `subscriber` and again make sure their username and password are reflected in `/plugins/woocommerce/tests/e2e/config/default.json`. -You should then be able to run the e2e tests by running `pnpm run e2e --filter=@woocommerce/plugin-woocommerce`. +You should then be able to run the e2e tests by running `pnpm e2e --filter=@woocommerce/plugin-woocommerce`. ### Test Sequencer Setup diff --git a/packages/js/e2e-environment/package.json b/packages/js/e2e-environment/package.json index f863cc13fe3..1785c87536b 100644 --- a/packages/js/e2e-environment/package.json +++ b/packages/js/e2e-environment/package.json @@ -28,7 +28,7 @@ "wc-e2e": "bin/wc-e2e.sh" }, "scripts": { - "build": "pnpm run clean && pnpm run compile", + "build": "pnpm clean && pnpm compile", "clean": "rm -rf ./build ./build-module", "compile": "e2e-builds", "docker:clear-all": "docker rmi --force $(docker images -q)", @@ -36,9 +36,9 @@ "docker:ssh": "docker exec -it $(node utils/get-app-name.js)_wordpress-www /bin/bash", "docker:up": "./bin/docker-compose.sh up", "docker:wait": "bash ./bin/wait-for-build.sh", - "lint": "eslint --output-file eslint_report.json --format json --ext=js,ts,tsx src", - "lint:fix": "eslint --output-file eslint_report.json --format json --ext=js,ts,tsx src --fix", - "prepack": "pnpm run build", + "lint": "eslint --ext=js,ts,tsx src", + "lint:fix": "eslint --ext=js,ts,tsx src --fix", + "prepack": "pnpm build", "test:e2e": "bash ./bin/wait-for-build.sh && ./bin/e2e-test-integration.js", "test:e2e-debug": "bash ./bin/wait-for-build.sh && ./bin/e2e-test-integration.js --dev --debug", "test:e2e-dev": "bash ./bin/wait-for-build.sh && ./bin/e2e-test-integration.js --dev" diff --git a/packages/js/e2e-utils/package.json b/packages/js/e2e-utils/package.json index 6b9a4e4ae6b..2f503e5b414 100644 --- a/packages/js/e2e-utils/package.json +++ b/packages/js/e2e-utils/package.json @@ -15,12 +15,12 @@ "main": "build/index.js", "module": "build-module/index.js", "scripts": { - "build": "pnpm run clean && pnpm run compile", + "build": "pnpm clean && pnpm compile", "clean": "rm -rf ./build ./build-module", "compile": "e2e-builds", - "lint": "eslint --output-file eslint_report.json --format json --ext=js,ts,tsx src", - "lint:fix": "eslint --output-file eslint_report.json --format json --ext=js,ts,tsx src --fix", - "prepack": "pnpm run build" + "lint": "eslint --ext=js,ts,tsx src", + "lint:fix": "eslint --ext=js,ts,tsx src --fix", + "prepack": "pnpm build" }, "lint-staged": { "*.(t|j)s?(x)": [ diff --git a/packages/js/eslint-plugin/package.json b/packages/js/eslint-plugin/package.json index 33592f03ed4..d8e5c838d3a 100644 --- a/packages/js/eslint-plugin/package.json +++ b/packages/js/eslint-plugin/package.json @@ -42,8 +42,8 @@ }, "scripts": { "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint ./rules ./configs --fix", "lint:lang:js": "eslint ./rules ./configs" }, diff --git a/packages/js/experimental/package.json b/packages/js/experimental/package.json index c13129231bf..230eb3cc58d 100644 --- a/packages/js/experimental/package.json +++ b/packages/js/experimental/package.json @@ -84,19 +84,19 @@ "react-dom": "^17.0.2" }, "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:bundle": "wireit", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "lint-staged": { "*.(t|j)s?(x)": [ diff --git a/packages/js/explat/package.json b/packages/js/explat/package.json index e35e467a5b2..68a93c257d8 100644 --- a/packages/js/explat/package.json +++ b/packages/js/explat/package.json @@ -26,18 +26,18 @@ "module": "build-module/index.js", "types": "build-types", "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "lint-staged": { "*.(t|j)s?(x)": [ diff --git a/packages/js/expression-evaluation/package.json b/packages/js/expression-evaluation/package.json index d9e798ee565..465b53029d4 100644 --- a/packages/js/expression-evaluation/package.json +++ b/packages/js/expression-evaluation/package.json @@ -34,17 +34,17 @@ "access": "public" }, "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", - "watch:build": "pnpm run build:project --watch" + "lint:lang:js": "eslint src", + "prepack": "pnpm build", + "watch:build": "pnpm build:project --watch" }, "devDependencies": { "@babel/core": "^7.23.5", diff --git a/packages/js/integrate-plugin/package.json b/packages/js/integrate-plugin/package.json index 38bd21adf54..70b2462d455 100644 --- a/packages/js/integrate-plugin/package.json +++ b/packages/js/integrate-plugin/package.json @@ -28,18 +28,18 @@ "access": "public" }, "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "dependencies": { "@wordpress/create-block": "wp-6.0", diff --git a/packages/js/internal-e2e-builds/package.json b/packages/js/internal-e2e-builds/package.json index 76c173837da..9325f3b8bb9 100644 --- a/packages/js/internal-e2e-builds/package.json +++ b/packages/js/internal-e2e-builds/package.json @@ -21,8 +21,8 @@ }, "homepage": "https://github.com/woocommerce/woocommerce#readme", "scripts": { - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint build.js --fix", "lint:lang:js": "eslint build.js" }, diff --git a/packages/js/internal-js-tests/package.json b/packages/js/internal-js-tests/package.json index 93f4bd05c75..991824d8bba 100644 --- a/packages/js/internal-js-tests/package.json +++ b/packages/js/internal-js-tests/package.json @@ -21,17 +21,17 @@ "main": "build/util/index.js", "module": "build-module/util/index.js", "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", - "watch:build": "pnpm run build:project --watch" + "lint:lang:js": "eslint src", + "prepack": "pnpm build", + "watch:build": "pnpm build:project --watch" }, "dependencies": { "@testing-library/jest-dom": "5.16.2", diff --git a/packages/js/internal-style-build/package.json b/packages/js/internal-style-build/package.json index 7744ef219ab..fcb1866a91b 100644 --- a/packages/js/internal-style-build/package.json +++ b/packages/js/internal-style-build/package.json @@ -22,8 +22,8 @@ }, "main": "index.js", "scripts": { - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint index.js --fix", "lint:lang:js": "eslint index.js" }, diff --git a/packages/js/navigation/package.json b/packages/js/navigation/package.json index c2a8bfcfa72..5a78b0012ae 100644 --- a/packages/js/navigation/package.json +++ b/packages/js/navigation/package.json @@ -26,18 +26,18 @@ "types": "build-types", "react-native": "src/index", "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "lint-staged": { "*.(t|j)s?(x)": [ diff --git a/packages/js/notices/package.json b/packages/js/notices/package.json index cbc1b9949e8..362e5ff1c95 100644 --- a/packages/js/notices/package.json +++ b/packages/js/notices/package.json @@ -27,17 +27,17 @@ "types": "build-types", "react-native": "src/index", "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", - "watch:build": "pnpm run build:project --watch" + "lint:lang:js": "eslint src", + "prepack": "pnpm build", + "watch:build": "pnpm build:project --watch" }, "lint-staged": { "*.(t|j)s?(x)": [ diff --git a/packages/js/number/package.json b/packages/js/number/package.json index 28321be78c0..731640cbcb3 100644 --- a/packages/js/number/package.json +++ b/packages/js/number/package.json @@ -31,18 +31,18 @@ "access": "public" }, "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "devDependencies": { "@babel/core": "^7.23.5", diff --git a/packages/js/onboarding/package.json b/packages/js/onboarding/package.json index d70e98eed39..267a4222350 100644 --- a/packages/js/onboarding/package.json +++ b/packages/js/onboarding/package.json @@ -26,19 +26,19 @@ "types": "build-types", "react-native": "src/index", "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:bundle": "wireit", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "lint-staged": { "*.(t|j)s?(x)": [ diff --git a/packages/js/product-editor/package.json b/packages/js/product-editor/package.json index 096bd2b3308..b05039db07e 100644 --- a/packages/js/product-editor/package.json +++ b/packages/js/product-editor/package.json @@ -122,19 +122,19 @@ "wireit": "^0.14.1" }, "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:bundle": "wireit", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", + "lint:lang:js": "eslint src", + "prepack": "pnpm build", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "peerDependencies": { "@types/react": "^17.0.71", diff --git a/packages/js/tracks/package.json b/packages/js/tracks/package.json index 775f904e57e..e8433793ae0 100644 --- a/packages/js/tracks/package.json +++ b/packages/js/tracks/package.json @@ -32,17 +32,17 @@ "access": "public" }, "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:cjs": "wireit", "build:project:esm": "wireit", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:js": "eslint src --fix", - "lint:lang:js": "eslint --output-file eslint_report.json --format json src", - "prepack": "pnpm run build", - "watch:build": "pnpm run build:project --watch" + "lint:lang:js": "eslint src", + "prepack": "pnpm build", + "watch:build": "pnpm build:project --watch" }, "devDependencies": { "@babel/core": "^7.23.5", diff --git a/plugins/woo-ai/DEVELOPMENT.md b/plugins/woo-ai/DEVELOPMENT.md index 7bceb6726da..a05384e3df6 100644 --- a/plugins/woo-ai/DEVELOPMENT.md +++ b/plugins/woo-ai/DEVELOPMENT.md @@ -28,21 +28,21 @@ To enable Live(Hot) Reload when code is changed, run the following commands: ```text pnpm install -pnpm run start +pnpm start ``` To build the /woo-ai/ plugin directory (when loading the plugin via symlink), run: ```text pnpm install -pnpm run build +pnpm build ``` To build the plugin ZIP file, run: ```text pnpm install -pnpm run build:zip +pnpm build:zip ``` See [wp-scripts](https://github.com/WordPress/gutenberg/tree/master/packages/scripts) for more usage information. diff --git a/plugins/woo-ai/package.json b/plugins/woo-ai/package.json index dbc006c002f..8d7b07fd4cb 100644 --- a/plugins/woo-ai/package.json +++ b/plugins/woo-ai/package.json @@ -31,9 +31,9 @@ "wireit": "^0.14.1" }, "scripts": { - "build": "pnpm run build:admin && pnpm run uglify", + "build": "pnpm build:admin && pnpm uglify", "build:admin": "wp-scripts build", - "build:dev": "pnpm run lint:js && pnpm run build", + "build:dev": "pnpm lint:js && pnpm build", "build:zip": "./bin/build-zip.sh", "changelog": "composer exec -- changelogger", "check-engines": "wp-scripts check-engines", diff --git a/plugins/woocommerce-admin/bin/hook-reference/README.md b/plugins/woocommerce-admin/bin/hook-reference/README.md index 3ad83aafd51..30b19c00798 100644 --- a/plugins/woocommerce-admin/bin/hook-reference/README.md +++ b/plugins/woocommerce-admin/bin/hook-reference/README.md @@ -7,7 +7,7 @@ Compile a publishable JSON object of WooCommerce's JavaScript filters and slotFi Generate a new reference found at `bin/hook-reference/data.json` by running the following command. ``` -pnpm run create-hook-reference +pnpm create-hook-reference ``` The data includes references to code in the Github repository by commit hash, so it is essential to commit the resulting data in a pull request to `main` so code references are publicly available. diff --git a/plugins/woocommerce-admin/package.json b/plugins/woocommerce-admin/package.json index d3cb2a2a0d7..3977da2be59 100644 --- a/plugins/woocommerce-admin/package.json +++ b/plugins/woocommerce-admin/package.json @@ -13,49 +13,19 @@ "build" ], "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:bundle": "wireit", "build:project:feature-config": "php ../woocommerce/bin/generate-feature-config.php", "changelog": "composer install && composer exec -- changelogger", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:css": "stylelint '**/*.scss' --fix --ip 'storybook/wordpress'", - "lint:fix:lang:js": "pnpm run lint:js --fix --ext=js,ts,tsx", + "lint:fix:lang:js": "pnpm lint:js --fix --ext=js,ts,tsx", "lint:lang:css": "stylelint '**/*.scss'", "lint:lang:js": "eslint ./client --ext=js,ts,tsx", "test:js": "wireit", - "watch:build": "pnpm run build:project --watch", - "analyze": "cross-env NODE_ENV=production ANALYZE=true webpack", - "build:feature-config": "php ../woocommerce/bin/generate-feature-config.php", - "clean": "rimraf ../woocommerce/assets/client/admin/*", - "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", - "create-wc-extension": "pnpm -w run create-extension", - "dev": "cross-env WC_ADMIN_PHASE=development pnpm run build:feature-config && cross-env WC_ADMIN_PHASE=development pnpm -w run build --filter='./packages/js/*' && cross-env WC_ADMIN_PHASE=development webpack", - "example": "webpack --config docs/examples/extensions/examples.config.js --watch", - "preinstall": "npx only-allow pnpm", - "lint:css": "stylelint '**/*.scss'", - "lint:css-fix": "stylelint '**/*.scss' --fix --ip 'storybook/wordpress'", - "lint:js": "eslint ./client --ext=js,ts,tsx", - "lint:js-fix": "pnpm run lint:js --fix --ext=js,ts,tsx", - "lint:js-packages": "eslint ../../packages/js --ext=js,ts,tsx", - "lint:js-pre-commit": "eslint --ext=js,ts,tsx", - "packages:fix:textdomain": "node ./bin/package-update-textdomain.js", - "packages:build": "pnpm run:packages -- build", - "packages:watch": "pnpm run:packages -- start", - "run:packages": "pnpm run --parallel --filter='../../packages/js/**'", - "prestart": "pnpm packages:build && cross-env WC_ADMIN_PHASE=development pnpm run build:feature-config", - "start": "concurrently \"cross-env WC_ADMIN_PHASE=development webpack --watch\" \"cross-env WC_ADMIN_PHASE=development pnpm packages:watch\"", - "start:hot": "pnpm prestart && concurrently \"cross-env HOT=true WC_ADMIN_PHASE=development webpack serve\" \"cross-env WC_ADMIN_PHASE=development pnpm packages:watch\"", - "test-staged": "pnpm run test:client --bail --findRelatedTests", - "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: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 --project tsconfig.json --pretty", - "ts:check:watch": "npm run ts:check -- --watch" + "watch:build": "pnpm build:project --watch" }, "lint-staged": { "*.scss": [ diff --git a/plugins/woocommerce-beta-tester/package.json b/plugins/woocommerce-beta-tester/package.json index 5a8cd5d10e6..549d1c69d6a 100644 --- a/plugins/woocommerce-beta-tester/package.json +++ b/plugins/woocommerce-beta-tester/package.json @@ -63,29 +63,29 @@ "build_step": "pnpm run build:zip" }, "scripts": { - "postinstall": "composer install", - "build": "pnpm run build:admin && pnpm run uglify", + "build": "pnpm build:admin && pnpm uglify", "build:admin": "wp-scripts build", - "build:dev": "pnpm run lint:js && pnpm run build", + "build:dev": "pnpm lint:js && pnpm build", "build:zip": "./bin/build-zip.sh", "changelog": "composer exec -- changelogger", - "uglify": "rm -f $npm_package_assets_js_min && for f in $npm_package_assets_js_js; do file=${f%.js}; node_modules/.bin/uglifyjs $f -c -m > $file.min.js; done", "check-engines": "wp-scripts check-engines", "check-licenses": "wp-scripts check-licenses", "format:js": "wp-scripts format-js", + "postinstall": "composer install", "lint:css": "wp-scripts lint-style", "lint:css:fix": "wp-scripts lint-style --fix", - "lint:php": "composer run-script phpcs", - "lint:php:fix": "composer run-script phpcbf", "lint:js": "wp-scripts lint-js", "lint:js:fix": "wp-scripts lint-js --fix", "lint:md:docs": "wp-scripts lint-md-docs", "lint:md:js": "wp-scripts lint-md-js", + "lint:php": "composer run-script phpcs", + "lint:php:fix": "composer run-script phpcbf", "lint:pkg-json": "wp-scripts lint-pkg-json", "packages-update": "wp-scripts packages-update", "start": "wp-scripts start", "test:e2e": "wp-scripts test-e2e", - "test:unit": "wp-scripts test-unit-js" + "test:unit": "wp-scripts test-unit-js", + "uglify": "rm -f $npm_package_assets_js_min && for f in $npm_package_assets_js_js; do file=${f%.js}; node_modules/.bin/uglifyjs $f -c -m > $file.min.js; done" }, "engines": { "node": "^16.14.1", diff --git a/plugins/woocommerce/bin/generate-feature-config.php b/plugins/woocommerce/bin/generate-feature-config.php index ffe637c880b..33e1c331d3f 100644 --- a/plugins/woocommerce/bin/generate-feature-config.php +++ b/plugins/woocommerce/bin/generate-feature-config.php @@ -14,7 +14,7 @@ $phase = getenv( 'WC_ADMIN_PHASE' ); if ( ! in_array( $phase, array( 'development', 'core' ), true ) ) { - $phase = 'core'; // Default to core when running `pnpm run build`. + $phase = 'core'; // Default to core when running `pnpm build`. } $config_json = file_get_contents( __DIR__ . '/../client/admin/config/' . $phase . '.json' ); $config = json_decode( $config_json ); diff --git a/plugins/woocommerce/bin/package-update.sh b/plugins/woocommerce/bin/package-update.sh index 40422b2586d..e3b64007858 100755 --- a/plugins/woocommerce/bin/package-update.sh +++ b/plugins/woocommerce/bin/package-update.sh @@ -30,7 +30,7 @@ if [ -z "$SKIP_UPDATE_TEXTDOMAINS" ]; then output 3 "Updating package PHP textdomains..." # Replace text domains within packages with woocommerce - pnpm run packages:fix:textdomain + pnpm packages:fix:textdomain output 2 "Done!" output 3 "Updating package JS textdomains..." diff --git a/plugins/woocommerce/client/legacy/package.json b/plugins/woocommerce/client/legacy/package.json index 7008449ebcb..b51937fc9ed 100644 --- a/plugins/woocommerce/client/legacy/package.json +++ b/plugins/woocommerce/client/legacy/package.json @@ -9,12 +9,12 @@ "build" ], "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", - "build:project": "pnpm --if-present run /^build:project:.*$/", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", + "build:project": "pnpm --if-present /^build:project:.*$/", "build:project:assets": "wireit", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", - "watch:build": "pnpm run build:project --watch" + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", + "watch:build": "pnpm build:project --watch" }, "devDependencies": { "@types/node": "^16.18.68", diff --git a/plugins/woocommerce/package.json b/plugins/woocommerce/package.json index 83aceae9b91..c8ad4bd79f7 100644 --- a/plugins/woocommerce/package.json +++ b/plugins/woocommerce/package.json @@ -10,7 +10,7 @@ }, "license": "GPL-3.0+", "scripts": { - "build": "pnpm --if-present --filter=\"$npm_package_name...\" run build:project", + "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project", "build:project": "wireit", "build:zip": "./bin/build-zip.sh", "changelog": "composer exec -- changelogger", @@ -27,12 +27,12 @@ "env:restart": "pnpm wp-env destroy && pnpm wp-env start --update", "env:start": "pnpm wp-env start", "env:stop": "pnpm wp-env stop", - "env:test": "WP_ENV_LIFECYCLE_SCRIPT_AFTER_START='./tests/e2e-pw/bin/test-env-setup.sh' && pnpm run env:dev", - "env:test:cot": "WP_ENV_LIFECYCLE_SCRIPT_AFTER_START='ENABLE_HPOS=1 ./tests/e2e-pw/bin/test-env-setup.sh' && ENABLE_HPOS=1 pnpm run env:dev", + "env:test": "WP_ENV_LIFECYCLE_SCRIPT_AFTER_START='./tests/e2e-pw/bin/test-env-setup.sh' && pnpm env:dev", + "env:test:cot": "WP_ENV_LIFECYCLE_SCRIPT_AFTER_START='ENABLE_HPOS=1 ./tests/e2e-pw/bin/test-env-setup.sh' && ENABLE_HPOS=1 pnpm env:dev", "preinstall": "npx only-allow pnpm", "postinstall": "composer install", - "lint": "pnpm --if-present run '/^lint:lang:.*$/'", - "lint:fix": "pnpm --if-present run '/^lint:fix:lang:.*$/'", + "lint": "pnpm --if-present '/^lint:lang:.*$/'", + "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'", "lint:fix:lang:php": "composer run-script phpcbf", "lint:lang:php": "composer run-script phpcs", "lint:php": "composer run-script phpcs", @@ -53,7 +53,7 @@ "test:unit": "pnpm test:php", "test:unit:env": "pnpm test:php:env", "update-wp-env": "php ./tests/e2e-pw/bin/update-wp-env.php", - "watch:build": "pnpm run build:project --watch" + "watch:build": "pnpm build:project --watch" }, "lint-staged": { "*.php": [ @@ -66,7 +66,7 @@ }, "config": { "wp_org_slug": "woocommerce", - "build_step": "pnpm run build:zip", + "build_step": "pnpm build:zip", "ci": { "name": "WP: latest", "customCommands": { diff --git a/plugins/woocommerce/tests/e2e/README.md b/plugins/woocommerce/tests/e2e/README.md index 9fb50c76fb5..0eb955bada6 100644 --- a/plugins/woocommerce/tests/e2e/README.md +++ b/plugins/woocommerce/tests/e2e/README.md @@ -159,7 +159,7 @@ Note that running `pnpm docker:down --filter=@woocommerce/plugin-woocommerce` an To run e2e tests in headless mode use the following command: ```bash -pnpm run e2e --filter=@woocommerce/plugin-woocommerce +pnpm e2e --filter=@woocommerce/plugin-woocommerce ``` ### How to run tests in non-headless mode @@ -167,7 +167,7 @@ pnpm run e2e --filter=@woocommerce/plugin-woocommerce Tests run in headless mode by default. However, sometimes it's useful to observe the browser while running or developing tests. To do so, you can run tests in a non-headless (dev) mode: ```bash -pnpm run e2e:dev --filter=@woocommerce/plugin-woocommerce +pnpm e2e:dev --filter=@woocommerce/plugin-woocommerce ``` The dev mode also enables SlowMo mode. SlowMo slows down Puppeteer’s operations. This makes it easier to see what is happening in the browser. @@ -175,7 +175,7 @@ The dev mode also enables SlowMo mode. SlowMo slows down Puppeteer’s operation By default, SlowMo mode adds a 50 millisecond delay between test steps. If you'd like to override the length of the delay and have the tests run faster or slower in the `-dev` mode, pass `PUPPETEER_SLOWMO` variable when running tests as shown below: ``` -PUPPETEER_SLOWMO=10 pnpm run e2e:dev --filter=@woocommerce/plugin-woocommerce +PUPPETEER_SLOWMO=10 pnpm e2e:dev --filter=@woocommerce/plugin-woocommerce ``` The faster you want the tests to run, the lower the value should be of `PUPPETEER_SLOWMO` should be. @@ -199,7 +199,7 @@ E2E_RETRY_TIMES=2 pnpm exec wc-e2e test:e2e Tests run in headless mode by default. While writing tests it may be useful to have the debugger loaded while running a test in non-headless mode. To run tests in debug mode: ```bash -pnpm run e2e:debug --filter=@woocommerce/plugin-woocommerce +pnpm e2e:debug --filter=@woocommerce/plugin-woocommerce ``` When all tests have been completed the debugger remains active. Control doesn't return to the command line until the debugger is closed. Otherwise, debug mode functions the same as non-headless mode. @@ -378,6 +378,6 @@ The [WooCommerce E2E Tests Boilerplate repo](https://github.com/woocommerce/wooc ## Debugging tests -The test sequencer (`pnpm run e2e --filter=@woocommerce/plugin-woocommerce`) includes support for saving [screenshots on test errors](https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/e2e-environment#test-screenshots) which can be sent to a Slack channel via a [Slackbot](https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/e2e-environment#slackbot-setup). +The test sequencer (`pnpm e2e --filter=@woocommerce/plugin-woocommerce`) includes support for saving [screenshots on test errors](https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/e2e-environment#test-screenshots) which can be sent to a Slack channel via a [Slackbot](https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/e2e-environment#slackbot-setup). For Puppeteer debugging, follow [Google's documentation](https://developers.google.com/web/tools/puppeteer/debugging). diff --git a/plugins/woocommerce/tests/performance/README.md b/plugins/woocommerce/tests/performance/README.md index 70d2d765a6d..659003bc54d 100644 --- a/plugins/woocommerce/tests/performance/README.md +++ b/plugins/woocommerce/tests/performance/README.md @@ -57,8 +57,8 @@ Before using the tests a test environment is needed to run against. We first spin up an environment using `wp-env` and configure that environment with the necessary plugins and data using the Initialization Script [`init-sample-products.sh`](https://github.com/woocommerce/woocommerce/tree/trunk/plugins/woocommerce/tests/performance/bin/init-sample-products.sh) that will set up a shop with sample products imported and the shop settings (payment method, permalinks, address etc) needed for the tests already set. It is recommended using this to just see the tests in action. ```sh -pnpm run env:dev --filter=@woocommerce/plugin-woocommerce -pnpm run env:performance-init --filter=@woocommerce/plugin-woocommerce +pnpm env:dev --filter=@woocommerce/plugin-woocommerce +pnpm env:performance-init --filter=@woocommerce/plugin-woocommerce ``` If using a different environment the details can be changed in `config.js`. diff --git a/tools/code-analyzer/README.md b/tools/code-analyzer/README.md index cf5c98dae08..bda687da59d 100644 --- a/tools/code-analyzer/README.md +++ b/tools/code-analyzer/README.md @@ -16,7 +16,7 @@ Here is an example `analyzer` command, run from this directory: In this command we compare the `release/6.7` and `release/6.8` branches to find differences, and we're looking for changes introduced since `6.8.0` (using the `@since` tag). -To find out more about the other arguments to the command you can run `pnpm run analyzer -- --help` +To find out more about the other arguments to the command you can run `pnpm analyzer -- --help` 2. `major-minor`. This simple CLI tool gives you the latest `.0` major/minor released version of a plugin's mainfile based on Woo release conventions. diff --git a/tools/code-analyzer/src/lib/__tests__/fixtures/diff.txt b/tools/code-analyzer/src/lib/__tests__/fixtures/diff.txt index 5be564df04a..188fc34debd 100644 --- a/tools/code-analyzer/src/lib/__tests__/fixtures/diff.txt +++ b/tools/code-analyzer/src/lib/__tests__/fixtures/diff.txt @@ -965,7 +965,7 @@ index 99b4cbaff3..b8304993ff 100644 @@ -20,7 +20,8 @@ "git:update-hooks": "rm -r .git/hooks && mkdir -p .git/hooks && husky install", "storybook": "./tools/storybook/import-wp-css-storybook.sh && BABEL_ENV=storybook STORYBOOK=true start-storybook -c ./tools/storybook/.storybook -p 6007 --ci", - "storybook-rtl": "USE_RTL_STYLE=true pnpm run storybook", + "storybook-rtl": "USE_RTL_STYLE=true pnpm storybook", - "create-extension": "node ./tools/create-extension/index.js" + "create-extension": "node ./tools/create-extension/index.js", + "cherry-pick": "node ./tools/cherry-pick/bin/run" @@ -1148,7 +1148,7 @@ index 8ac33e230f..924001b401 100644 - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix", - "prepack": "pnpm run clean && pnpm run build" + "prepack": "pnpm clean && pnpm build" }, diff --git a/packages/js/admin-e2e-tests/src/fixtures/reset.ts b/packages/js/admin-e2e-tests/src/fixtures/reset.ts index c7cc5d07c2..594bba9447 100644 @@ -2552,9 +2552,9 @@ index 198eaf1da4..d085d34e04 100644 "changelog": "composer exec -- changelogger", "clean": "rm -rf ./dist ./tsconfig.tsbuildinfo", "compile": "tsc -b", -- "build": "pnpm run clean && npm run compile", -+ "build": "node ./node_modules/require-turbo && pnpm run clean && npm run compile", - "prepack": "pnpm run build", +- "build": "pnpm clean && npm run compile", ++ "build": "node ./node_modules/require-turbo && pnpm clean && npm run compile", + "prepack": "pnpm build", - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix", @@ -2776,19 +2776,19 @@ index ea6075e85a..2fd271b525 100644 - "postinstall": "composer install", + "prepare": "composer install", "changelog": "composer exec -- changelogger", -- "build": "pnpm run build:js && pnpm run build:css", -+ "build": "node ./node_modules/require-turbo && pnpm run build:js && pnpm run build:css", +- "build": "pnpm build:js && pnpm build:css", ++ "build": "node ./node_modules/require-turbo && pnpm build:js && pnpm build:css", "build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "build:css": "webpack", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", - "lint": "eslint src --ext=js,ts,tsx", + "lint": "node ./node_modules/require-turbo && eslint src --ext=js,ts,tsx", "lint:fix": "eslint src --ext=js,ts,tsx --fix", - "prepack": "pnpm run clean && pnpm run build", + "prepack": "pnpm clean && pnpm build", "start": "concurrently \"tsc --build ./tsconfig.json --watch\" \"webpack --watch\"", - "test": "jest --config ./jest.config.json", + "test": "node ./node_modules/require-turbo && jest --config ./jest.config.json", - "test:update-snapshots": "pnpm run test -- --updateSnapshot", + "test:update-snapshots": "pnpm test -- --updateSnapshot", "test-staged": "jest --bail --config ./jest.config.json --findRelatedTests" }, diff --git a/packages/js/components/src/advanced-filters/number-filter.js b/packages/js/components/src/advanced-filters/number-filter.js @@ -5658,7 +5658,7 @@ index 95495e5704..0be79e99d1 100644 - "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", + "build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", - "prepack": "pnpm run clean && pnpm run build", + "prepack": "pnpm clean && pnpm build", - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix", @@ -5828,7 +5828,7 @@ index fa7a005989..d345c7c650 100644 - "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", + "build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", - "prepack": "pnpm run clean && pnpm run build", + "prepack": "pnpm clean && pnpm build", - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix", @@ -6019,12 +6019,12 @@ index 6fca5bcfad..fa98da90ca 100644 + "prepare": "composer install", "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", -- "build": "pnpm run build:js && pnpm run build:css", -+ "build": "node ./node_modules/require-turbo && pnpm run build:js && pnpm run build:css", +- "build": "pnpm build:js && pnpm build:css", ++ "build": "node ./node_modules/require-turbo && pnpm build:js && pnpm build:css", "build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "build:css": "webpack", "start": "concurrently \"tsc --build --watch\" \"webpack --watch\"", - "prepack": "pnpm run clean && pnpm run build", + "prepack": "pnpm clean && pnpm build", - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix", @@ -6258,7 +6258,7 @@ index f48317de96..a54c8d20dc 100644 - "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", + "build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", - "prepack": "pnpm run clean && pnpm run build", + "prepack": "pnpm clean && pnpm build", - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix", @@ -9984,7 +9984,7 @@ index 95332d773e..04cae8d409 100644 - "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", + "build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", - "prepack": "pnpm run clean && pnpm run build", + "prepack": "pnpm clean && pnpm build", - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix", @@ -13641,12 +13641,12 @@ index 9473aafe90..65fa856783 100644 + "prepare": "composer install", "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", -- "build": "pnpm run build:js && pnpm run build:css", -+ "build": "node ./node_modules/require-turbo && pnpm run build:js && pnpm run build:css", +- "build": "pnpm build:js && pnpm build:css", ++ "build": "node ./node_modules/require-turbo && pnpm build:js && pnpm build:css", "build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "build:css": "webpack", "start": "concurrently \"tsc --build --watch\" \"webpack --watch\"", - "prepack": "pnpm run clean && pnpm run build", + "prepack": "pnpm clean && pnpm build", - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix", @@ -13882,7 +13882,7 @@ index f6b8445735..9ffa693eb9 100644 - "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", + "build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", - "prepack": "pnpm run clean && pnpm run build", + "prepack": "pnpm clean && pnpm build", - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix", @@ -14231,7 +14231,7 @@ index 7a0c3d89a4..2de6535838 100644 + "build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json", "ts:check": "tsc --noEmit --project ./tsconfig.json", "clean": "pnpm exec rimraf *.tsbuildinfo build build-*", - "prepack": "pnpm run clean && pnpm run build", + "prepack": "pnpm clean && pnpm build", - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix" @@ -14443,7 +14443,7 @@ index c03f52779c..c613d8b175 100644 - "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", + "build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", - "prepack": "pnpm run clean && pnpm run build", + "prepack": "pnpm clean && pnpm build", - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix", @@ -14510,7 +14510,7 @@ index e019f5a245..c12e93bb11 100644 - "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", + "build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", - "prepack": "pnpm run clean && pnpm run build", + "prepack": "pnpm clean && pnpm build", - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix" @@ -14743,7 +14743,7 @@ index 08ff35b9c8..875c2b3697 100644 - "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", + "build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", - "prepack": "pnpm run clean && pnpm run build", + "prepack": "pnpm clean && pnpm build", - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix", @@ -14928,12 +14928,12 @@ index 787aa626ec..7bd577f1c0 100644 + "prepare": "composer install", "changelog": "composer exec -- changelogger", "clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", -- "build": "pnpm run build:js && pnpm run build:css", -+ "build": "node ./node_modules/require-turbo && pnpm run build:js && pnpm run build:css", +- "build": "pnpm build:js && pnpm build:css", ++ "build": "node ./node_modules/require-turbo && pnpm build:js && pnpm build:css", "build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", "build:css": "webpack", "start": "concurrently \"tsc --build --watch\" \"webpack --watch\"", - "prepack": "pnpm run clean && pnpm run build", + "prepack": "pnpm clean && pnpm build", - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix" @@ -16269,7 +16269,7 @@ index a3a3230e93..12094a3bc3 100644 - "build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json", + "build": "node ./node_modules/require-turbo && tsc --build ./tsconfig.json ./tsconfig-cjs.json", "start": "tsc --build --watch", - "prepack": "pnpm run clean && pnpm run build", + "prepack": "pnpm clean && pnpm build", - "lint": "eslint src", + "lint": "node ./node_modules/require-turbo && eslint src", "lint:fix": "eslint src --fix" @@ -23305,47 +23305,47 @@ index fcc67ba38a..5d959e3d34 100644 }, "scripts": { "analyze": "cross-env NODE_ENV=production ANALYZE=true webpack", -- "build": "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": "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": "pnpm install-if-deps-outdated && pnpm clean && WC_ADMIN_PHASE=core pnpm build:packages && WC_ADMIN_PHASE=core pnpm build:feature-config && cross-env NODE_ENV=production WC_ADMIN_PHASE=core webpack", ++ "build": "node ./node_modules/require-turbo && pnpm install-if-deps-outdated && pnpm clean && WC_ADMIN_PHASE=core pnpm build:packages && WC_ADMIN_PHASE=core pnpm 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", + "client:watch": "cross-env WC_ADMIN_PHASE=development pnpm build:feature-config && cross-env WC_ADMIN_PHASE=development webpack --watch", "create-hook-reference": "node ./bin/hook-reference/index.js", @@ -22,14 +22,14 @@ "preinstall": "npx only-allow pnpm", "install-if-deps-outdated": "node bin/install-if-deps-outdated.js", "install-if-no-packages": "node bin/install-if-no-packages.js", -- "lint": "pnpm run lint:js && pnpm run lint:css", -+ "lint": "node ./node_modules/require-turbo && pnpm run lint:js && pnpm run lint:css", +- "lint": "pnpm lint:js && pnpm lint:css", ++ "lint": "node ./node_modules/require-turbo && pnpm lint:js && pnpm lint:css", "lint:fix": "pnpm lint:js-fix && pnpm lint:css-fix", "lint:css": "stylelint '**/*.scss'", "lint:css-fix": "stylelint '**/*.scss' --fix --ip 'storybook/wordpress'", - "lint:js": "wp-scripts lint-js ./client --ext=js,ts,tsx", + "lint:js": "eslint ./client --ext=js,ts,tsx", - "lint:js-fix": "pnpm run lint:js -- --fix --ext=js,ts,tsx", + "lint:js-fix": "pnpm lint:js -- --fix --ext=js,ts,tsx", - "lint:js-packages": "wp-scripts lint-js ../../packages/js --ext=js,ts,tsx", - "lint:js-pre-commit": "wp-scripts lint-js --ext=js,ts,tsx", + "lint:js-packages": "eslint ../../packages/js --ext=js,ts,tsx", + "lint:js-pre-commit": "eslint --ext=js,ts,tsx", - "prepack": "pnpm install && pnpm run lint && pnpm run test && cross-env WC_ADMIN_PHASE=core pnpm run build", + "prepack": "pnpm install && pnpm lint && pnpm test && cross-env WC_ADMIN_PHASE=core pnpm build", "packages:fix:textdomain": "node ./bin/package-update-textdomain.js", "packages:watch": "cross-env WC_ADMIN_PHASE=development pnpm run:packages -- start --parallel", @@ -42,12 +42,12 @@ - "start": "pnpm run install-if-deps-outdated && cross-env WC_ADMIN_PHASE=development pnpm run build:packages && cross-env WC_ADMIN_PHASE=development pnpm run build:feature-config && concurrently \"cross-env WC_ADMIN_PHASE=development webpack --watch\" \"cross-env WC_ADMIN_PHASE=development pnpm run:packages -- start --parallel\"", + "start": "pnpm install-if-deps-outdated && cross-env WC_ADMIN_PHASE=development pnpm build:packages && cross-env WC_ADMIN_PHASE=development pnpm build:feature-config && concurrently \"cross-env WC_ADMIN_PHASE=development webpack --watch\" \"cross-env WC_ADMIN_PHASE=development pnpm run:packages -- start --parallel\"", "start:package": "pnpm run:packages -- start --parallel", - "pretest": "pnpm run -s install-if-no-packages", -- "test": "pnpm run test:client", -+ "test": "node ./node_modules/require-turbo && pnpm run test:client", - "test-staged": "pnpm run test:client -- --bail --findRelatedTests", + "pretest": "pnpm -s install-if-no-packages", +- "test": "pnpm test:client", ++ "test": "node ./node_modules/require-turbo && pnpm test:client", + "test-staged": "pnpm test:client -- --bail --findRelatedTests", "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 --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", + "test:update-snapshots": "pnpm test:client -- --updateSnapshot && pnpm --filter @woocommerce/components test:update-snapshots", + "test:watch": "pnpm test:client -- --watch", "ts:check": "tsc --build ./tsconfig.json --pretty", @@ -204,6 +204,7 @@ "raw-loader": "^4.0.2", @@ -23436,7 +23436,7 @@ index d3523fce96..b580ff8c87 100755 echo "Installing PHP and JS dependencies..." pnpm install echo "Running JS Build..." --pnpm run build +-pnpm build +pnpm -w exec turbo run build --filter=woocommerce-beta-tester || exit "$?" echo "Syncing files..." @@ -23881,7 +23881,7 @@ index 227f668ec7..4570ee348a 100644 + "version": "2.1.0", "homepage": "http://github.com/woocommerce/woocommerce-beta-tester", - "config": { -- "build_step": "pnpm run build:zip" +- "build_step": "pnpm build:zip" - }, "devDependencies": { "@woocommerce/dependency-extraction-webpack-plugin": "workspace:*", @@ -23897,18 +23897,18 @@ index 227f668ec7..4570ee348a 100644 "scripts": { "postinstall": "composer install", "changelog": "composer exec -- changelogger", -- "build": "pnpm run build:admin && pnpm run uglify", -+ "build": "node ./node_modules/require-turbo && pnpm run build:admin && pnpm run uglify", +- "build": "pnpm build:admin && pnpm uglify", ++ "build": "node ./node_modules/require-turbo && pnpm build:admin && pnpm uglify", "build:admin": "wp-scripts build", "build:zip": "./bin/build-zip.sh", - "build:dev": "pnpm run lint:js && pnpm run build", + "build:dev": "pnpm lint:js && pnpm build", @@ -66,12 +64,13 @@ }, "woorelease": { "svn_reauth": "true", - "wp_org_slug": "woocommerce-beta-tester" + "wp_org_slug": "woocommerce-beta-tester", -+ "build_step": "pnpm run build:zip" ++ "build_step": "pnpm build:zip" }, "lint-staged": { "*.php": [ @@ -33961,8 +33961,8 @@ index ce20f1478b..b77d6042ab 100644 "preinstall": "npx only-allow pnpm", "postinstall": "composer install", "changelog": "composer exec -- changelogger", -- "build": "WC_ADMIN_PHASE=core pnpm run build:feature-config", -+ "build": "node ./node_modules/require-turbo && WC_ADMIN_PHASE=core pnpm run build:feature-config", +- "build": "WC_ADMIN_PHASE=core pnpm build:feature-config", ++ "build": "node ./node_modules/require-turbo && WC_ADMIN_PHASE=core pnpm build:feature-config", "build:feature-config": "php bin/generate-feature-config.php", "build:zip": "./bin/build-zip.sh", - "lint": "pnpm lint:js && pnpm lint:php", diff --git a/tools/create-extension/README.md b/tools/create-extension/README.md index 8c8e64d835a..a53c89e6399 100644 --- a/tools/create-extension/README.md +++ b/tools/create-extension/README.md @@ -11,7 +11,7 @@ Scaffold a modern JavaScript WordPress plugin with WooCommerce tooling. ### Usage ``` -pnpm run create-extension +pnpm create-extension ``` The script will create a sibling directory by a name of your choosing. Once you change directories into the new folder, install dependencies and start a development build. diff --git a/tools/monorepo-utils/package.json b/tools/monorepo-utils/package.json index 914b0e7ac93..83fd034dd9c 100644 --- a/tools/monorepo-utils/package.json +++ b/tools/monorepo-utils/package.json @@ -10,7 +10,7 @@ "types": "dist/index.d.ts", "scripts": { "build": "tsc", - "postinstall": "pnpm run build", + "postinstall": "pnpm build", "lint": "eslint . --ext .ts", "start": "tsc --watch", "test": "pnpm test:js", diff --git a/tools/release-posts/README.md b/tools/release-posts/README.md index 18023f61a65..c9bd55b86a8 100644 --- a/tools/release-posts/README.md +++ b/tools/release-posts/README.md @@ -12,8 +12,8 @@ don't have access to a WordPress.com auth token. 2. Make sure you have added a `.env` file with the env variables set. WCCOM_TOKEN is optional if you're using `--outputOnly`, but the `GITHUB_ACCESS_TOKEN` is required. If you need help generating a token see [the docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). To silence all CLI output, set `LOGGER_LEVEL` to `"silent"`. 3. Note that the env file should live at the same path that you're running the command from. -4. Run the tool via the npm script, e.g. `pnpm run release-post release "6.8.0" --outputOnly` -5. For more help on individual options, run the help `pnpm run release-post --help`. e.g. `pnpm run release-post rc --help` +4. Run the tool via the npm script, e.g. `pnpm release-post release "6.8.0" --outputOnly` +5. For more help on individual options, run the help `pnpm release-post --help`. e.g. `pnpm release-post rc --help` ## Publishing Draft Posts @@ -37,7 +37,7 @@ This tool will publish draft posts to `https://developer.woo.com` for you if you If you don't have a final release yet you can generate an HTML contributors list that you can copy paste into a blank post. -To do that simply run `pnpm run release-post contributors "" ""` +To do that simply run `pnpm release-post contributors "" ""` ## Advanced diff --git a/tools/storybook/package.json b/tools/storybook/package.json index bc96f2044bd..5847e9a178f 100644 --- a/tools/storybook/package.json +++ b/tools/storybook/package.json @@ -14,8 +14,8 @@ "build-storybook": "build-storybook -c ./.storybook", "build-woocommerce": "pnpm --filter=@woocommerce/plugin-woocommerce build", "preinstall": "npx only-allow pnpm", - "storybook": "pnpm run build-woocommerce && ./import-wp-css-storybook.sh && BABEL_ENV=storybook STORYBOOK=true start-storybook -c ./.storybook -p 6007 --ci", - "storybook-rtl": "USE_RTL_STYLE=true pnpm run storybook" + "storybook": "pnpm build-woocommerce && ./import-wp-css-storybook.sh && BABEL_ENV=storybook STORYBOOK=true start-storybook -c ./.storybook -p 6007 --ci", + "storybook-rtl": "USE_RTL_STYLE=true pnpm storybook" }, "engines": { "node": "^16.14.1",