Removed Unnecessary `run` From `pnpm`

This commit is contained in:
Christopher Allford 2023-11-28 14:50:43 -08:00
parent e9484c33f4
commit fa011a431b
58 changed files with 296 additions and 326 deletions

View File

@ -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'

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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.

View File

@ -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)": [

View File

@ -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",

View File

@ -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",

View File

@ -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)": [

View File

@ -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:*",

View File

@ -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)": [

View File

@ -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",

View File

@ -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)": [

View File

@ -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)": [

View File

@ -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)": [

View File

@ -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)": [

View File

@ -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"
},

View File

@ -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)": [

View File

@ -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

View File

@ -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"

View File

@ -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)": [

View File

@ -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"
},

View File

@ -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)": [

View File

@ -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)": [

View File

@ -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",

View File

@ -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",

View File

@ -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"
},

View File

@ -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",

View File

@ -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"
},

View File

@ -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)": [

View File

@ -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)": [

View File

@ -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",

View File

@ -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)": [

View File

@ -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",

View File

@ -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",

View File

@ -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.

View File

@ -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",

View File

@ -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.

View File

@ -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": [

View File

@ -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",

View File

@ -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 );

View File

@ -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..."

View File

@ -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",

View File

@ -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": {

View File

@ -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 Puppeteers 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 Puppeteers 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).

View File

@ -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`.

View File

@ -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.

View File

@ -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",

View File

@ -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.

View File

@ -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",

View File

@ -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 <command> --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 <command> --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 "<currentVersion>" "<previousVersion>"`
To do that simply run `pnpm release-post contributors "<currentVersion>" "<previousVersion>"`
## Advanced

View File

@ -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",