diff --git a/.github/actions/setup-woocommerce-monorepo/action.yml b/.github/actions/setup-woocommerce-monorepo/action.yml index 037794d8631..ff077909f57 100644 --- a/.github/actions/setup-woocommerce-monorepo/action.yml +++ b/.github/actions/setup-woocommerce-monorepo/action.yml @@ -1,5 +1,6 @@ name: Setup WooCommerce Monorepo description: Handles the installation, building, and caching of the projects within the monorepo. +permissions: {} inputs: install-filters: diff --git a/.github/workflows/build-release-zip-file.yml b/.github/workflows/build-release-zip-file.yml index c1cc55eb04d..f07d234fc40 100644 --- a/.github/workflows/build-release-zip-file.yml +++ b/.github/workflows/build-release-zip-file.yml @@ -6,10 +6,15 @@ on: description: 'By default the zip file is generated from the branch the workflow runs from, but you can specify an explicit reference to use instead here (e.g. refs/tags/tag_name or refs/heads/release/x.x). The resulting file will be available as an artifact on the workflow run.' required: false default: '' + +permissions: {} + jobs: build: name: Build release zip file runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index ba2b99d4814..5c02d361b52 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -2,10 +2,15 @@ name: Build release asset on: release: types: [published] + +permissions: {} + jobs: build: name: Build release asset runs-on: ubuntu-20.04 + permissions: + contents: write steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/cherry-pick.yml b/.github/workflows/cherry-pick.yml index 312ff9d6dcb..280a3268b57 100644 --- a/.github/workflows/cherry-pick.yml +++ b/.github/workflows/cherry-pick.yml @@ -30,6 +30,8 @@ env: GIT_AUTHOR_NAME: 'WooCommerce Bot' GIT_AUTHOR_EMAIL: 'no-reply@woocommerce.com' +permissions: {} + jobs: verify: name: Verify @@ -122,6 +124,10 @@ jobs: cherry-pick-run: name: Run cherry pick tool runs-on: ubuntu-20.04 + permissions: + actions: write + contents: write + pull-requests: write needs: [prep, check-release-branch-exists] if: success() steps: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 512e609e1e0..423398bb8be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,11 +12,16 @@ defaults: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true + +permissions: {} + jobs: test: name: PHP ${{ matrix.php }} WP ${{ matrix.wp }} timeout-minutes: 30 runs-on: ubuntu-20.04 + permissions: + contents: read continue-on-error: ${{ matrix.wp == 'nightly' }} strategy: fail-fast: false diff --git a/.github/workflows/community-label.yml b/.github/workflows/community-label.yml index 6856aec116f..979add9fe55 100644 --- a/.github/workflows/community-label.yml +++ b/.github/workflows/community-label.yml @@ -10,10 +10,15 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: {} + jobs: verify: name: Verify runs-on: ubuntu-20.04 + permissions: + contents: read + pull-requests: write steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/cot-build-and-e2e-tests-daily.yml b/.github/workflows/cot-build-and-e2e-tests-daily.yml index 51cd250ce12..a38d042cc1e 100644 --- a/.github/workflows/cot-build-and-e2e-tests-daily.yml +++ b/.github/workflows/cot-build-and-e2e-tests-daily.yml @@ -8,10 +8,14 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: {} + jobs: cot-e2e-tests-run: name: Runs E2E tests with COT enabled. runs-on: ubuntu-20.04 + permissions: + contents: read env: ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-results ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-report @@ -66,6 +70,8 @@ jobs: cot-api-tests-run: name: Runs API tests with COT enabled. runs-on: ubuntu-20.04 + permissions: + contents: read env: ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/api-test-report/allure-results ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/api-test-report/allure-report @@ -124,6 +130,8 @@ jobs: contains( needs.*.result, 'failure' ) ) runs-on: ubuntu-20.04 + permissions: + contents: read needs: [cot-api-tests-run, cot-e2e-tests-run] steps: - name: Create dirs diff --git a/.github/workflows/cot-pr-build-and-e2e-tests.yml b/.github/workflows/cot-pr-build-and-e2e-tests.yml index e5e6e4bd4cc..a212ff99769 100644 --- a/.github/workflows/cot-pr-build-and-e2e-tests.yml +++ b/.github/workflows/cot-pr-build-and-e2e-tests.yml @@ -8,11 +8,15 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: {} + jobs: cot-e2e-tests-run: name: Runs E2E tests with COT enabled. if: "${{ github.event_name == 'workflow_dispatch' || github.event.label.name == 'focus: custom order tables' }}" runs-on: ubuntu-20.04 + permissions: + contents: read env: ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-results ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-report @@ -68,6 +72,8 @@ jobs: name: Runs API tests with COT enabled. if: "${{ github.event_name == 'workflow_dispatch' || github.event.label.name == 'focus: custom order tables' }}" runs-on: ubuntu-20.04 + permissions: + contents: read env: ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/api-test-report/allure-results ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/api-test-report/allure-report @@ -126,6 +132,8 @@ jobs: contains( needs.*.result, 'failure' ) ) runs-on: ubuntu-20.04 + permissions: + contents: read needs: [cot-api-tests-run, cot-e2e-tests-run] steps: - name: Create dirs diff --git a/.github/workflows/mirrors.yml b/.github/workflows/mirrors.yml index b3cb91069ee..37ccec1fec0 100644 --- a/.github/workflows/mirrors.yml +++ b/.github/workflows/mirrors.yml @@ -4,11 +4,15 @@ on: branches: ["trunk", "release/**"] workflow_dispatch: +permissions: {} + jobs: build: if: github.repository == 'woocommerce/woocommerce' name: Build WooCommerce zip runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@v3 @@ -35,6 +39,8 @@ jobs: name: Push to Mirror needs: [build] runs-on: ubuntu-20.04 + permissions: + contents: read steps: - name: Create directories run: | diff --git a/.github/workflows/nightly-builds.yml b/.github/workflows/nightly-builds.yml index 06227ac6615..64903cb5075 100644 --- a/.github/workflows/nightly-builds.yml +++ b/.github/workflows/nightly-builds.yml @@ -3,6 +3,9 @@ on: schedule: - cron: '0 0 * * *' # Run at 12 AM UTC. workflow_dispatch: + +permissions: {} + jobs: build: if: github.repository_owner == 'woocommerce' @@ -12,6 +15,8 @@ jobs: matrix: build: [trunk] runs-on: ubuntu-20.04 + permissions: + contents: write steps: - uses: actions/checkout@v3 with: @@ -40,6 +45,8 @@ jobs: update: name: Update nightly tag commit ref runs-on: ubuntu-20.04 + permissions: + contents: write steps: - name: Update nightly tag uses: richardsimko/github-tag-action@v1.0.5 diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml index 8f4a78d5424..1400a50dbe5 100644 --- a/.github/workflows/package-release.yml +++ b/.github/workflows/package-release.yml @@ -6,10 +6,15 @@ on: description: 'Enter a specific package to release, or releases separated by commas, ie @woocommerce/components,@woocommerce/number. Leaving this input blank will release all eligible packages.' required: false default: '-a' + +permissions: {} + jobs: release: name: Run packages release script runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index 7ed2c418986..6f2b9bb284b 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -9,10 +9,15 @@ env: GIT_AUTHOR_NAME: 'WooCommerce Bot' GIT_AUTHOR_EMAIL: 'no-reply@woocommerce.com' +permissions: {} + jobs: changelog-version-update: name: Update changelog and version runs-on: ubuntu-20.04 + permissions: + contents: write + pull-requests: write steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/pr-build-and-e2e-tests.yml b/.github/workflows/pr-build-and-e2e-tests.yml index d66270ba70d..c37a5c96ad3 100644 --- a/.github/workflows/pr-build-and-e2e-tests.yml +++ b/.github/workflows/pr-build-and-e2e-tests.yml @@ -7,10 +7,14 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: {} + jobs: e2e-tests-run: name: Runs E2E tests. runs-on: ubuntu-20.04 + permissions: + contents: read env: ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-results ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-report @@ -79,6 +83,8 @@ jobs: api-tests-run: name: Runs API tests. runs-on: ubuntu-20.04 + permissions: + contents: read env: ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/test-results/allure-results ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/test-results/allure-report @@ -129,6 +135,8 @@ jobs: k6-tests-run: name: Runs k6 Performance tests runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@v3 @@ -162,6 +170,10 @@ jobs: ) runs-on: ubuntu-20.04 needs: [api-tests-run, e2e-tests-run] + permissions: + contents: read + issues: write + pull-requests: write env: E2E_GRAND_TOTAL: ${{needs.e2e-tests-run.outputs.E2E_GRAND_TOTAL}} steps: diff --git a/.github/workflows/pr-build-live-branch.yml b/.github/workflows/pr-build-live-branch.yml index 00706c67d74..01805b95b9a 100644 --- a/.github/workflows/pr-build-live-branch.yml +++ b/.github/workflows/pr-build-live-branch.yml @@ -7,10 +7,14 @@ concurrency: group: build-${{ github.event_name == 'push' && github.run_id || 'pr' }}-${{ github.ref }} cancel-in-progress: true +permissions: {} + jobs: build: if: github.repository_owner == 'woocommerce' runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/pr-code-coverage.yml b/.github/workflows/pr-code-coverage.yml index 4f8e67820c1..cb71b873a24 100644 --- a/.github/workflows/pr-code-coverage.yml +++ b/.github/workflows/pr-code-coverage.yml @@ -8,11 +8,16 @@ defaults: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true + +permissions: {} + jobs: test: name: Code coverage (PHP 7.4, WP Latest) timeout-minutes: 30 runs-on: ubuntu-20.04 + permissions: + contents: read services: database: image: mysql:5.6 diff --git a/.github/workflows/pr-code-sniff.yml b/.github/workflows/pr-code-sniff.yml index f18a5aae4e6..005648861db 100644 --- a/.github/workflows/pr-code-sniff.yml +++ b/.github/workflows/pr-code-sniff.yml @@ -8,11 +8,16 @@ concurrency: cancel-in-progress: true env: PHPCS: ./plugins/woocommerce/vendor/bin/phpcs # Run WooCommerce phpcs setup in phpcs-changed instead of default + +permissions: {} + jobs: test: name: Code sniff (PHP 7.4, WP Latest) timeout-minutes: 15 runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/pr-highlight-changes.yml b/.github/workflows/pr-highlight-changes.yml index 2d6d86e6fce..45bb24f4df9 100644 --- a/.github/workflows/pr-highlight-changes.yml +++ b/.github/workflows/pr-highlight-changes.yml @@ -1,9 +1,14 @@ name: Highlight templates changes on: pull_request + +permissions: {} + jobs: analyze: name: Check pull request changes to highlight runs-on: ubuntu-20.04 + permissions: + contents: read outputs: results: ${{ steps.results.outputs.results }} steps: diff --git a/.github/workflows/pr-lint-monorepo.yml b/.github/workflows/pr-lint-monorepo.yml index afc92bc4eed..76ed1fac7da 100644 --- a/.github/workflows/pr-lint-monorepo.yml +++ b/.github/workflows/pr-lint-monorepo.yml @@ -6,10 +6,15 @@ on: concurrency: group: changelogger-${{ github.event_name }}-${{ github.ref }} cancel-in-progress: true + +permissions: {} + jobs: changelogger_used: name: Changelogger use runs-on: ubuntu-20.04 + permissions: + contents: read timeout-minutes: 15 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/pr-lint-test-js.yml b/.github/workflows/pr-lint-test-js.yml index cc1c14680e8..a89cb11712c 100644 --- a/.github/workflows/pr-lint-test-js.yml +++ b/.github/workflows/pr-lint-test-js.yml @@ -5,10 +5,14 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: {} + jobs: lint-test-js: name: Lint and Test JS runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/pr-project-label.yml b/.github/workflows/pr-project-label.yml index 8c189eace6b..eefbe73d910 100644 --- a/.github/workflows/pr-project-label.yml +++ b/.github/workflows/pr-project-label.yml @@ -8,9 +8,14 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: {} + jobs: label_project: runs-on: ubuntu-20.04 + permissions: + contents: read + pull-requests: write steps: - uses: actions/labeler@v3 with: diff --git a/.github/workflows/pr-smoke-test.yml b/.github/workflows/pr-smoke-test.yml index 45e6077c0cf..10cb9c671e2 100644 --- a/.github/workflows/pr-smoke-test.yml +++ b/.github/workflows/pr-smoke-test.yml @@ -9,11 +9,16 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: {} + jobs: prcheck: name: Smoke test a pull request. if: "${{ contains(github.event.label.name, 'run: smoke tests') }}" runs-on: ubuntu-20.04 + permissions: + contents: read + pull-requests: write steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/pr-unit-tests.yml b/.github/workflows/pr-unit-tests.yml index de6e02122d5..6142d55689b 100644 --- a/.github/workflows/pr-unit-tests.yml +++ b/.github/workflows/pr-unit-tests.yml @@ -8,11 +8,15 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: {} + jobs: test: name: PHP ${{ matrix.php }} WP ${{ matrix.wp }} timeout-minutes: 30 runs-on: ubuntu-20.04 + permissions: + contents: read continue-on-error: ${{ matrix.wp == 'nightly' }} strategy: fail-fast: false diff --git a/.github/workflows/prepare-package-release.yml b/.github/workflows/prepare-package-release.yml index 6a524e58613..0f311150cf1 100644 --- a/.github/workflows/prepare-package-release.yml +++ b/.github/workflows/prepare-package-release.yml @@ -6,10 +6,16 @@ on: description: 'Enter a specific package to release, or packages separated by commas, ie @woocommerce/components,@woocommerce/number. Leaving this input to the default "-a" will prepare to release all eligible packages.' required: false default: '-a' + +permissions: {} + jobs: prepare: name: Run prepare script runs-on: ubuntu-20.04 + permissions: + contents: read + pull-requests: write steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/prime-cache.yml b/.github/workflows/prime-cache.yml index 90a260a6f26..a5d604a1625 100644 --- a/.github/workflows/prime-cache.yml +++ b/.github/workflows/prime-cache.yml @@ -9,10 +9,14 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: {} + jobs: prime: name: Prime cache runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/pull-request-post-merge-processing.yml b/.github/workflows/pull-request-post-merge-processing.yml index 9ce002c31b6..208cf6736cb 100644 --- a/.github/workflows/pull-request-post-merge-processing.yml +++ b/.github/workflows/pull-request-post-merge-processing.yml @@ -3,11 +3,15 @@ on: pull_request_target: types: [closed] +permissions: {} + jobs: process-pull-request-after-merge: name: "Process a pull request after it's merged" if: github.event.pull_request.merged == true runs-on: ubuntu-20.04 + permissions: + pull-requests: write steps: - name: "Get the action scripts" run: | diff --git a/.github/workflows/release-changelog.yml b/.github/workflows/release-changelog.yml index 85f725a8a46..b8ce8d8572a 100644 --- a/.github/workflows/release-changelog.yml +++ b/.github/workflows/release-changelog.yml @@ -15,9 +15,14 @@ env: GIT_AUTHOR_NAME: 'WooCommerce Bot' GIT_AUTHOR_EMAIL: 'no-reply@woocommerce.com' +permissions: {} + jobs: create-changelog-prs: runs-on: ubuntu-20.04 + permissions: + contents: read + pull-requests: write steps: - name: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/release-code-freeze.yml b/.github/workflows/release-code-freeze.yml index 17aa826f569..ffb31eea89c 100644 --- a/.github/workflows/release-code-freeze.yml +++ b/.github/workflows/release-code-freeze.yml @@ -20,6 +20,8 @@ env: GIT_AUTHOR_NAME: 'WooCommerce Bot' GIT_AUTHOR_EMAIL: 'no-reply@woocommerce.com' +permissions: {} + jobs: verify-code-freeze: name: 'Verify that today is the day of the code freeze' @@ -57,6 +59,8 @@ jobs: maybe-create-next-milestone-and-release-branch: name: 'Maybe create next milestone and release branch' runs-on: ubuntu-20.04 + permissions: + contents: read needs: verify-code-freeze if: needs.verify-code-freeze.outputs.freeze == 0 outputs: @@ -84,6 +88,9 @@ jobs: prep-trunk: name: Preps trunk for next development cycle runs-on: ubuntu-20.04 + permissions: + contents: read + pull-requests: write needs: maybe-create-next-milestone-and-release-branch steps: - name: Checkout code @@ -151,6 +158,8 @@ jobs: trigger-changelog-action: name: 'Trigger changelog action' runs-on: ubuntu-20.04 + permissions: + actions: write needs: maybe-create-next-milestone-and-release-branch steps: - name: 'Trigger changelog action' diff --git a/.github/workflows/smoke-test-daily-site-check.yml b/.github/workflows/smoke-test-daily-site-check.yml index ac71633d3b1..37b0de06ec9 100644 --- a/.github/workflows/smoke-test-daily-site-check.yml +++ b/.github/workflows/smoke-test-daily-site-check.yml @@ -3,6 +3,8 @@ on: schedule: - cron: '25 7 * * *' +permissions: {} + jobs: ping_site: runs-on: ubuntu-20.04 diff --git a/.github/workflows/smoke-test-daily.yml b/.github/workflows/smoke-test-daily.yml index 73223f64242..7c5b9ea78ea 100644 --- a/.github/workflows/smoke-test-daily.yml +++ b/.github/workflows/smoke-test-daily.yml @@ -14,10 +14,14 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: {} + jobs: e2e-tests: name: E2E tests on nightly build runs-on: ubuntu-20.04 + permissions: + contents: read env: ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }} ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }} @@ -55,7 +59,8 @@ jobs: working-directory: plugins/woocommerce env: E2E_MAX_FAILURES: 25 - run: pnpm exec playwright test --config=tests/e2e-pw/daily.playwright.config.js + RESET_SITE: true + run: pnpm exec playwright test --config=tests/e2e-pw/playwright.config.js - name: Generate Playwright E2E Test report. if: success() || failure() @@ -76,6 +81,8 @@ jobs: api-tests: name: API tests on nightly build runs-on: ubuntu-20.04 + permissions: + contents: read needs: [e2e-tests] if: success() || failure() env: @@ -120,6 +127,8 @@ jobs: k6-tests: name: k6 tests on nightly build runs-on: ubuntu-20.04 + permissions: + contents: read needs: [api-tests] if: success() || failure() steps: @@ -163,13 +172,15 @@ jobs: A_PW: ${{ secrets.SMOKE_TEST_PERF_ADMIN_PASSWORD }} C_USER: ${{ secrets.SMOKE_TEST_PERF_ADMIN_USER }} C_PW: ${{ secrets.SMOKE_TEST_PERF_ADMIN_PASSWORD }} - P_ID: 274 + P_ID: 22733 run: | ./k6 run plugins/woocommerce/tests/performance/tests/gh-action-daily-ext-requests.js test-plugins: name: Smoke tests on trunk with ${{ matrix.plugin }} plugin installed runs-on: ubuntu-20.04 + permissions: + contents: read env: USE_WP_ENV: 1 ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-results @@ -219,7 +230,7 @@ jobs: working-directory: plugins/woocommerce env: E2E_MAX_FAILURES: 15 - run: pnpm exec playwright test --config=tests/e2e-pw/daily.playwright.config.js + run: pnpm exec playwright test --config=tests/e2e-pw/playwright.config.js - name: Generate E2E Test report. if: success() || failure() @@ -243,6 +254,8 @@ jobs: ( success() || failure() ) && ! github.event.pull_request.head.repo.fork runs-on: ubuntu-20.04 + permissions: + contents: read needs: [test-plugins, k6-tests] steps: - name: Create dirs diff --git a/.github/workflows/smoke-test-release.yml b/.github/workflows/smoke-test-release.yml index f202b3467de..411538d05a4 100644 --- a/.github/workflows/smoke-test-release.yml +++ b/.github/workflows/smoke-test-release.yml @@ -5,10 +5,15 @@ on: release_id: description: 'WooCommerce Release Id' required: true + +permissions: {} + jobs: login-run: name: Daily smoke test on release. runs-on: ubuntu-20.04 + permissions: + contents: read steps: - uses: actions/checkout@v3 with: @@ -49,6 +54,8 @@ jobs: test-wp-version: name: Smoke test on L-${{ matrix.wp }} WordPress version runs-on: ubuntu-20.04 + permissions: + contents: read strategy: matrix: wp: ['1', '2'] @@ -104,6 +111,8 @@ jobs: test-plugins: name: Smoke tests with ${{ matrix.plugin }} plugin installed runs-on: ubuntu-20.04 + permissions: + contents: read strategy: fail-fast: false matrix: diff --git a/.github/workflows/stalebot.yml b/.github/workflows/stalebot.yml index dc7e2c9b034..a512944ea96 100644 --- a/.github/workflows/stalebot.yml +++ b/.github/workflows/stalebot.yml @@ -3,11 +3,17 @@ on: schedule: - cron: '21 0 * * *' +permissions: {} + jobs: stale: if: | ! contains(github.event.issue.labels.*.name, 'type: enhancement') runs-on: ubuntu-20.04 + permissions: + contents: read + issues: write + pull-requests: write steps: - uses: actions/stale@v3 with: diff --git a/.github/workflows/syncpack.yml b/.github/workflows/syncpack.yml index f7898fa129f..56fb71d0964 100644 --- a/.github/workflows/syncpack.yml +++ b/.github/workflows/syncpack.yml @@ -6,9 +6,14 @@ on: - trunk paths: - '**/package.json' + +permissions: {} + jobs: syncpack: runs-on: ubuntu-latest + permissions: + contents: read name: syncpack steps: - name: 'Checkout' diff --git a/.github/workflows/triage-label.yml b/.github/workflows/triage-label.yml index ef9c5852437..b7f6485a31d 100644 --- a/.github/workflows/triage-label.yml +++ b/.github/workflows/triage-label.yml @@ -4,9 +4,14 @@ on: issues: types: opened +permissions: {} + jobs: add_label: runs-on: ubuntu-20.04 + permissions: + contents: read + issues: write steps: - uses: actions/checkout@v3 - uses: actions-ecosystem/action-add-labels@v1 diff --git a/.github/workflows/triage-replies.yml b/.github/workflows/triage-replies.yml index a5429249306..d65d4842e0c 100644 --- a/.github/workflows/triage-replies.yml +++ b/.github/workflows/triage-replies.yml @@ -3,6 +3,9 @@ on: issues: types: - labeled + +permissions: {} + jobs: add-dev-comment: if: "github.event.label.name == 'needs: developer feedback'" diff --git a/.github/workflows/update-feedback-labels.yml b/.github/workflows/update-feedback-labels.yml index 34caa1c31a1..d619bd9fc00 100644 --- a/.github/workflows/update-feedback-labels.yml +++ b/.github/workflows/update-feedback-labels.yml @@ -1,6 +1,8 @@ name: 'Update contributor feedback labels on comment' on: 'issue_comment' +permissions: {} + jobs: feedback: if: | @@ -10,6 +12,8 @@ jobs: github.event.issue.state == 'open' && contains(github.event.issue.labels.*.name, 'needs: author feedback') runs-on: ubuntu-20.04 + permissions: + issues: write steps: - name: Add has feedback uses: actions-ecosystem/action-add-labels@v1 diff --git a/packages/js/admin-e2e-tests/changelog/update-changelogger b/packages/js/admin-e2e-tests/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/admin-e2e-tests/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/admin-e2e-tests/composer.json b/packages/js/admin-e2e-tests/composer.json index 90649ce14ac..6f20e363555 100644 --- a/packages/js/admin-e2e-tests/composer.json +++ b/packages/js/admin-e2e-tests/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/admin-e2e-tests/composer.lock b/packages/js/admin-e2e-tests/composer.lock index 602ff6fabdc..f448cbf9e57 100644 --- a/packages/js/admin-e2e-tests/composer.lock +++ b/packages/js/admin-e2e-tests/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cae17ca18e2a2a6cefe200df88081346", + "content-hash": "959b38edbc3ae0c3853c02e86852f583", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/api/changelog/update-changelogger b/packages/js/api/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/api/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/api/composer.json b/packages/js/api/composer.json index 384ed03b22e..02a86b11c3a 100644 --- a/packages/js/api/composer.json +++ b/packages/js/api/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/api/composer.lock b/packages/js/api/composer.lock index e2ee0a36abe..aa3ed289cf2 100644 --- a/packages/js/api/composer.lock +++ b/packages/js/api/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2ac4a9ea3ab4687cb26b0075128628de", + "content-hash": "8cdc2ba8c2e8669b3d48cf7e4cb3c379", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/components/CHANGELOG.md b/packages/js/components/CHANGELOG.md index a8bb8684c2a..a7a86402539 100644 --- a/packages/js/components/CHANGELOG.md +++ b/packages/js/components/CHANGELOG.md @@ -2,6 +2,41 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [12.0.0](https://www.npmjs.com/package/@woocommerce/components/v/12.0.0) - 2022-12-28 + +- Patch - Add name to exported popover slot used to display SelectControl Menu, so it is only used for SelectControl menus. [#36124] +- Patch - Close DateTimePickerControl's dropdown when blurring from input. [#36124] +- Patch - DateTimePickerControl's onChange now only fires when there is an actual change to the datetime. [#36124] +- Patch - Fix DateTimePickerControl's popover styling when slot-fill is used. [#36124] +- Patch - Fixed DatePicker to work in WordPress 6.1 when currentDate is set to a moment instance. [#36124] +- Patch - Fix pagination label text from uppercase to normal and font styles [#36124] +- Patch - Include react-dates styles (no longer in WP 6.1+). [#36124] +- Minor - Set editor mode on initialization to prevent initial text editor focus [#36124] +- Patch - Set initial values prop from reset form function as optional [#36124] +- Patch - Add aria-label for simple select dropdown [#36124] +- Patch - Add async filtering support to the `__experimentalSelectControl` component [#36124] +- Minor - Add className prop to ListItem. [#36124] +- Minor - Add className prop to Sortable [#36124] +- Minor - Added ability to force time when DateTimePickerControl is date-only (timeForDateOnly prop). [#36124] +- Minor - Add experimental ConditionalWrapper component [#36124] +- Patch - Add experimental open menu when user focus the select control input element [#36124] +- Minor - Adding isHidden option for primary button in TourKit component. [#36124] +- Minor - Add support for custom suffix prop on SelectControl. [#36124] +- Minor - Make Table component accept className prop. [#36124] +- Minor - Move classname down in SelectControl Menu so it is on the actual Menu element. [#36124] +- Major [ **BREAKING CHANGE** ] - Switch DateTimePickerControl formatting to PHP style, for WP compatibility. [#36124] +- Patch - Updating downshift to 6.1.12. [#36124] +- Minor - Allow the user to select multiple images in the Media Library [#36124] +- Patch - Migrate search component to TS [#36124] +- Minor - Move file picker by clicking card into the MediaUploader component [#36124] +- Minor - Fix up initial block selection in RichTextEditor and add media blocks [#36124] +- Patch - Updated image gallery toolbar position and tooltips. [#36124] +- Patch - Update variable name within useFormContext. [#36124] +- Minor - Add noDataLabel property into table.js component to allow No Data label customization. [#36124] +- Patch - Align the field height across the whole form [#36124] +- Patch - Fade the value selection field in the Attributes modal when no attribute is added [#36124] +- Patch - Update font size and spacing in the tooltip component [#36124] + ## [11.1.0](https://www.npmjs.com/package/@woocommerce/components/v/11.1.0) - 2022-10-24 - Minor - Allow passing of additional props to form inputs [#35160] diff --git a/packages/js/components/changelog/add-34332-add-attribute-edit b/packages/js/components/changelog/add-34332-add-attribute-edit deleted file mode 100644 index 42678d69bf9..00000000000 --- a/packages/js/components/changelog/add-34332-add-attribute-edit +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -Updating downshift to 6.1.12. diff --git a/packages/js/components/changelog/add-34_create_new_category_field_modal b/packages/js/components/changelog/add-34_create_new_category_field_modal deleted file mode 100644 index 4bfc4ae8b9b..00000000000 --- a/packages/js/components/changelog/add-34_create_new_category_field_modal +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Move classname down in SelectControl Menu so it is on the actual Menu element. diff --git a/packages/js/components/changelog/add-35046 b/packages/js/components/changelog/add-35046 deleted file mode 100644 index e9d7806593d..00000000000 --- a/packages/js/components/changelog/add-35046 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add experimental ConditionalWrapper component diff --git a/packages/js/components/changelog/add-35076 b/packages/js/components/changelog/add-35076 deleted file mode 100644 index acbe196ea01..00000000000 --- a/packages/js/components/changelog/add-35076 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: add - -Add async filtering support to the `__experimentalSelectControl` component diff --git a/packages/js/components/changelog/add-35173-category-field-improvements b/packages/js/components/changelog/add-35173-category-field-improvements deleted file mode 100644 index 5eb682fd22d..00000000000 --- a/packages/js/components/changelog/add-35173-category-field-improvements +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: add - -Add experimental open menu when user focus the select control input element diff --git a/packages/js/components/changelog/add-35181_allow_select_multiple_images b/packages/js/components/changelog/add-35181_allow_select_multiple_images deleted file mode 100644 index 247d164a7f7..00000000000 --- a/packages/js/components/changelog/add-35181_allow_select_multiple_images +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: dev - -Allow the user to select multiple images in the Media Library diff --git a/packages/js/components/changelog/add-35301-delayed-ces-prompt b/packages/js/components/changelog/add-35301-delayed-ces-prompt deleted file mode 100644 index a0589d9d4ab..00000000000 --- a/packages/js/components/changelog/add-35301-delayed-ces-prompt +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Adding isHidden option for primary button in TourKit component. diff --git a/packages/js/components/changelog/add-35788 b/packages/js/components/changelog/add-35788 deleted file mode 100644 index 7d0c1f80dbc..00000000000 --- a/packages/js/components/changelog/add-35788 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix pagination label text from uppercase to normal and font styles diff --git a/packages/js/components/changelog/add-35789_set_variations_list_fixed_height b/packages/js/components/changelog/add-35789_set_variations_list_fixed_height deleted file mode 100644 index 6d397019d36..00000000000 --- a/packages/js/components/changelog/add-35789_set_variations_list_fixed_height +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add className prop to Sortable diff --git a/packages/js/components/changelog/add-select-control-suffix b/packages/js/components/changelog/add-select-control-suffix deleted file mode 100644 index 860761e71c0..00000000000 --- a/packages/js/components/changelog/add-select-control-suffix +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add support for custom suffix prop on SelectControl. diff --git a/packages/js/components/changelog/dev-35714_move_file_picker_to_media_uploader b/packages/js/components/changelog/dev-35714_move_file_picker_to_media_uploader deleted file mode 100644 index 62cf00b1a9d..00000000000 --- a/packages/js/components/changelog/dev-35714_move_file_picker_to_media_uploader +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: dev - -Move file picker by clicking card into the MediaUploader component diff --git a/packages/js/components/changelog/dev-migrate-search-component-to-ts b/packages/js/components/changelog/dev-migrate-search-component-to-ts deleted file mode 100644 index ded2b14cc92..00000000000 --- a/packages/js/components/changelog/dev-migrate-search-component-to-ts +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Migrate search component to TS diff --git a/packages/js/components/changelog/enhancement-35190-update-tooltip-styles b/packages/js/components/changelog/enhancement-35190-update-tooltip-styles deleted file mode 100644 index 4d21861d602..00000000000 --- a/packages/js/components/changelog/enhancement-35190-update-tooltip-styles +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: enhancement - -Update font size and spacing in the tooltip component diff --git a/packages/js/components/changelog/enhancement-35567 b/packages/js/components/changelog/enhancement-35567 deleted file mode 100644 index 0d4f5a995a9..00000000000 --- a/packages/js/components/changelog/enhancement-35567 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: enhancement - -Align the field height across the whole form diff --git a/packages/js/components/changelog/enhancement-35568 b/packages/js/components/changelog/enhancement-35568 deleted file mode 100644 index 5c6dabeaa7e..00000000000 --- a/packages/js/components/changelog/enhancement-35568 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: enhancement - -Fade the value selection field in the Attributes modal when no attribute is added diff --git a/packages/js/components/changelog/enhancement-table-add-no-data-label-property b/packages/js/components/changelog/enhancement-table-add-no-data-label-property deleted file mode 100644 index 70efa89f698..00000000000 --- a/packages/js/components/changelog/enhancement-table-add-no-data-label-property +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: enhancement - -Add noDataLabel property into table.js component to allow No Data label customization. diff --git a/packages/js/components/changelog/fix-35697 b/packages/js/components/changelog/fix-35697 deleted file mode 100644 index 8e9f36504c7..00000000000 --- a/packages/js/components/changelog/fix-35697 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Set editor mode on initialization to prevent initial text editor focus diff --git a/packages/js/components/changelog/fix-36129-table-className b/packages/js/components/changelog/fix-36129-table-className deleted file mode 100644 index 1b601edb7bf..00000000000 --- a/packages/js/components/changelog/fix-36129-table-className +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Make Table component accept className prop. diff --git a/packages/js/components/changelog/fix-analytics-daterange-custom-wp61 b/packages/js/components/changelog/fix-analytics-daterange-custom-wp61 deleted file mode 100644 index f965ebdce29..00000000000 --- a/packages/js/components/changelog/fix-analytics-daterange-custom-wp61 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Include react-dates styles (no longer in WP 6.1+). diff --git a/packages/js/components/changelog/fix-date-time-picker-blur-close b/packages/js/components/changelog/fix-date-time-picker-blur-close deleted file mode 100644 index 28fa1e5dcd4..00000000000 --- a/packages/js/components/changelog/fix-date-time-picker-blur-close +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Close DateTimePickerControl's dropdown when blurring from input. diff --git a/packages/js/components/changelog/fix-date-time-picker-control-onchange b/packages/js/components/changelog/fix-date-time-picker-control-onchange deleted file mode 100644 index f7074ae252b..00000000000 --- a/packages/js/components/changelog/fix-date-time-picker-control-onchange +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -DateTimePickerControl's onChange now only fires when there is an actual change to the datetime. diff --git a/packages/js/components/changelog/fix-date-time-picker-control-suffix-style b/packages/js/components/changelog/fix-date-time-picker-control-suffix-style deleted file mode 100644 index 97b797ed6cb..00000000000 --- a/packages/js/components/changelog/fix-date-time-picker-control-suffix-style +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fix -Comment: Just a minor tweak to the CSS for the DateTimePickerControl suffix. - - diff --git a/packages/js/components/changelog/fix-datepicker-moment b/packages/js/components/changelog/fix-datepicker-moment deleted file mode 100644 index 8d2aafbd252..00000000000 --- a/packages/js/components/changelog/fix-datepicker-moment +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fixed DatePicker to work in WordPress 6.1 when currentDate is set to a moment instance. diff --git a/packages/js/components/changelog/fix-form_ts_error b/packages/js/components/changelog/fix-form_ts_error deleted file mode 100644 index fc0ec73f0ee..00000000000 --- a/packages/js/components/changelog/fix-form_ts_error +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: tweak - -Update variable name within useFormContext. diff --git a/packages/js/components/changelog/fix-product-images-toolbar-positioning b/packages/js/components/changelog/fix-product-images-toolbar-positioning deleted file mode 100644 index fc6df228ba7..00000000000 --- a/packages/js/components/changelog/fix-product-images-toolbar-positioning +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: tweak - -Updated image gallery toolbar position and tooltips. diff --git a/packages/js/components/changelog/fix-rich-text-editor-selection b/packages/js/components/changelog/fix-rich-text-editor-selection deleted file mode 100644 index 59caa9a16d8..00000000000 --- a/packages/js/components/changelog/fix-rich-text-editor-selection +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: tweak - -Fix up initial block selection in RichTextEditor and add media blocks diff --git a/packages/js/components/changelog/fix-select-control-popover-slots b/packages/js/components/changelog/fix-select-control-popover-slots deleted file mode 100644 index 81d59f026ab..00000000000 --- a/packages/js/components/changelog/fix-select-control-popover-slots +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Add name to exported popover slot used to display SelectControl Menu, so it is only used for SelectControl menus. diff --git a/packages/js/components/changelog/fix-unsaved-prompt b/packages/js/components/changelog/fix-unsaved-prompt deleted file mode 100644 index 80d311cee86..00000000000 --- a/packages/js/components/changelog/fix-unsaved-prompt +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Set initial values prop from reset form function as optional diff --git a/packages/js/components/changelog/list-item-classname b/packages/js/components/changelog/list-item-classname deleted file mode 100644 index 9f5a5ea0d55..00000000000 --- a/packages/js/components/changelog/list-item-classname +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add className prop to ListItem. diff --git a/packages/js/components/changelog/update-add-aria-label-for-simple-select-dropdown b/packages/js/components/changelog/update-add-aria-label-for-simple-select-dropdown deleted file mode 100644 index ff75398a39b..00000000000 --- a/packages/js/components/changelog/update-add-aria-label-for-simple-select-dropdown +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: add - -Add aria-label for simple select dropdown diff --git a/packages/js/components/changelog/update-changelogger b/packages/js/components/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/components/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/components/changelog/update-date-time-picker-control-force-time-to b/packages/js/components/changelog/update-date-time-picker-control-force-time-to deleted file mode 100644 index fcf4278fc5f..00000000000 --- a/packages/js/components/changelog/update-date-time-picker-control-force-time-to +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Added ability to force time when DateTimePickerControl is date-only (timeForDateOnly prop). diff --git a/packages/js/components/changelog/update-date-time-picker-control-formatting b/packages/js/components/changelog/update-date-time-picker-control-formatting deleted file mode 100644 index 800e0dbc01d..00000000000 --- a/packages/js/components/changelog/update-date-time-picker-control-formatting +++ /dev/null @@ -1,4 +0,0 @@ -Significance: major -Type: update - -Switch DateTimePickerControl formatting to PHP style, for WP compatibility. diff --git a/packages/js/components/changelog/update-date-time-picker-control-picker-classname b/packages/js/components/changelog/update-date-time-picker-control-picker-classname deleted file mode 100644 index 4f444ed8862..00000000000 --- a/packages/js/components/changelog/update-date-time-picker-control-picker-classname +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix DateTimePickerControl's popover styling when slot-fill is used. diff --git a/packages/js/components/composer.json b/packages/js/components/composer.json index 9bb6df42457..002cbd95bab 100644 --- a/packages/js/components/composer.json +++ b/packages/js/components/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/components/composer.lock b/packages/js/components/composer.lock index 87b9fcf1a87..4324a3af9b4 100644 --- a/packages/js/components/composer.lock +++ b/packages/js/components/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "75af54f4e83b1e2c7c96371c3288e355", + "content-hash": "0e715b7322bdb353060f76a3279195e1", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/components/package.json b/packages/js/components/package.json index 221e7c2de54..46839c72d33 100644 --- a/packages/js/components/package.json +++ b/packages/js/components/package.json @@ -1,6 +1,6 @@ { "name": "@woocommerce/components", - "version": "11.1.0", + "version": "12.0.0", "description": "UI components for WooCommerce.", "author": "Automattic", "license": "GPL-3.0-or-later", diff --git a/packages/js/create-woo-extension/README.md b/packages/js/create-woo-extension/README.md index effa91ec729..4e703374680 100644 --- a/packages/js/create-woo-extension/README.md +++ b/packages/js/create-woo-extension/README.md @@ -1,19 +1,37 @@ # @woocommerce/create-woo-extension -This is a template to be used with `@wordpress/create-block` to create a WooCommerce Extension starting point. +Create Woo Extension scaffolds a fully functional modern development environment for integrating with WooCommerce. Use it to build extensions leveraging the power of WooCommerce. -## Installation +## Configuration Free + +With build tooling already configured, getting started developing modern Javascript screens requires no effort. Create Woo Extension adds a React page integrating with WooCommerce Admin. Also included are PHP and Javascript unit testing, linting, and Prettier IDE confguration for WooCommerce and WordPress. + +Add a project inside of your favorite environment setup or use the built in [wp-env](https://github.com/WordPress/gutenberg/tree/trunk/packages/env) for easily setting up a local WordPress environment for building and testing plugins and themes. `wp-env` is configured to load the latest WooCommerce to easily start developing with a single command. + +## Usage ``` -npx @wordpress/create-block -t @woocommerce/create-woo-extension +npx @wordpress/create-block -t @woocommerce/create-woo-extension my-extension-name ``` -When this has completed, go to your WordPress plugins page and activate the plugin. +Navigate to the newly created folder and get started. + +``` +cd my-extension-name +npm install # Install dependencies +npm run build # Build the javascript +npm -g i @wordpress/env # If you don't already have wp-env +wp-env start # Start Wordpress environment +``` + +See the new plugin activated from the WordPress plugins page and navigate to http://localhost:8888/wp-admin/admin.php?page=wc-admin&path=%2Fmy-extension-name to check it out. ## Development -Install from a local directory. +For development on this tool itself, you can also install from a local directory. ``` -npx @wordpress/create-block -t ./path/to/woocommerce/packages/js/create-woo-extension +npx @wordpress/create-block -t ./path/to/woocommerce/packages/js/create-woo-extension my-extension-name ``` + +This is a template to used with [`@wordpress/create-block`](https://github.com/WordPress/gutenberg/tree/trunk/packages/create-block) to create a WooCommerce Extension starting point. diff --git a/packages/js/create-woo-extension/README.md.mustache b/packages/js/create-woo-extension/README.md.mustache index 247a1adb2c7..a982fe47432 100644 --- a/packages/js/create-woo-extension/README.md.mustache +++ b/packages/js/create-woo-extension/README.md.mustache @@ -1,12 +1,13 @@ -# Woo Plugin Setup +# {{title}} -A boilerplate for modern WooCommerce development. This project adds a React page to WooCommerce Admin and a corresponding navigation item. +A WooCommmerce Extension inspired by [Create Woo Extension](https://github.com/woocommerce/woocommerce/blob/trunk/packages/js/create-woo-extension/README.md). ## Getting Started ### Prerequisites - [NPM](https://www.npmjs.com/) +- [Composer](https://getcomposer.org/download/) - [wp-env](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/) ### Installation and Build diff --git a/packages/js/create-woo-extension/changelog/update-changelogger b/packages/js/create-woo-extension/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/create-woo-extension/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/components/changelog/dev-adjust-sync b/packages/js/create-woo-extension/changelog/update-create-woo-extension-readme similarity index 50% rename from packages/js/components/changelog/dev-adjust-sync rename to packages/js/create-woo-extension/changelog/update-create-woo-extension-readme index f11d1e352f4..17691a4a7f8 100644 --- a/packages/js/components/changelog/dev-adjust-sync +++ b/packages/js/create-woo-extension/changelog/update-create-woo-extension-readme @@ -1,5 +1,4 @@ Significance: patch Type: dev -Comment: Dev dependency bump - +Update readme diff --git a/packages/js/create-woo-extension/composer.json b/packages/js/create-woo-extension/composer.json index c552cf99b2b..9567daedbbc 100644 --- a/packages/js/create-woo-extension/composer.json +++ b/packages/js/create-woo-extension/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/create-woo-extension/composer.lock b/packages/js/create-woo-extension/composer.lock index ace5b309e5e..32d9df34919 100644 --- a/packages/js/create-woo-extension/composer.lock +++ b/packages/js/create-woo-extension/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "af64b929c80c204120d9eccb66330d6c", + "content-hash": "e22045358357e9c229d188944b337d8f", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", diff --git a/packages/js/csv-export/changelog/update-changelogger b/packages/js/csv-export/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/csv-export/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/csv-export/composer.json b/packages/js/csv-export/composer.json index 2ac2f972b1e..e6230624ae3 100644 --- a/packages/js/csv-export/composer.json +++ b/packages/js/csv-export/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/csv-export/composer.lock b/packages/js/csv-export/composer.lock index b6ccc8b3541..86b4021326c 100644 --- a/packages/js/csv-export/composer.lock +++ b/packages/js/csv-export/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9d346e4d6a7b7aae6eba7dc306295ea8", + "content-hash": "7d0335a37eff7dfd560cf35f5898cc05", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/currency/changelog/update-changelogger b/packages/js/currency/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/currency/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/currency/composer.json b/packages/js/currency/composer.json index f4975d986e9..525b0140709 100644 --- a/packages/js/currency/composer.json +++ b/packages/js/currency/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/currency/composer.lock b/packages/js/currency/composer.lock index 2b5a46517c0..1187b31fb2e 100644 --- a/packages/js/currency/composer.lock +++ b/packages/js/currency/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f4d8c783fbd5ae4f782df2d5f1a6fdc2", + "content-hash": "26606191ce4af6fa09504ecea845e970", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/customer-effort-score/changelog/update-changelogger b/packages/js/customer-effort-score/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/customer-effort-score/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/customer-effort-score/composer.json b/packages/js/customer-effort-score/composer.json index bc3c8c58268..9dd58f9f69d 100644 --- a/packages/js/customer-effort-score/composer.json +++ b/packages/js/customer-effort-score/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/customer-effort-score/composer.lock b/packages/js/customer-effort-score/composer.lock index f56c2fc116e..58f777fd713 100644 --- a/packages/js/customer-effort-score/composer.lock +++ b/packages/js/customer-effort-score/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2d332eda546c5e999a9db224719b3d40", + "content-hash": "0215b2cfc41d308b925fce9038111c68", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/data/changelog/update-changelogger b/packages/js/data/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/data/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/data/composer.json b/packages/js/data/composer.json index 62170ffbdf8..9aabc322160 100644 --- a/packages/js/data/composer.json +++ b/packages/js/data/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/data/composer.lock b/packages/js/data/composer.lock index 55d17fcef62..a339154793b 100644 --- a/packages/js/data/composer.lock +++ b/packages/js/data/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e8aae6511dda74f8220d58b7ae1e9e74", + "content-hash": "17a41dc458677cca1830b065f3c83635", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/date/changelog/update-changelogger b/packages/js/date/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/date/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/date/composer.json b/packages/js/date/composer.json index ba72efa1dc9..eaab577ba18 100644 --- a/packages/js/date/composer.json +++ b/packages/js/date/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/date/composer.lock b/packages/js/date/composer.lock index 762fa0eaa30..54e47fea560 100644 --- a/packages/js/date/composer.lock +++ b/packages/js/date/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c2e5c404a4fee4f6a5892f989459c502", + "content-hash": "d9d159c4b750dd3d45df132d1f35786f", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/dependency-extraction-webpack-plugin/changelog/update-changelogger b/packages/js/dependency-extraction-webpack-plugin/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/dependency-extraction-webpack-plugin/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/dependency-extraction-webpack-plugin/composer.json b/packages/js/dependency-extraction-webpack-plugin/composer.json index e093fbc6bc4..61c2a773d08 100644 --- a/packages/js/dependency-extraction-webpack-plugin/composer.json +++ b/packages/js/dependency-extraction-webpack-plugin/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/dependency-extraction-webpack-plugin/composer.lock b/packages/js/dependency-extraction-webpack-plugin/composer.lock index c03a208a91c..da4247133c7 100644 --- a/packages/js/dependency-extraction-webpack-plugin/composer.lock +++ b/packages/js/dependency-extraction-webpack-plugin/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "024163a2e226f019b11933129ddfd115", + "content-hash": "1852d63966be2375d2f8edb607b861e9", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/eslint-plugin/changelog/update-changelogger b/packages/js/eslint-plugin/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/eslint-plugin/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/eslint-plugin/composer.json b/packages/js/eslint-plugin/composer.json index 8d62a41f972..5012dde7810 100644 --- a/packages/js/eslint-plugin/composer.json +++ b/packages/js/eslint-plugin/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/eslint-plugin/composer.lock b/packages/js/eslint-plugin/composer.lock index 25a718f685a..107253b0ce0 100644 --- a/packages/js/eslint-plugin/composer.lock +++ b/packages/js/eslint-plugin/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cfc0b63277f38526f4ff5300cfa22eca", + "content-hash": "243353ec23421c68191575ad267a7ccb", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/experimental/changelog/update-changelogger b/packages/js/experimental/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/experimental/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/experimental/composer.json b/packages/js/experimental/composer.json index e3476415ee7..3205900cc2d 100644 --- a/packages/js/experimental/composer.json +++ b/packages/js/experimental/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/experimental/composer.lock b/packages/js/experimental/composer.lock index c96ea1e4927..0670bdc43ab 100644 --- a/packages/js/experimental/composer.lock +++ b/packages/js/experimental/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8de7a23a39e8b1299465d2c26a261cf7", + "content-hash": "24b7e7383de02c18e0a5550dbdbb03b9", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/explat/changelog/update-changelogger b/packages/js/explat/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/explat/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/explat/composer.json b/packages/js/explat/composer.json index c743758573e..d3a25ad845c 100644 --- a/packages/js/explat/composer.json +++ b/packages/js/explat/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/explat/composer.lock b/packages/js/explat/composer.lock index 6d46ada4c30..4218525e9bd 100644 --- a/packages/js/explat/composer.lock +++ b/packages/js/explat/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c62661e12843ad431e9056ecdcfa696b", + "content-hash": "00d978b5b08bc69f9e23fd471d759d71", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/extend-cart-checkout-block/changelog/update-changelogger b/packages/js/extend-cart-checkout-block/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/extend-cart-checkout-block/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/extend-cart-checkout-block/composer.json b/packages/js/extend-cart-checkout-block/composer.json index 9c44b2a742c..72e09daf6f3 100644 --- a/packages/js/extend-cart-checkout-block/composer.json +++ b/packages/js/extend-cart-checkout-block/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/extend-cart-checkout-block/composer.lock b/packages/js/extend-cart-checkout-block/composer.lock index 4885651ee1f..32d9df34919 100644 --- a/packages/js/extend-cart-checkout-block/composer.lock +++ b/packages/js/extend-cart-checkout-block/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6bd29bd29a67b60a2199c7f520eada56", + "content-hash": "e22045358357e9c229d188944b337d8f", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/navigation/changelog/update-changelogger b/packages/js/navigation/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/navigation/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/navigation/composer.json b/packages/js/navigation/composer.json index b7f58a6164e..108f8491431 100644 --- a/packages/js/navigation/composer.json +++ b/packages/js/navigation/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/navigation/composer.lock b/packages/js/navigation/composer.lock index 28dcb6647a2..222d043ef11 100644 --- a/packages/js/navigation/composer.lock +++ b/packages/js/navigation/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0fc4e9b9f69b0b3f85fbc39b55f230d2", + "content-hash": "8dc2dd55c9c02cea672ce30791113055", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/number/changelog/update-changelogger b/packages/js/number/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/number/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/number/composer.json b/packages/js/number/composer.json index caf1ed82b65..1b0987fe22b 100644 --- a/packages/js/number/composer.json +++ b/packages/js/number/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/number/composer.lock b/packages/js/number/composer.lock index 15f9588eb1c..3f53e203bae 100644 --- a/packages/js/number/composer.lock +++ b/packages/js/number/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f823beb8ba53e2ce3eb222a7225b9c81", + "content-hash": "87beeb0c840ac6ac539462236730d56d", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/onboarding/changelog/update-changelogger b/packages/js/onboarding/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/onboarding/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/onboarding/composer.json b/packages/js/onboarding/composer.json index 20ce9b28533..df6b1835fe9 100644 --- a/packages/js/onboarding/composer.json +++ b/packages/js/onboarding/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/onboarding/composer.lock b/packages/js/onboarding/composer.lock index 6fca3c5d6a1..760ff255dcc 100644 --- a/packages/js/onboarding/composer.lock +++ b/packages/js/onboarding/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "24717ec0e0fb36f9ba425aa9c7f77ebf", + "content-hash": "3270cb0738d35835d789ab5d36483b86", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/packages/js/tracks/changelog/update-changelogger b/packages/js/tracks/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/packages/js/tracks/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/packages/js/tracks/composer.json b/packages/js/tracks/composer.json index 8c8141d9e26..ff8e80b2295 100644 --- a/packages/js/tracks/composer.json +++ b/packages/js/tracks/composer.json @@ -5,7 +5,7 @@ "license": "GPL-3.0-or-later", "minimum-stability": "dev", "require-dev": { - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "config": { "platform": { diff --git a/packages/js/tracks/composer.lock b/packages/js/tracks/composer.lock index d046d98a4e4..6d6107d9484 100644 --- a/packages/js/tracks/composer.lock +++ b/packages/js/tracks/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c1c9ce8ab810d38191077a10b9438963", + "content-hash": "187263d279049fb672fd761eb4496970", "packages": [], "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -38,7 +38,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -60,9 +60,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "psr/log", @@ -204,12 +204,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -249,7 +249,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -266,7 +266,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -274,12 +274,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -295,7 +295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -334,7 +334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -350,7 +350,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/plugins/woocommerce-admin/client/products/fields/attribute-field/attribute-field.tsx b/plugins/woocommerce-admin/client/products/fields/attribute-field/attribute-field.tsx index f3fe69a63fb..88a97d01cd3 100644 --- a/plugins/woocommerce-admin/client/products/fields/attribute-field/attribute-field.tsx +++ b/plugins/woocommerce-admin/client/products/fields/attribute-field/attribute-field.tsx @@ -24,7 +24,10 @@ import { getAdminLink } from '@woocommerce/settings'; import './attribute-field.scss'; import { AddAttributeModal } from './add-attribute-modal'; import { EditAttributeModal } from './edit-attribute-modal'; -import { reorderSortableProductAttributePositions } from './utils'; +import { + getAttributeKey, + reorderSortableProductAttributePositions, +} from './utils'; import { sift } from '../../../utils'; import { AttributeEmptyState } from '../attribute-empty-state'; import { @@ -244,10 +247,10 @@ export const AttributeField: React.FC< AttributeFieldProps > = ( { ); const attributeKeyValues = filteredAttributes.reduce( ( - keyValue: Record< number, ProductAttribute >, + keyValue: Record< number | string, ProductAttribute >, attribute: ProductAttribute ) => { - keyValue[ attribute.id ] = attribute; + keyValue[ getAttributeKey( attribute ) ] = attribute; return keyValue; }, {} as Record< number, ProductAttribute > diff --git a/plugins/woocommerce-admin/client/products/fields/attribute-field/test/utils.spec.ts b/plugins/woocommerce-admin/client/products/fields/attribute-field/test/utils.spec.ts index 71964dd5fac..0c3812eafda 100644 --- a/plugins/woocommerce-admin/client/products/fields/attribute-field/test/utils.spec.ts +++ b/plugins/woocommerce-admin/client/products/fields/attribute-field/test/utils.spec.ts @@ -6,7 +6,10 @@ import { ProductAttribute } from '@woocommerce/data'; /** * Internal dependencies */ -import { reorderSortableProductAttributePositions } from '../utils'; +import { + getAttributeKey, + reorderSortableProductAttributePositions, +} from '../utils'; const attributeList: Record< number, ProductAttribute > = { 15: { @@ -38,9 +41,9 @@ const attributeList: Record< number, ProductAttribute > = { describe( 'reorderSortableProductAttributePositions', () => { it( 'should update product attribute positions depending on JSX.Element order', () => { const elements = [ - { key: '3' }, - { key: '15' }, - { key: '1' }, + { props: { attribute: attributeList[ '3' ] } }, + { props: { attribute: attributeList[ '15' ] } }, + { props: { attribute: attributeList[ '1' ] } }, ] as JSX.Element[]; const newList = reorderSortableProductAttributePositions( elements, @@ -53,19 +56,19 @@ describe( 'reorderSortableProductAttributePositions', () => { expect( newList[ 2 ].position ).toEqual( 2 ); expect( newList[ 2 ].id ).toEqual( 1 ); } ); +} ); - it( 'should filter out elements that do not contain a key', () => { - const elements = [ - { key: '3' }, - {}, - { key: '15' }, - {}, - { key: '1' }, - ] as JSX.Element[]; - const newList = reorderSortableProductAttributePositions( - elements, - attributeList - ); - expect( newList.length ).toEqual( 3 ); +describe( 'getAttributeKey', () => { + attributeList[ '20' ] = { + id: 0, + name: 'Quality', + position: 3, + visible: true, + variation: true, + options: [ 'low', 'high' ], + }; + it( 'should return the attribute key', () => { + expect( getAttributeKey( attributeList[ '15' ] ) ).toEqual( 15 ); + expect( getAttributeKey( attributeList[ '20' ] ) ).toEqual( 'Quality' ); } ); } ); diff --git a/plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts b/plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts index 2fc31820553..8548e335bf6 100644 --- a/plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts +++ b/plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts @@ -3,6 +3,18 @@ */ import { ProductAttribute } from '@woocommerce/data'; +/** + * Returns the attribute key. The key will be the `id` or the `name` when the id is 0. + * + * @param { ProductAttribute } attribute product attribute. + * @return string|number + */ +export function getAttributeKey( + attribute: ProductAttribute +): number | string { + return attribute.id !== 0 ? attribute.id : attribute.name; +} + /** * Updates the position of a product attribute from the new items JSX.Element list. * @@ -11,12 +23,12 @@ import { ProductAttribute } from '@woocommerce/data'; */ export function reorderSortableProductAttributePositions( items: JSX.Element[], - attributeKeyValues: Record< number, ProductAttribute > + attributeKeyValues: Record< number | string, ProductAttribute > ): ProductAttribute[] { return items - .map( ( item, index ): ProductAttribute | undefined => { - const key = item.key ? parseInt( item.key as string, 10 ) : NaN; - if ( key !== NaN && attributeKeyValues[ key ] ) { + .map( ( { props }, index ): ProductAttribute | undefined => { + const key = getAttributeKey( props?.attribute ); + if ( attributeKeyValues[ key ] ) { return { ...attributeKeyValues[ key ], position: index, diff --git a/plugins/woocommerce-admin/client/products/fields/options/options.tsx b/plugins/woocommerce-admin/client/products/fields/options/options.tsx index 69b8b0a0e76..c35fa4e2695 100644 --- a/plugins/woocommerce-admin/client/products/fields/options/options.tsx +++ b/plugins/woocommerce-admin/client/products/fields/options/options.tsx @@ -1,13 +1,14 @@ /** * External dependencies */ -import { __ } from '@wordpress/i18n'; -import { ProductAttribute } from '@woocommerce/data'; +import { Product, ProductAttribute } from '@woocommerce/data'; +import { useFormContext } from '@woocommerce/components'; /** * Internal dependencies */ import { AttributeField } from '../attribute-field'; +import { useProductVariationsHelper } from '../../hooks/use-product-variations-helper'; type OptionsProps = { value: ProductAttribute[]; @@ -20,11 +21,19 @@ export const Options: React.FC< OptionsProps > = ( { onChange, productId, } ) => { + const { values } = useFormContext< Product >(); + const { generateProductVariations } = useProductVariationsHelper(); + + const handleChange = async ( attributes: ProductAttribute[] ) => { + onChange( attributes ); + generateProductVariations( { ...values, attributes } ); + }; + return ( ); diff --git a/plugins/woocommerce-admin/client/products/fields/variations/variations.tsx b/plugins/woocommerce-admin/client/products/fields/variations/variations.tsx index f8dfafd04bb..5076f08090d 100644 --- a/plugins/woocommerce-admin/client/products/fields/variations/variations.tsx +++ b/plugins/woocommerce-admin/client/products/fields/variations/variations.tsx @@ -5,6 +5,7 @@ import { __, sprintf } from '@wordpress/i18n'; import { Button, Card, Spinner, Tooltip } from '@wordpress/components'; import { EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME, + Product, ProductVariation, } from '@woocommerce/data'; import { @@ -13,6 +14,7 @@ import { Pagination, Sortable, Tag, + useFormContext, } from '@woocommerce/components'; import { getNewPath } from '@woocommerce/navigation'; import { useContext, useState } from '@wordpress/element'; @@ -55,7 +57,8 @@ export const Variations: React.FC = () => { const [ isUpdating, setIsUpdating ] = useState< Record< string, boolean > >( {} ); - const { productId } = useParams(); + const { values } = useFormContext< Product >(); + const productId = values.id; const context = useContext( CurrencyContext ); const { formatAmount, getCurrencyConfig } = context; const { isLoading, variations, totalCount } = useSelect( @@ -82,7 +85,7 @@ export const Variations: React.FC = () => { getProductVariationsTotalCount< number >( requestParams ), }; }, - [ currentPage, perPage ] + [ currentPage, perPage, productId ] ); const { updateProductVariation } = useDispatch( @@ -202,7 +205,8 @@ export const Variations: React.FC = () => { (); + + const [ isGenerating, setIsGenerating ] = useState( false ); + + const generateProductVariations = useCallback( + async ( product: Partial< Product > ) => { + setIsGenerating( true ); + + const createOrUpdateProduct = product.id + ? () => + updateProduct< Promise< Product > >( + product.id, + product + ) + : () => { + return createProduct< Promise< Product > >( { + ...product, + status: 'auto-draft', + name: product.name || AUTO_DRAFT_NAME, + } ); + }; + + return createOrUpdateProduct() + .then( ( createdOrUpdatedProduct ) => { + if ( ! product.id ) { + resetForm( { + ...createdOrUpdatedProduct, + name: product.name || '', + } ); + } + return _generateProductVariations( { + product_id: createdOrUpdatedProduct.id, + } ); + } ) + .then( () => { + return invalidateResolutionForStoreSelector( + 'getProductVariations' + ); + } ) + .finally( () => { + setIsGenerating( false ); + } ); + }, + [] + ); + + return { + generateProductVariations, + isGenerating, + }; +} diff --git a/plugins/woocommerce-admin/client/products/product-variation-form.tsx b/plugins/woocommerce-admin/client/products/product-variation-form.tsx index 4bc88c23941..738317e0a16 100644 --- a/plugins/woocommerce-admin/client/products/product-variation-form.tsx +++ b/plugins/woocommerce-admin/client/products/product-variation-form.tsx @@ -50,7 +50,7 @@ export const ProductVariationForm: React.FC< { ref={ formRef } > - + diff --git a/plugins/woocommerce-admin/client/products/sections/product-variation-details-section.tsx b/plugins/woocommerce-admin/client/products/sections/product-variation-details-section.tsx index c92c265c1f7..7886d844bb1 100644 --- a/plugins/woocommerce-admin/client/products/sections/product-variation-details-section.tsx +++ b/plugins/woocommerce-admin/client/products/sections/product-variation-details-section.tsx @@ -2,7 +2,7 @@ * External dependencies */ import { __ } from '@wordpress/i18n'; -import { BlockInstance, serialize, parse } from '@wordpress/blocks'; +import { BlockInstance, serialize, rawHandler } from '@wordpress/blocks'; import { CheckboxControl, Card, @@ -55,7 +55,7 @@ export const ProductVariationDetailsSection: React.FC = () => { const [ descriptionBlocks, setDescriptionBlocks ] = useState< BlockInstance[] - >( parse( values.description || '' ) ); + >( rawHandler( { HTML: values.description } ) ); const imageFieldProps = getInputProps( 'image' ); diff --git a/plugins/woocommerce-admin/client/products/use-product-helper.ts b/plugins/woocommerce-admin/client/products/use-product-helper.ts index c53ef2c7f4e..d40129be55b 100644 --- a/plugins/woocommerce-admin/client/products/use-product-helper.ts +++ b/plugins/woocommerce-admin/client/products/use-product-helper.ts @@ -20,7 +20,9 @@ import { recordEvent } from '@woocommerce/tracks'; /** * Internal dependencies */ +import { AUTO_DRAFT_NAME } from './utils/get-product-title'; import { CurrencyContext } from '../lib/currency-context'; +import { getDerivedProductType } from './utils/get-derived-product-type'; import { NUMBERS_AND_DECIMAL_SEPARATOR, ONLY_ONE_DECIMAL_SEPARATOR, @@ -70,8 +72,8 @@ export function useProductHelper() { /** * Create product with status. * - * @param {Product} product the product to be created. - * @param {string} status the product status. + * @param {Product} product the product to be created. + * @param {string} status the product status. * @param {boolean} skipNotice if the notice should be skipped (default: false). * @return {Promise} Returns a promise with the created product. */ @@ -88,6 +90,7 @@ export function useProductHelper() { return createProduct( { ...product, status, + type: getDerivedProductType( product ), } ).then( ( newProduct ) => { if ( ! skipNotice ) { @@ -163,9 +166,9 @@ export function useProductHelper() { /** * Update product with status. * - * @param {number} productId the product id to be updated. - * @param {Product} product the product to be updated. - * @param {string} status the product status. + * @param {number} productId the product id to be updated. + * @param {Product} product the product to be updated. + * @param {string} status the product status. * @param {boolean} skipNotice if the notice should be skipped (default: false). * @return {Promise} Returns a promise with the updated product. */ @@ -183,6 +186,7 @@ export function useProductHelper() { return updateProduct( productId, { ...product, status, + type: getDerivedProductType( product ), } ) .then( async ( updatedProduct ) => updateVariationsOrder( @@ -242,7 +246,7 @@ export function useProductHelper() { * Creates a copy of the given product with the given status. * * @param {Product} product the product to be copied. - * @param {string} status the product status. + * @param {string} status the product status. * @return {Promise} promise with the newly created and copied product. */ const copyProductWithStatus = useCallback( @@ -250,7 +254,7 @@ export function useProductHelper() { return createProductWithStatus( removeReadonlyProperties( { ...product, - name: ( product.name || 'AUTO-DRAFT' ) + ' - Copy', + name: ( product.name || AUTO_DRAFT_NAME ) + ' - Copy', } ), status ); diff --git a/plugins/woocommerce-admin/client/products/utils/get-derived-product-type.ts b/plugins/woocommerce-admin/client/products/utils/get-derived-product-type.ts new file mode 100644 index 00000000000..60ffbd6e73c --- /dev/null +++ b/plugins/woocommerce-admin/client/products/utils/get-derived-product-type.ts @@ -0,0 +1,16 @@ +/** + * External dependencies + */ +import { Product } from '@woocommerce/data'; + +export const getDerivedProductType = ( product: Partial< Product > ) => { + const hasOptions = !! product.attributes?.find( + ( attribute ) => attribute.options.length && attribute.variation + ); + + if ( hasOptions ) { + return 'variable'; + } + + return 'simple'; +}; diff --git a/plugins/woocommerce-admin/client/products/utils/get-product-title.ts b/plugins/woocommerce-admin/client/products/utils/get-product-title.ts index e77175d8eb7..2f92e9d81b9 100644 --- a/plugins/woocommerce-admin/client/products/utils/get-product-title.ts +++ b/plugins/woocommerce-admin/client/products/utils/get-product-title.ts @@ -3,6 +3,8 @@ */ import { __ } from '@wordpress/i18n'; +export const AUTO_DRAFT_NAME = 'AUTO-DRAFT'; + /** * Get the product title for use in the header. * @@ -20,7 +22,7 @@ export const getProductTitle = ( return name; } - if ( persistedName ) { + if ( persistedName && persistedName !== AUTO_DRAFT_NAME ) { return persistedName; } diff --git a/plugins/woocommerce-admin/client/products/utils/test/get-derived-product-type.ts b/plugins/woocommerce-admin/client/products/utils/test/get-derived-product-type.ts new file mode 100644 index 00000000000..67c4117fece --- /dev/null +++ b/plugins/woocommerce-admin/client/products/utils/test/get-derived-product-type.ts @@ -0,0 +1,73 @@ +/** + * Internal dependencies + */ +import { getDerivedProductType } from '../get-derived-product-type'; + +describe( 'getDerivedProductType', () => { + it( 'should be simple when no attributes exist', () => { + const type = getDerivedProductType( { + id: 123, + attributes: [], + } ); + expect( type ).toBe( 'simple' ); + } ); + + it( 'should be simple when no attributes used for variations exist', () => { + const type = getDerivedProductType( { + id: 123, + attributes: [ + { + id: 0, + name: 'Color', + options: [ 'Red', 'Blue' ], + position: 0, + variation: false, + visible: true, + }, + ], + } ); + expect( type ).toBe( 'simple' ); + } ); + + it( 'should be simple when no options exist for a variation', () => { + const type = getDerivedProductType( { + id: 123, + attributes: [ + { + id: 0, + name: 'Color', + options: [], + position: 0, + variation: true, + visible: true, + }, + ], + } ); + expect( type ).toBe( 'simple' ); + } ); + + it( 'should be variable when at least one attribute can be used for variations', () => { + const type = getDerivedProductType( { + id: 123, + attributes: [ + { + id: 0, + name: 'Size', + options: [ 'Small', 'Medium' ], + position: 0, + variation: false, + visible: true, + }, + { + id: 0, + name: 'Color', + options: [ 'Red', 'Blue' ], + position: 1, + variation: true, + visible: true, + }, + ], + } ); + expect( type ).toBe( 'variable' ); + } ); +} ); diff --git a/plugins/woocommerce-admin/client/products/utils/test/get-product-title.test.ts b/plugins/woocommerce-admin/client/products/utils/test/get-product-title.test.ts index fc259aaa216..c132b16c7ec 100644 --- a/plugins/woocommerce-admin/client/products/utils/test/get-product-title.test.ts +++ b/plugins/woocommerce-admin/client/products/utils/test/get-product-title.test.ts @@ -28,4 +28,9 @@ describe( 'getProductTitle', () => { const title = getProductTitle( '', 'custom-type', undefined ); expect( title ).toBe( 'New product' ); } ); + + it( 'should return the generic add new string when the product title is the auto draft title', () => { + const title = getProductTitle( '', 'custom-type', 'AUTO-DRAFT' ); + expect( title ).toBe( 'New product' ); + } ); } ); diff --git a/plugins/woocommerce-beta-tester/changelog/dev-integrate-combo-box-live-branch b/plugins/woocommerce-beta-tester/changelog/dev-integrate-combo-box-live-branch new file mode 100644 index 00000000000..b98dd83d88c --- /dev/null +++ b/plugins/woocommerce-beta-tester/changelog/dev-integrate-combo-box-live-branch @@ -0,0 +1,4 @@ +Significance: minor +Type: add + +Update the live branches UI to improve finding and installing branches. diff --git a/plugins/woocommerce-beta-tester/changelog/update-changelogger b/plugins/woocommerce-beta-tester/changelog/update-changelogger new file mode 100644 index 00000000000..1674c919e78 --- /dev/null +++ b/plugins/woocommerce-beta-tester/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Dev dependency update. + + diff --git a/plugins/woocommerce-beta-tester/composer.json b/plugins/woocommerce-beta-tester/composer.json index 0694cec1b52..9bec634bd68 100644 --- a/plugins/woocommerce-beta-tester/composer.json +++ b/plugins/woocommerce-beta-tester/composer.json @@ -13,7 +13,7 @@ "require-dev": { "phpunit/phpunit": "^6.5 || ^7.5", "woocommerce/woocommerce-sniffs": "^0.1.3", - "automattic/jetpack-changelogger": "3.1.3" + "automattic/jetpack-changelogger": "3.3.0" }, "scripts": { "test": [ diff --git a/plugins/woocommerce-beta-tester/composer.lock b/plugins/woocommerce-beta-tester/composer.lock index 5f443f5dd42..1a608c200b2 100644 --- a/plugins/woocommerce-beta-tester/composer.lock +++ b/plugins/woocommerce-beta-tester/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f1e75252dada3cbba14f5c9b474ace42", + "content-hash": "e1ae720be342a5fd2aa3cbac6514537d", "packages": [ { "name": "composer/installers", @@ -161,27 +161,27 @@ "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -190,7 +190,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -212,9 +212,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", @@ -293,30 +293,30 @@ }, { "name": "doctrine/instantiator", - "version": "1.4.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", "phpbench/phpbench": "^0.16 || ^1", "phpstan/phpstan": "^1.4", "phpstan/phpstan-phpunit": "^1", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", "autoload": { @@ -343,7 +343,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { @@ -359,7 +359,7 @@ "type": "tidelift" } ], - "time": "2022-03-03T08:28:38+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { "name": "myclabs/deep-copy", @@ -594,16 +594,16 @@ }, { "name": "phpcompatibility/phpcompatibility-paragonie", - "version": "1.3.1", + "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", - "reference": "ddabec839cc003651f2ce695c938686d1086cf43" + "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/ddabec839cc003651f2ce695c938686d1086cf43", - "reference": "ddabec839cc003651f2ce695c938686d1086cf43", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/bba5a9dfec7fcfbd679cfaf611d86b4d3759da26", + "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26", "shasum": "" }, "require": { @@ -640,26 +640,27 @@ "paragonie", "phpcs", "polyfill", - "standards" + "standards", + "static analysis" ], "support": { "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues", "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie" }, - "time": "2021-02-15T10:24:51+00:00" + "time": "2022-10-25T01:46:02+00:00" }, { "name": "phpcompatibility/phpcompatibility-wp", - "version": "2.1.3", + "version": "2.1.4", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", - "reference": "d55de55f88697b9cdb94bccf04f14eb3b11cf308" + "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/d55de55f88697b9cdb94bccf04f14eb3b11cf308", - "reference": "d55de55f88697b9cdb94bccf04f14eb3b11cf308", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5", + "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5", "shasum": "" }, "require": { @@ -694,13 +695,14 @@ "compatibility", "phpcs", "standards", + "static analysis", "wordpress" ], "support": { "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues", "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP" }, - "time": "2021-12-30T16:37:40+00:00" + "time": "2022-10-24T09:00:36+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -864,21 +866,21 @@ }, { "name": "phpspec/prophecy", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", + "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", + "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", "sebastian/recursion-context": "^3.0 || ^4.0" @@ -925,9 +927,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" }, - "time": "2021-12-08T12:19:24+00:00" + "time": "2022-11-29T15:06:56+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1415,16 +1417,16 @@ }, { "name": "sebastian/comparator", - "version": "3.0.3", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", "shasum": "" }, "require": { @@ -1477,7 +1479,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" }, "funding": [ { @@ -1485,7 +1487,7 @@ "type": "github" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2022-09-14T12:31:48+00:00" }, { "name": "sebastian/diff", @@ -1618,16 +1620,16 @@ }, { "name": "sebastian/exporter", - "version": "3.1.4", + "version": "3.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db" + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6", + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6", "shasum": "" }, "require": { @@ -1683,7 +1685,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5" }, "funding": [ { @@ -1691,7 +1693,7 @@ "type": "github" } ], - "time": "2021-11-11T13:51:24+00:00" + "time": "2022-09-14T06:00:17+00:00" }, { "name": "sebastian/global-state", @@ -2164,16 +2166,16 @@ }, { "name": "symfony/debug", - "version": "v4.4.41", + "version": "v4.4.44", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -2212,7 +2214,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -2229,20 +2231,20 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -2257,7 +2259,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2296,7 +2298,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -2312,7 +2314,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", diff --git a/plugins/woocommerce-beta-tester/src/live-branches/App.tsx b/plugins/woocommerce-beta-tester/src/live-branches/App.tsx index 525687042ae..9f268128f52 100644 --- a/plugins/woocommerce-beta-tester/src/live-branches/App.tsx +++ b/plugins/woocommerce-beta-tester/src/live-branches/App.tsx @@ -2,15 +2,10 @@ * External dependencies */ import { - Card, - CardBody, - CardFooter, - CardHeader, // @ts-ignore __experimentalHeading as Heading, } from '@wordpress/components'; import { Spinner } from '@woocommerce/components'; -import { css } from '@emotion/react'; /** * Internal dependencies @@ -18,10 +13,6 @@ import { css } from '@emotion/react'; import { useLiveBranchesData } from './hooks/live-branches'; import { BranchList } from './components/BranchList'; -const cardStyle = css( { - marginTop: '32px', -} ); - export const App = () => { const { branches, isLoading } = useLiveBranchesData(); @@ -30,19 +21,7 @@ export const App = () => { Live Branches - Install and test WooCommerce PRs - - -

Active PRs

-
- - { isLoading ? ( - - ) : ( - - ) } - - -
+ { isLoading ? : } ); }; diff --git a/plugins/woocommerce-beta-tester/src/live-branches/components/BranchList.tsx b/plugins/woocommerce-beta-tester/src/live-branches/components/BranchList.tsx index be5f242cebb..4d044ea7e86 100644 --- a/plugins/woocommerce-beta-tester/src/live-branches/components/BranchList.tsx +++ b/plugins/woocommerce-beta-tester/src/live-branches/components/BranchList.tsx @@ -8,15 +8,31 @@ import { __experimentalItem as Item, Button, Spinner, + Card, + CardHeader, + CardBody, + CardFooter, + ComboboxControl, } from '@wordpress/components'; import { useState } from 'react'; +import { css } from '@emotion/react'; /** * Internal dependencies */ import { Branch, useLiveBranchInstall } from '../hooks/live-branches'; -const BranchListItem = ( { branch }: { branch: Branch } ) => { +const cardStyle = css( { + marginTop: '32px', +} ); + +const BranchListItem = ( { + branch, + onBranchActive, +}: { + branch: Branch; + onBranchActive: ( branch: Branch ) => void; +} ) => { const { isError, isInProgress, installAndActivate, activate, status } = useLiveBranchInstall( branch.download_url, @@ -25,14 +41,24 @@ const BranchListItem = ( { branch }: { branch: Branch } ) => { branch.install_status ); + const activateBranch = async () => { + await activate(); + onBranchActive( branch ); + }; + + const installAndActivateBranch = async () => { + await installAndActivate(); + onBranchActive( branch ); + }; + const ActionButton = { 'not-installed': () => ( - ), installed: () => ( - ), @@ -64,22 +90,123 @@ const BranchListItem = ( { branch }: { branch: Branch } ) => { ); }; +const BranchInfo = ( { branch }: { branch: Branch } ) => { + return ( +

+ Pull Request Branch:{ ' ' } + + { branch.branch } + + { ' | ' } + Version: { branch.version } |{ ' ' } + Download URL:{ ' ' } + { branch.download_url } +

+ ); +}; + +const WooCommerceVersionInfo = () => { + // @ts-ignore + const version = window?.wc?.WC_VERSION || 'unknown'; + + return ( +

+ Live branch not installed. Running WooCommerce version: { version } +

+ ); +}; + export const BranchList = ( { branches }: { branches: Branch[] } ) => { - const activeBranch = branches.find( - ( branch ) => branch.install_status === 'active' + const [ activeBranch, setActiveBranch ] = useState< Branch | null >( + branches.find( ( branch ) => branch.install_status === 'active' ) || + null ); - const nonActiveBranches = branches.filter( - ( branch ) => branch.install_status !== 'active' + const installedBranches = branches.filter( + ( branch ) => branch.install_status === 'installed' + ); + + const uninstalledBranches = branches.filter( + ( branch ) => branch.install_status === 'not-installed' + ); + + const [ selectedBranch, setSelectedBranch ] = useState( + uninstalledBranches[ 0 ] ); return ( - - { /* Sort the active branch if it exists to the top of the list */ } - { activeBranch && } - { nonActiveBranches.map( ( branch ) => ( - - ) ) } - + <> + + +

Currently Running

+
+ + { activeBranch && ( + + ) } + { ! activeBranch && } + + +
+ + +

Install and Activate Live Branches

+
+ + { + if ( branchVersion ) { + const branch = branches.find( + ( branch ) => + branch.version === branchVersion + ); + + if ( branch ) { + setSelectedBranch( branch ); + } + } + } } + value={ selectedBranch.version } + options={ uninstalledBranches.map( ( branch ) => { + return { + value: branch.version, + label: branch.branch, + }; + } ) } + /> + + + + +
+ { installedBranches.length && ( + + +

Other Installed Branches

+
+ + + { installedBranches.map( ( branch ) => ( + + ) ) } + + + +
+ ) } + ); }; diff --git a/plugins/woocommerce/bin/composer/mozart/composer.lock b/plugins/woocommerce/bin/composer/mozart/composer.lock index 1b31825ab7b..1554fb40d8b 100644 --- a/plugins/woocommerce/bin/composer/mozart/composer.lock +++ b/plugins/woocommerce/bin/composer/mozart/composer.lock @@ -268,16 +268,16 @@ }, { "name": "symfony/console", - "version": "v5.4.15", + "version": "v5.4.17", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "ea59bb0edfaf9f28d18d8791410ee0355f317669" + "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/ea59bb0edfaf9f28d18d8791410ee0355f317669", - "reference": "ea59bb0edfaf9f28d18d8791410ee0355f317669", + "url": "https://api.github.com/repos/symfony/console/zipball/58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f", + "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f", "shasum": "" }, "require": { @@ -347,7 +347,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.15" + "source": "https://github.com/symfony/console/tree/v5.4.17" }, "funding": [ { @@ -363,7 +363,7 @@ "type": "tidelift" } ], - "time": "2022-10-26T21:41:52+00:00" + "time": "2022-12-28T14:15:31+00:00" }, { "name": "symfony/deprecation-contracts", @@ -434,16 +434,16 @@ }, { "name": "symfony/finder", - "version": "v5.4.11", + "version": "v5.4.17", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c" + "reference": "40c08632019838dfb3350f18cf5563b8080055fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c", - "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c", + "url": "https://api.github.com/repos/symfony/finder/zipball/40c08632019838dfb3350f18cf5563b8080055fc", + "reference": "40c08632019838dfb3350f18cf5563b8080055fc", "shasum": "" }, "require": { @@ -477,7 +477,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.11" + "source": "https://github.com/symfony/finder/tree/v5.4.17" }, "funding": [ { @@ -493,20 +493,20 @@ "type": "tidelift" } ], - "time": "2022-07-29T07:37:50+00:00" + "time": "2022-12-22T10:31:03+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { @@ -521,7 +521,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -559,7 +559,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -575,20 +575,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "433d05519ce6990bf3530fba6957499d327395c2" + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", - "reference": "433d05519ce6990bf3530fba6957499d327395c2", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", "shasum": "" }, "require": { @@ -600,7 +600,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -640,7 +640,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" }, "funding": [ { @@ -656,20 +656,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", "shasum": "" }, "require": { @@ -681,7 +681,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -724,7 +724,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" }, "funding": [ { @@ -740,20 +740,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -768,7 +768,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -807,7 +807,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -823,20 +823,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", "shasum": "" }, "require": { @@ -845,7 +845,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -886,7 +886,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" }, "funding": [ { @@ -902,20 +902,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { @@ -924,7 +924,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -969,7 +969,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" }, "funding": [ { @@ -985,7 +985,7 @@ "type": "tidelift" } ], - "time": "2022-05-10T07:21:04+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/service-contracts", @@ -1072,16 +1072,16 @@ }, { "name": "symfony/string", - "version": "v5.4.15", + "version": "v5.4.17", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed" + "reference": "55733a8664b8853b003e70251c58bc8cb2d82a6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", - "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", + "url": "https://api.github.com/repos/symfony/string/zipball/55733a8664b8853b003e70251c58bc8cb2d82a6b", + "reference": "55733a8664b8853b003e70251c58bc8cb2d82a6b", "shasum": "" }, "require": { @@ -1138,7 +1138,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.15" + "source": "https://github.com/symfony/string/tree/v5.4.17" }, "funding": [ { @@ -1154,7 +1154,7 @@ "type": "tidelift" } ], - "time": "2022-10-05T15:16:54+00:00" + "time": "2022-12-12T15:54:21+00:00" } ], "aliases": [], diff --git a/plugins/woocommerce/bin/composer/wp/composer.lock b/plugins/woocommerce/bin/composer/wp/composer.lock index 7ef28cb0bfd..d97875d11d1 100644 --- a/plugins/woocommerce/bin/composer/wp/composer.lock +++ b/plugins/woocommerce/bin/composer/wp/composer.lock @@ -67,16 +67,16 @@ }, { "name": "gettext/gettext", - "version": "v4.8.7", + "version": "v4.8.8", "source": { "type": "git", "url": "https://github.com/php-gettext/Gettext.git", - "reference": "3f7bc5ef23302a9059e64934f3d59e454516bec0" + "reference": "302a00aa9d6762c92c884d879c15d3ed05d6a37d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/3f7bc5ef23302a9059e64934f3d59e454516bec0", - "reference": "3f7bc5ef23302a9059e64934f3d59e454516bec0", + "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/302a00aa9d6762c92c884d879c15d3ed05d6a37d", + "reference": "302a00aa9d6762c92c884d879c15d3ed05d6a37d", "shasum": "" }, "require": { @@ -128,7 +128,7 @@ "support": { "email": "oom@oscarotero.com", "issues": "https://github.com/oscarotero/Gettext/issues", - "source": "https://github.com/php-gettext/Gettext/tree/v4.8.7" + "source": "https://github.com/php-gettext/Gettext/tree/v4.8.8" }, "funding": [ { @@ -144,7 +144,7 @@ "type": "patreon" } ], - "time": "2022-08-02T09:42:10+00:00" + "time": "2022-12-08T11:59:50+00:00" }, { "name": "gettext/languages", @@ -434,16 +434,16 @@ }, { "name": "wp-cli/i18n-command", - "version": "v2.4.0", + "version": "v2.4.1", "source": { "type": "git", "url": "https://github.com/wp-cli/i18n-command.git", - "reference": "45bc2b47a4ed103b871cd2ec5b483ab55ad12d99" + "reference": "22f7e6aa6ba23d0b50c45c75386c8151b991477e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/45bc2b47a4ed103b871cd2ec5b483ab55ad12d99", - "reference": "45bc2b47a4ed103b871cd2ec5b483ab55ad12d99", + "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/22f7e6aa6ba23d0b50c45c75386c8151b991477e", + "reference": "22f7e6aa6ba23d0b50c45c75386c8151b991477e", "shasum": "" }, "require": { @@ -496,9 +496,9 @@ "homepage": "https://github.com/wp-cli/i18n-command", "support": { "issues": "https://github.com/wp-cli/i18n-command/issues", - "source": "https://github.com/wp-cli/i18n-command/tree/v2.4.0" + "source": "https://github.com/wp-cli/i18n-command/tree/v2.4.1" }, - "time": "2022-07-04T21:43:20+00:00" + "time": "2022-12-09T19:09:17+00:00" }, { "name": "wp-cli/mustangostang-spyc", diff --git a/plugins/woocommerce/changelog/add-35778 b/plugins/woocommerce/changelog/add-35778 new file mode 100644 index 00000000000..69148c44e73 --- /dev/null +++ b/plugins/woocommerce/changelog/add-35778 @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Auto generate variations on option changes diff --git a/plugins/woocommerce/changelog/add-36117 b/plugins/woocommerce/changelog/add-36117 new file mode 100644 index 00000000000..e0727aa9e19 --- /dev/null +++ b/plugins/woocommerce/changelog/add-36117 @@ -0,0 +1,4 @@ +Significance: minor +Type: add + +Add ability to filter variations by local attributes in REST API diff --git a/plugins/woocommerce/changelog/dev-33551_streamline_first_variation_creation b/plugins/woocommerce/changelog/dev-33551_streamline_first_variation_creation deleted file mode 100644 index 6ea52390c8e..00000000000 --- a/plugins/woocommerce/changelog/dev-33551_streamline_first_variation_creation +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: dev - -Automatically show attributes in Variations diff --git a/plugins/woocommerce/changelog/dev-update-browserslist-config b/plugins/woocommerce/changelog/dev-update-browserslist-config new file mode 100644 index 00000000000..e693d55dc97 --- /dev/null +++ b/plugins/woocommerce/changelog/dev-update-browserslist-config @@ -0,0 +1,4 @@ +Significance: major +Type: dev + +Update the browserslist config for legacy client JS to match Wordpress. diff --git a/plugins/woocommerce/changelog/e2e-daily-shopper b/plugins/woocommerce/changelog/e2e-daily-shopper new file mode 100644 index 00000000000..3825e814eed --- /dev/null +++ b/plugins/woocommerce/changelog/e2e-daily-shopper @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +Make shopper tests passable on daily smoke test site. diff --git a/plugins/woocommerce/changelog/e2e-fix-obw-industry-spec b/plugins/woocommerce/changelog/e2e-fix-obw-industry-spec new file mode 100644 index 00000000000..734416dfad8 --- /dev/null +++ b/plugins/woocommerce/changelog/e2e-fix-obw-industry-spec @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +Fix flakiness of the `can save industry changes when navigating back to "Store Details"` E2E test. diff --git a/plugins/woocommerce/changelog/fix-35647-hpos-meta-boxes b/plugins/woocommerce/changelog/fix-35647-hpos-meta-boxes new file mode 100644 index 00000000000..391f689ee59 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-35647-hpos-meta-boxes @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak + +Makes it possible to use an `add_meta_boxes_` style hook in the HPOS editor, for parity with the traditional post editor. diff --git a/plugins/woocommerce/changelog/fix-35831 b/plugins/woocommerce/changelog/fix-35831 new file mode 100644 index 00000000000..88b473b7fbe --- /dev/null +++ b/plugins/woocommerce/changelog/fix-35831 @@ -0,0 +1,4 @@ +Significance: patch +Type: performance + +Speed up HPOS search query by using group by instead of distinct. diff --git a/plugins/woocommerce/changelog/fix-36190_attribute_lists_corrupt_renders b/plugins/woocommerce/changelog/fix-36190_attribute_lists_corrupt_renders new file mode 100644 index 00000000000..99d4514d606 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-36190_attribute_lists_corrupt_renders @@ -0,0 +1,4 @@ +Significance: minor +Type: fix + +Fix attributes/options lists corrupt render #36236 diff --git a/plugins/woocommerce/changelog/fix-36204 b/plugins/woocommerce/changelog/fix-36204 new file mode 100644 index 00000000000..b82f195a017 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-36204 @@ -0,0 +1,4 @@ +Significance: minor +Type: tweak + +Derive product type from product attributes diff --git a/plugins/woocommerce/changelog/fix-36206 b/plugins/woocommerce/changelog/fix-36206 new file mode 100644 index 00000000000..22250127df6 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-36206 @@ -0,0 +1,4 @@ +Significance: minor +Type: fix + +Convert HTML to blocks in product variation description diff --git a/plugins/woocommerce/changelog/fix-36212 b/plugins/woocommerce/changelog/fix-36212 new file mode 100644 index 00000000000..9540f4d7035 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-36212 @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Skip custom search for HPOS API queries as it's handled already. diff --git a/plugins/woocommerce/changelog/fix-36237 b/plugins/woocommerce/changelog/fix-36237 new file mode 100644 index 00000000000..fa4b0ffbd34 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-36237 @@ -0,0 +1,4 @@ +Significance: minor +Type: fix + +Fix navigation between variations and tab selection diff --git a/plugins/woocommerce/changelog/fix-coupon-code-a11y b/plugins/woocommerce/changelog/fix-coupon-code-a11y new file mode 100644 index 00000000000..6a4f60b8cc6 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-coupon-code-a11y @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Improve accessibility of the coupon code label, in the context of the cart page. diff --git a/plugins/woocommerce/changelog/fix-remove-redundant-pinterest-from-marketing-task b/plugins/woocommerce/changelog/fix-remove-redundant-pinterest-from-marketing-task deleted file mode 100644 index 5cd632d56f9..00000000000 --- a/plugins/woocommerce/changelog/fix-remove-redundant-pinterest-from-marketing-task +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Remove redundant Pinterest plugin from marketing task diff --git a/plugins/woocommerce/changelog/fix-typo-in-regenerate_report_data-doc b/plugins/woocommerce/changelog/fix-typo-in-regenerate_report_data-doc new file mode 100644 index 00000000000..b535c082585 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-typo-in-regenerate_report_data-doc @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak + +Fix typo in a function comment. diff --git a/plugins/woocommerce/changelog/fix-wc-cli-commands b/plugins/woocommerce/changelog/fix-wc-cli-commands new file mode 100644 index 00000000000..176fd4ad1e6 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-wc-cli-commands @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fix the signature mismatch affecting wc cli commands ability to fetch user subscription data. diff --git a/plugins/woocommerce/changelog/update-changelogger b/plugins/woocommerce/changelog/update-changelogger new file mode 100644 index 00000000000..29fcd182779 --- /dev/null +++ b/plugins/woocommerce/changelog/update-changelogger @@ -0,0 +1,5 @@ +Significance: patch +Type: dev +Comment: Updating a dev dependency, shipped package should not be affected. + + diff --git a/plugins/woocommerce/changelog/update-fix-country-select-control-match b/plugins/woocommerce/changelog/update-fix-country-select-control-match deleted file mode 100644 index 65c9ab1c64e..00000000000 --- a/plugins/woocommerce/changelog/update-fix-country-select-control-match +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Match country name or ' - region' when filtering country select control #36120 \ No newline at end of file diff --git a/plugins/woocommerce/client/legacy/.browserslistrc b/plugins/woocommerce/client/legacy/.browserslistrc index 5d191931ac1..0152f61ef03 100644 --- a/plugins/woocommerce/client/legacy/.browserslistrc +++ b/plugins/woocommerce/client/legacy/.browserslistrc @@ -1,3 +1 @@ -> 0.1% -ie 8 -ie 9 +extends @wordpress/browserslist-config diff --git a/plugins/woocommerce/client/legacy/css/woocommerce-layout.scss b/plugins/woocommerce/client/legacy/css/woocommerce-layout.scss index 2ff2655a82f..d9d4eafa2b0 100644 --- a/plugins/woocommerce/client/legacy/css/woocommerce-layout.scss +++ b/plugins/woocommerce/client/legacy/css/woocommerce-layout.scss @@ -284,10 +284,6 @@ .coupon { float: left; - - label { - display: none; - } } } } diff --git a/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product-variation.js b/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product-variation.js index 53e16d05c41..84eab9d8bd5 100644 --- a/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product-variation.js +++ b/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product-variation.js @@ -49,10 +49,6 @@ jQuery( function ( $ ) { '.wc_input_variations_price', this.maybe_enable_button_to_add_price_to_variations ); - $( 'ul.wc-tabs a[href=#variable_product_options]' ).on( - 'click', - this.maybe_add_attributes_to_variations - ); }, /** @@ -377,24 +373,6 @@ jQuery( function ( $ ) { } ); }, - - /** - * Maybe add attributes to variations - */ - maybe_add_attributes_to_variations: function () { - var has_variation_attributes = $( - 'select.attribute_taxonomy' - ).data( 'is-used-for-variations' ); - if ( has_variation_attributes ) { - wc_meta_boxes_product_variations_ajax.link_all_variations( - true - ); - $( 'select.attribute_taxonomy' ).data( - 'is-used-for-variations', - false - ); - } - }, }; /** @@ -1017,16 +995,14 @@ jQuery( function ( $ ) { * * @return {Bool} */ - link_all_variations: function ( auto_link_variations = false ) { + link_all_variations: function () { wc_meta_boxes_product_variations_ajax.check_for_changes(); - var is_confirmed_action = auto_link_variations - ? true - : window.confirm( - woocommerce_admin_meta_boxes_variations.i18n_link_all_variations - ); - - if ( is_confirmed_action ) { + if ( + window.confirm( + woocommerce_admin_meta_boxes_variations.i18n_link_all_variations + ) + ) { wc_meta_boxes_product_variations_ajax.block(); var data = { diff --git a/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product.js b/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product.js index 3891fcc55d1..bebb8f422f0 100644 --- a/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product.js +++ b/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product.js @@ -775,13 +775,6 @@ jQuery( function ( $ ) { 'disabled-items', newSelectedAttributes ); - var isUsedForVariations = $( 'input#used-for-variation' ).is( - ':checked' - ); - $( 'select.attribute_taxonomy' ).data( - 'is-used-for-variations', - isUsedForVariations - ); // Reload variations panel. var this_page = window.location.toString(); @@ -1046,6 +1039,7 @@ jQuery( function ( $ ) { keepAlive: true, } ); + // add a tooltip to the right of the product image meta box "Set product image" and "Add product gallery images" const setProductImageLink = $( '#set-post-thumbnail' ); const tooltipMarkup = ``; diff --git a/plugins/woocommerce/composer.json b/plugins/woocommerce/composer.json index d5daec6c988..a5c66e2a55f 100644 --- a/plugins/woocommerce/composer.json +++ b/plugins/woocommerce/composer.json @@ -27,7 +27,7 @@ "bamarni/composer-bin-plugin": "^1.4", "yoast/phpunit-polyfills": "^1.0", "phpunit/phpunit": "7.5.20", - "automattic/jetpack-changelogger": "3.1.3", + "automattic/jetpack-changelogger": "^3.3.0", "sebastian/comparator": "3.0.3" }, "config": { diff --git a/plugins/woocommerce/composer.lock b/plugins/woocommerce/composer.lock index 635c758280d..489d1160c49 100644 --- a/plugins/woocommerce/composer.lock +++ b/plugins/woocommerce/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7b14c7f0f38737384718c9a013402d48", + "content-hash": "e07f604ec32eb59e76bf37b0126d4533", "packages": [ { "name": "automattic/jetpack-autoloader", @@ -691,27 +691,27 @@ "packages-dev": [ { "name": "automattic/jetpack-changelogger", - "version": "v3.1.3", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/Automattic/jetpack-changelogger.git", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0" + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", - "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0", + "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959", + "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/console": "^3.4 || ^5.2", - "symfony/process": "^3.4 || ^5.2", + "symfony/console": "^3.4 || ^5.2 || ^6.0", + "symfony/process": "^3.4 || ^5.2 || ^6.0", "wikimedia/at-ease": "^1.2 || ^2.0" }, "require-dev": { "wikimedia/testing-access-wrapper": "^1.0 || ^2.0", - "yoast/phpunit-polyfills": "1.0.3" + "yoast/phpunit-polyfills": "1.0.4" }, "bin": [ "bin/changelogger" @@ -720,7 +720,7 @@ "extra": { "autotagger": true, "branch-alias": { - "dev-trunk": "3.1.x-dev" + "dev-trunk": "3.3.x-dev" }, "mirror-repo": "Automattic/jetpack-changelogger", "version-constants": { @@ -742,9 +742,9 @@ ], "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.", "support": { - "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3" + "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0" }, - "time": "2022-06-21T07:31:56+00:00" + "time": "2022-12-26T13:49:01+00:00" }, { "name": "bamarni/composer-bin-plugin", diff --git a/plugins/woocommerce/includes/admin/helper/class-wc-helper.php b/plugins/woocommerce/includes/admin/helper/class-wc-helper.php index de712d82f6a..b23a6c129f3 100644 --- a/plugins/woocommerce/includes/admin/helper/class-wc-helper.php +++ b/plugins/woocommerce/includes/admin/helper/class-wc-helper.php @@ -1280,6 +1280,8 @@ class WC_Helper { $source = 'inbox-notes'; elseif ( stripos( $request_uri, 'admin-ajax.php' ) ) : $source = 'heartbeat-api'; + elseif ( defined( 'WP_CLI' ) && WP_CLI ) : + $source = 'wc-cli'; endif; // Obtain the connected user info. @@ -1287,7 +1289,7 @@ class WC_Helper { 'subscriptions', array( 'authenticated' => true, - 'query_string' => esc_url( '?source=' . $source ), + 'query_string' => '' !== $source ? esc_url( '?source=' . $source ) : '', ) ); diff --git a/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-attribute.php b/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-attribute.php index f63e6444159..56b248e409f 100644 --- a/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-attribute.php +++ b/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-attribute.php @@ -87,7 +87,7 @@ if ( ! defined( 'ABSPATH' ) ) {
- +
diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php index 88601765bc7..39cf28d7a59 100644 --- a/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php +++ b/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php @@ -8,8 +8,11 @@ * @since 2.6.0 */ +use Automattic\WooCommerce\Utilities\OrderUtil; + defined( 'ABSPATH' ) || exit; +// phpcs:disable Squiz.Classes.ClassFileName.NoMatch, Squiz.Classes.ValidClassName.NotCamelCaps -- Legacy class name, can't change without breaking backward compat. /** * REST API Orders controller class. * @@ -18,6 +21,7 @@ defined( 'ABSPATH' ) || exit; */ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller { + // phpcs:enable /** * Endpoint namespace. * @@ -314,7 +318,7 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller { if ( array_key_exists( $meta_item->id, $formatted_meta_data ) ) { $formatted_meta_item = $formatted_meta_data[ $meta_item->id ]; - $result['display_key'] = wc_clean( $formatted_meta_item->display_key ); + $result['display_key'] = wc_clean( $formatted_meta_item->display_key ); $result['display_value'] = wc_clean( $formatted_meta_item->display_value ); } @@ -346,14 +350,14 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller { // Only fetch fields that we need. $fields = $this->get_fields_for_response( $this->request ); foreach ( $dependent_fields as $field_key => $dependency ) { - if ( in_array( $field_key, $fields ) && ! in_array( $dependency, $fields ) ) { + if ( in_array( $field_key, $fields, true ) && ! in_array( $dependency, $fields, true ) ) { $fields[] = $dependency; } } - $extra_fields = array_intersect( $extra_fields, $fields ); - $format_decimal = array_intersect( $format_decimal, $fields ); - $format_date = array_intersect( $format_date, $fields ); + $extra_fields = array_intersect( $extra_fields, $fields ); + $format_decimal = array_intersect( $format_decimal, $fields ); + $format_date = array_intersect( $format_date, $fields ); $format_line_items = array_intersect( $format_line_items, $fields ); @@ -506,6 +510,8 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller { * @param WP_REST_Response $response The response object. * @param WC_Data $object Object data. * @param WP_REST_Request $request Request object. + * + * @since 4.5.0 */ return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request ); } @@ -594,7 +600,7 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller { } // Search. - if ( ! empty( $args['s'] ) ) { + if ( ! OrderUtil::custom_orders_table_usage_is_enabled() && ! empty( $args['s'] ) ) { $order_ids = wc_order_search( $args['s'] ); if ( ! empty( $order_ids ) ) { @@ -610,6 +616,8 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller { * * @param array $args Key value array of query var to query value. * @param WP_REST_Request $request The request used. + * + * @since 4.5.0. */ $args = apply_filters( 'woocommerce_rest_orders_prepare_object_query', $args, $request ); @@ -693,6 +701,8 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller { * @param WC_Data $order Object object. * @param WP_REST_Request $request Request object. * @param bool $creating If is creating a new object. + * + * @since 4.5.0. */ return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $order, $request, $creating ); } @@ -979,6 +989,14 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller { // Prepare item data. $item = $this->$method( $posted, $action, $item ); + /** + * Allow extensions be notified before the item before is saved. + * + * @param WC_Order_Item $item The item object. + * @param array $posted The item data. + * + * @since 4.5.0. + */ do_action( 'woocommerce_rest_set_order_item', $item, $posted ); // If creating the order, add the item to it. diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php index 8c025b89a53..da5ba612522 100644 --- a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php +++ b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php @@ -809,6 +809,22 @@ class WC_REST_Product_Variations_Controller extends WC_REST_Product_Variations_V // Set post_status. $args['post_status'] = $request['status']; + // Filter by local attributes. + if ( ! empty( $request['local_attributes'] ) && is_array( $request['local_attributes'] ) ) { + foreach ( $request['local_attributes'] as $attribute ) { + if ( ! isset( $attribute['attribute'] ) || ! isset( $attribute['term'] ) ) { + continue; + } + $args['meta_query'] = $this->add_meta_query( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query + $args, + array( + 'key' => 'attribute_' . $attribute['attribute'], + 'value' => $attribute['term'], + ) + ); + } + } + // Filter by sku. if ( ! empty( $request['sku'] ) ) { $skus = explode( ',', $request['sku'] ); diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php index 3c7b79b7d66..2cc6137d064 100644 --- a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php +++ b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php @@ -867,7 +867,7 @@ class WC_REST_Products_Controller extends WC_REST_Products_V2_Controller { 'description' => __( 'Product status (post status).', 'woocommerce' ), 'type' => 'string', 'default' => 'publish', - 'enum' => array_merge( array_keys( get_post_statuses() ), array( 'future' ) ), + 'enum' => array_merge( array_keys( get_post_statuses() ), array( 'future', 'auto-draft', 'trash' ) ), 'context' => array( 'view', 'edit' ), ), 'featured' => array( diff --git a/plugins/woocommerce/package.json b/plugins/woocommerce/package.json index 6a43466b9b7..08578cd8252 100644 --- a/plugins/woocommerce/package.json +++ b/plugins/woocommerce/package.json @@ -108,5 +108,8 @@ "> 0.1%", "ie 8", "ie 9" - ] + ], + "dependencies": { + "@wordpress/browserslist-config": "^5.7.0" + } } diff --git a/plugins/woocommerce/src/Admin/ReportsSync.php b/plugins/woocommerce/src/Admin/ReportsSync.php index 8ab314d7f61..520470423fe 100644 --- a/plugins/woocommerce/src/Admin/ReportsSync.php +++ b/plugins/woocommerce/src/Admin/ReportsSync.php @@ -71,7 +71,7 @@ class ReportsSync { * Regenerate data for reports. * * @param int|bool $days Number of days to import. - * @param bool $skip_existing Skip exisiting records. + * @param bool $skip_existing Skip existing records. * @return string */ public static function regenerate_report_data( $days, $skip_existing ) { diff --git a/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php b/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php index b268779a2e1..9dc6553ca1e 100644 --- a/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php +++ b/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php @@ -89,6 +89,7 @@ class Edit { */ public function setup( \WC_Order $order ) { $this->order = $order; + $wc_screen_id = wc_get_page_screen_id( 'shop-order' ); $current_screen = get_current_screen(); $current_screen->is_block_editor( false ); $this->screen_id = $current_screen->id; @@ -107,7 +108,18 @@ class Edit { * * @since 3.8.0. */ - do_action( 'add_meta_boxes', wc_get_page_screen_id( 'shop-order' ), $this->order ); + do_action( 'add_meta_boxes', $wc_screen_id, $this->order ); + + /** + * Provides an opportunity to inject custom meta boxes into the order editor screen. This + * hook is an analog of `add_meta_boxes_` as provided by WordPress core. + * + * @since 7.4.0 + * + * @oaram WC_Order $order The order being edited. + */ + do_action( 'add_meta_boxes_' . $wc_screen_id, $this->order ); + $this->enqueue_scripts(); } diff --git a/plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php b/plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php index 6b548868c17..60af687f117 100644 --- a/plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php +++ b/plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php @@ -365,6 +365,8 @@ class ListTable extends WP_List_Table { $direction = strtoupper( sanitize_text_field( wp_unslash( $_GET['order'] ?? '' ) ) ); if ( ! in_array( $field, $sortable, true ) ) { + $this->order_query_args['orderby'] = 'id'; + $this->order_query_args['order'] = 'DESC'; return; } diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php index f2543f037f6..9326b05498d 100644 --- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php +++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php @@ -911,8 +911,6 @@ WHERE return array_map( 'intval', (array) apply_filters( 'woocommerce_cot_shop_order_search_results', $order_ids, $term ) ); } - //phpcs:enable Squiz.Commenting, Generic.Commenting - /** * Fetch order type for orders in bulk. * @@ -1736,9 +1734,6 @@ FROM $order_meta_table ); } - - //phpcs:disable Squiz.Commenting, Generic.Commenting - /** * Method to delete an order from the database. * @@ -1799,7 +1794,8 @@ FROM $order_meta_table /** * Trashes an order. * - * @param WC_Order $order The order object + * @param WC_Order $order The order object. + * * @return void */ public function trash_order( $order ) { @@ -1919,9 +1915,9 @@ FROM $order_meta_table $data_synchronizer = wc_get_container()->get( DataSynchronizer::class ); if ( $data_synchronizer->data_sync_is_enabled() ) { - //The previous $order->save() will have forced a sync to the posts table, - //this implies that the post status is not "trash" anymore, and thus - //wp_untrash_post would do nothing. + // The previous $order->save() will have forced a sync to the posts table, + // this implies that the post status is not "trash" anymore, and thus + // wp_untrash_post would do nothing. wp_update_post( array( 'ID' => $id, @@ -1998,6 +1994,8 @@ FROM $order_meta_table * This should not contain and specific meta or actions, so that it can be used other order types safely. * * @param \WC_Order $order Order object. + * @param bool $force_all_fields Force update all fields, instead of calculating and updating only changed fields. + * @param bool $backfill Whether to backfill data to post datastore. * * @return void * @@ -2027,7 +2025,7 @@ FROM $order_meta_table /** * Method to update an order in the database. * - * @param \WC_Order $order + * @param \WC_Order $order Order object. */ public function update( &$order ) { // Before updating, ensure date paid is set if missing. @@ -2083,6 +2081,7 @@ FROM $order_meta_table * This is expected to be reused by other order types, and should not contain any specific metadata updates or actions. * * @param \WC_Order $order Order object. + * @param bool $backfill Whether to backfill data to post tables. * * @return array $changes Array of changes. * @@ -2135,7 +2134,8 @@ FROM $order_meta_table /** * Helper function to update billing and shipping address metadata. - * @param \WC_Abstract_Order $order Order Object + * + * @param \WC_Abstract_Order $order Order Object. * @param array $changes Array of changes. * * @return void @@ -2234,6 +2234,13 @@ FROM $order_meta_table } + /** + * Performs actual query to get orders. Uses `OrdersTableQuery` to build and generate the query. + * + * @param array $query_vars Query variables. + * + * @return array|object List of orders and count of orders. + */ public function query( $query_vars ) { if ( ! isset( $query_vars['paginate'] ) || ! $query_vars['paginate'] ) { $query_vars['no_found_rows'] = true; @@ -2282,10 +2289,6 @@ FROM $order_meta_table return $orders; } - public function get_order_item_type( $order, $order_item_id ) { - return 'line_item'; - } - //phpcs:enable Squiz.Commenting, Generic.Commenting /** diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php index 8b71df2aed5..213ccdff5e7 100644 --- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php +++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php @@ -572,9 +572,6 @@ class OrdersTableQuery { $this->join = $sql['join'] ? array_merge( $this->join, $sql['join'] ) : $this->join; $this->where = $sql['where'] ? array_merge( $this->where, array( $sql['where'] ) ) : $this->where; - if ( $sql['join'] ) { - $this->groupby[] = "{$this->tables['orders']}.id"; - } } // Date queries. @@ -588,12 +585,10 @@ class OrdersTableQuery { $orders_table = $this->tables['orders']; - // SELECT [fields]. - $this->fields = "{$orders_table}.id"; - $fields = $this->fields; - - // SQL_CALC_FOUND_ROWS. - $found_rows = ''; + // Group by is a faster substitute for DISTINCT, as long as we are only selecting IDs. MySQL don't like it when we join tables and use DISTINCT. + $this->groupby[] = "{$this->tables['orders']}.id"; + $this->fields = "{$orders_table}.id"; + $fields = $this->fields; // JOIN. $join = implode( ' ', array_unique( array_filter( array_map( 'trim', $this->join ) ) ) ); @@ -619,7 +614,7 @@ class OrdersTableQuery { // GROUP BY. $groupby = $this->groupby ? 'GROUP BY ' . implode( ', ', (array) $this->groupby ) : ''; - $this->sql = "SELECT $found_rows DISTINCT $fields FROM $orders_table $join WHERE $where $groupby $orderby $limits"; + $this->sql = "SELECT $fields FROM $orders_table $join WHERE $where $groupby $orderby $limits"; $this->build_count_query( $fields, $join, $where, $groupby ); } @@ -636,7 +631,7 @@ class OrdersTableQuery { wc_doing_it_wrong( __FUNCTION__, 'Count query can only be build after main query is built.', '7.3.0' ); } $orders_table = $this->tables['orders']; - $this->count_sql = "SELECT COUNT(DISTINCT $fields) FROM $orders_table $join WHERE $where $groupby"; + $this->count_sql = "SELECT COUNT(DISTINCT $fields) FROM $orders_table $join WHERE $where"; } /** diff --git a/plugins/woocommerce/templates/cart/cart.php b/plugins/woocommerce/templates/cart/cart.php index ed571ab99ca..a8f8c22d83d 100644 --- a/plugins/woocommerce/templates/cart/cart.php +++ b/plugins/woocommerce/templates/cart/cart.php @@ -12,7 +12,7 @@ * * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce\Templates - * @version 7.0.1 + * @version 7.4.0 */ defined( 'ABSPATH' ) || exit; @@ -144,7 +144,7 @@ do_action( 'woocommerce_before_cart' ); ?>
- +
diff --git a/plugins/woocommerce/tests/e2e-pw/global-setup.js b/plugins/woocommerce/tests/e2e-pw/global-setup.js index 071b233b426..ca20d995231 100644 --- a/plugins/woocommerce/tests/e2e-pw/global-setup.js +++ b/plugins/woocommerce/tests/e2e-pw/global-setup.js @@ -1,6 +1,7 @@ const { chromium, expect } = require( '@playwright/test' ); const { admin, customer } = require( './test-data/data' ); const fs = require( 'fs' ); +const { site } = require( './utils' ); module.exports = async ( config ) => { const { stateDir, baseURL, userAgent } = config.projects[ 0 ].use; @@ -166,4 +167,11 @@ module.exports = async ( config ) => { await adminContext.close(); await customerContext.close(); await browser.close(); + + if ( process.env.RESET_SITE === 'true' ) { + await site.reset( + process.env.CONSUMER_KEY, + process.env.CONSUMER_SECRET + ); + } }; diff --git a/plugins/woocommerce/tests/e2e-pw/test-data/data.js b/plugins/woocommerce/tests/e2e-pw/test-data/data.js index 17f505ae837..c4423c86be4 100644 --- a/plugins/woocommerce/tests/e2e-pw/test-data/data.js +++ b/plugins/woocommerce/tests/e2e-pw/test-data/data.js @@ -5,6 +5,8 @@ const { CUSTOMER_USER, CUSTOMER_PASSWORD, CUSTOMER_USER_EMAIL, + CUSTOMER_FIRST_NAME, + CUSTOMER_LAST_NAME, USE_WP_ENV, } = process.env; @@ -22,6 +24,8 @@ const customer = { username: CUSTOMER_USER ?? 'customer', password: CUSTOMER_PASSWORD ?? 'password', email: CUSTOMER_USER_EMAIL ?? 'customer@woocommercecoree2etestsuite.com', + first_name: CUSTOMER_FIRST_NAME ?? 'Jane', + last_name: CUSTOMER_LAST_NAME ?? 'Smith', billing: { us: { first_name: 'Maggie', diff --git a/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/complete-onboarding-wizard.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/complete-onboarding-wizard.spec.js index 6aad523cb38..6fe61713ae1 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/complete-onboarding-wizard.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/complete-onboarding-wizard.spec.js @@ -27,6 +27,10 @@ test.describe( 'Store owner can complete onboarding wizard', () => { storeDetails.us.expectedIndustries ); await page.click( 'button >> text=Continue' ); + await expect( page ).toHaveURL( /.*step=product-types/ ); + await expect( + page.locator( '.product-types button >> text=Continue' ) + ).toBeVisible(); } ); // eslint-disable-next-line jest/expect-expect @@ -41,8 +45,8 @@ test.describe( 'Store owner can complete onboarding wizard', () => { // Navigate back to "Store Details" section await page.click( 'button >> text=Store Details' ); - await onboarding.handleSaveChangesModal( page, { saveChanges: true } ); + await page.locator( 'text="Welcome to WooCommerce"' ).waitFor(); // Navigate back to "Industry" section await page.click( 'button >> text=Industry' ); diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-order.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-order.spec.js index bb19947a9dc..cc4dc3f675a 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-order.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-order.spec.js @@ -8,12 +8,15 @@ const groupedProductName = 'Add new order grouped product'; const taxClasses = [ { name: 'Tax Class Simple', + slug: 'tax-class-simple', }, { name: 'Tax Class Variable', + slug: 'tax-class-variable', }, { name: 'Tax Class External', + slug: 'tax-class-external', }, ]; const taxRates = [ @@ -33,7 +36,6 @@ const taxRates = [ class: 'tax-class-external', }, ]; -const taxClassSlugs = []; const taxTotals = [ '10.00', '20.00', '240.00' ]; let simpleProductId, variableProductId, @@ -58,12 +60,8 @@ test.describe( 'WooCommerce Orders > Add new order', () => { value: 'yes', } ); // add tax classes - for ( let i = 0; i < taxClasses.length; i++ ) { - await api - .post( 'taxes/classes', taxClasses[ i ] ) - .then( ( response ) => { - taxClassSlugs[ i ] = response.data.slug; - } ); + for ( const taxClass of taxClasses ) { + await api.post( 'taxes/classes', taxClass ); } // attach rates to the classes for ( let i = 0; i < taxRates.length; i++ ) { @@ -181,10 +179,22 @@ test.describe( 'WooCommerce Orders > Add new order', () => { ], } ); // clean up tax classes and rates - for ( let i = 0; i < taxClassSlugs.length; i++ ) { - await api.delete( `taxes/classes/${ taxClassSlugs[ i ] }`, { - force: true, - } ); + for ( const { slug } of taxClasses ) { + await api + .delete( `taxes/classes/${ slug }`, { + force: true, + } ) + .catch( ( error ) => { + if ( + error.response.data.code === + 'woocommerce_rest_invalid_tax_class' + ) { + // do nothing, probably the tax class was not created due to a failing test + } else { + // Something else went wrong. + throw new Error( error.response.data ); + } + } ); } // turn off taxes await api.put( 'settings/general/woocommerce_calc_taxes', { diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-shipping-zones.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-shipping-zones.spec.js index f89ec6a5ca5..813dd7a16e4 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-shipping-zones.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-shipping-zones.spec.js @@ -21,17 +21,6 @@ test.describe( 'WooCommerce Shipping Settings - Add new shipping zone', () => { await api.put( 'settings/general/woocommerce_allowed_countries', { value: 'all', } ); - - // Delete all pre-existing shipping zones - const { data: zones } = await api.get( 'shipping/zones' ); - - const zoneIds = zones - .filter( ( { id } ) => id > 0 ) - .map( ( { id } ) => id ); - - for ( const id of zoneIds ) { - await api.delete( `shipping/zones/${ id }`, { force: true } ); - } } ); test.afterAll( async ( { baseURL } ) => { @@ -67,7 +56,8 @@ test.describe( 'WooCommerce Shipping Settings - Add new shipping zone', () => { // this shipping zone already exists, don't create it } else { await page.goto( - 'wp-admin/admin.php?page=wc-settings&tab=shipping&zone_id=new' + 'wp-admin/admin.php?page=wc-settings&tab=shipping&zone_id=new', + { waitUntil: 'networkidle' } ); await page.fill( '#zone_name', shippingZoneNameLocalPickup ); @@ -90,6 +80,12 @@ test.describe( 'WooCommerce Shipping Settings - Add new shipping zone', () => { 'local_pickup' ); await page.click( '#btn-ok' ); + await page.waitForLoadState( 'networkidle' ); + await expect( + page + .locator( '.wc-shipping-zone-method-title' ) + .filter( { hasText: 'Local pickup' } ) + ).toBeVisible(); await page.goto( 'wp-admin/admin.php?page=wc-settings&tab=shipping' @@ -116,7 +112,8 @@ test.describe( 'WooCommerce Shipping Settings - Add new shipping zone', () => { // this shipping zone already exists, don't create it } else { await page.goto( - 'wp-admin/admin.php?page=wc-settings&tab=shipping&zone_id=new' + 'wp-admin/admin.php?page=wc-settings&tab=shipping&zone_id=new', + { waitUntil: 'networkidle' } ); await page.fill( '#zone_name', shippingZoneNameFreeShip ); @@ -136,6 +133,12 @@ test.describe( 'WooCommerce Shipping Settings - Add new shipping zone', () => { 'free_shipping' ); await page.click( '#btn-ok' ); + await page.waitForLoadState( 'networkidle' ); + await expect( + page + .locator( '.wc-shipping-zone-method-title' ) + .filter( { hasText: 'Free shipping' } ) + ).toBeVisible(); await page.goto( 'wp-admin/admin.php?page=wc-settings&tab=shipping' @@ -159,7 +162,8 @@ test.describe( 'WooCommerce Shipping Settings - Add new shipping zone', () => { // this shipping zone already exists, don't create it } else { await page.goto( - 'wp-admin/admin.php?page=wc-settings&tab=shipping&zone_id=new' + 'wp-admin/admin.php?page=wc-settings&tab=shipping&zone_id=new', + { waitUntil: 'networkidle' } ); await page.fill( '#zone_name', shippingZoneNameFlatRate ); @@ -176,10 +180,17 @@ test.describe( 'WooCommerce Shipping Settings - Add new shipping zone', () => { 'flat_rate' ); await page.click( '#btn-ok' ); + await page.waitForLoadState( 'networkidle' ); + await expect( + page + .locator( '.wc-shipping-zone-method-title' ) + .filter( { hasText: 'Flat rate' } ) + ).toBeVisible(); await page.click( 'a.wc-shipping-zone-method-settings' ); await page.fill( '#woocommerce_flat_rate_cost', '10' ); await page.click( '#btn-ok' ); + await page.waitForLoadState( 'networkidle' ); await page.goto( 'wp-admin/admin.php?page=wc-settings&tab=shipping' @@ -323,7 +334,7 @@ test.describe( 'Verifies shipping options from customer perspective', () => { test.beforeEach( async ( { context, page } ) => { // Shopping cart is very sensitive to cookies, so be explicit - context.clearCookies(); + await context.clearCookies(); await page.goto( `/shop/?add-to-cart=${ productId }` ); await page.waitForLoadState( 'networkidle' ); diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-simple-product.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-simple-product.spec.js index 8b48b700f8d..d3485abe405 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-simple-product.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-simple-product.spec.js @@ -4,9 +4,9 @@ const wcApi = require( '@woocommerce/woocommerce-rest-api' ).default; const virtualProductName = 'Virtual Product Name'; const nonVirtualProductName = 'Non Virtual Product Name'; const productPrice = '9.99'; -let shippingZoneId, virtualProductPermalink, nonVirtualProductPermalink; +let shippingZoneId, virtualProductId, nonVirtualProductId; -test.describe( 'Add New Simple Product Page', () => { +test.describe.serial( 'Add New Simple Product Page', () => { test.use( { storageState: process.env.ADMINSTATE } ); test.beforeAll( async ( { baseURL } ) => { @@ -41,20 +41,9 @@ test.describe( 'Add New Simple Product Page', () => { consumerSecret: process.env.CONSUMER_SECRET, version: 'wc/v3', } ); - await api.get( 'products' ).then( ( response ) => { - const products = response.data; - for ( const product of products ) { - if ( - product.name === virtualProductName || - product.name === nonVirtualProductName - ) { - api.delete( `products/${ product.id }`, { - force: true, - } ).then( () => { - // nothing to do here. - } ); - } - } + await api.delete( `products/${ virtualProductId }`, { force: true } ); + await api.delete( `products/${ nonVirtualProductId }`, { + force: true, } ); // delete the shipping zone await api.delete( `shipping/zones/${ shippingZoneId }`, { @@ -84,15 +73,15 @@ test.describe( 'Add New Simple Product Page', () => { 'Product published.' ); - virtualProductPermalink = await page - .locator( '#sample-permalink a' ) - .getAttribute( 'href' ); + // Save product ID + virtualProductId = page.url().match( /(?<=post=)\d+/ ); + expect( virtualProductId ).toBeDefined(); } ); test( 'can have a shopper add the simple virtual product to the cart', async ( { page, } ) => { - await page.goto( virtualProductPermalink ); + await page.goto( `/?post_type=product&p=${ virtualProductId }` ); await expect( page.locator( '.product_title' ) ).toHaveText( virtualProductName ); @@ -107,7 +96,11 @@ test.describe( 'Add New Simple Product Page', () => { await expect( page.locator( 'a.shipping-calculator-button' ) ).not.toBeVisible(); - await page.click( 'a.remove' ); + await page.click( `a.remove[data-product_id='${ virtualProductId }']` ); + await page.waitForLoadState( 'networkidle' ); + await expect( + page.locator( `a.remove[data-product_id='${ virtualProductId }']` ) + ).not.toBeVisible(); } ); test( 'can create simple non-virtual product', async ( { page } ) => { @@ -132,15 +125,15 @@ test.describe( 'Add New Simple Product Page', () => { 'Product published.' ); - nonVirtualProductPermalink = await page - .locator( '#sample-permalink a' ) - .getAttribute( 'href' ); + // Save product ID + nonVirtualProductId = page.url().match( /(?<=post=)\d+/ ); + expect( nonVirtualProductId ).toBeDefined(); } ); test( 'can have a shopper add the simple non-virtual product to the cart', async ( { page, } ) => { - await page.goto( nonVirtualProductPermalink ); + await page.goto( `/?post_type=product&p=${ nonVirtualProductId }` ); await expect( page.locator( '.product_title' ) ).toHaveText( nonVirtualProductName ); @@ -155,6 +148,14 @@ test.describe( 'Add New Simple Product Page', () => { await expect( page.locator( 'a.shipping-calculator-button' ) ).toBeVisible(); - await page.click( 'a.remove' ); + await page.click( + `a.remove[data-product_id='${ nonVirtualProductId }']` + ); + await page.waitForLoadState( 'networkidle' ); + await expect( + page.locator( + `a.remove[data-product_id='${ nonVirtualProductId }']` + ) + ).not.toBeVisible(); } ); } ); diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-variable-product.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-variable-product.spec.js index 102a54b3e0d..a1405ffbba5 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-variable-product.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-variable-product.spec.js @@ -24,20 +24,20 @@ test.describe.serial( 'Add New Variable Product Page', () => { consumerSecret: process.env.CONSUMER_SECRET, version: 'wc/v3', } ); - // delete products - await api.get( 'products' ).then( ( response ) => { - const products = response.data; - for ( const product of products ) { - if ( - product.name === variableProductName || - product.name === manualVariableProduct - ) { - api.delete( `products/${ product.id }`, { - force: true, - } ); - } - } - } ); + + const varProducts = await api + .get( 'products', { per_page: 100, search: variableProductName } ) + .then( ( response ) => response.data ); + + const manualProducts = await api + .get( 'products', { per_page: 100, search: manualVariableProduct } ) + .then( ( response ) => response.data ); + + const ids = varProducts + .map( ( { id } ) => id ) + .concat( manualProducts.map( ( { id } ) => id ) ); + + await api.post( 'products/batch', { delete: ids } ); } ); // tests build upon one another, so running one in the middle will fail. @@ -101,6 +101,9 @@ test.describe.serial( 'Add New Variable Product Page', () => { } await page.locator( '#save-post' ).click(); + await expect( page.locator( '#message.notice-success' ) ).toContainText( + 'Product draft updated.' + ); } ); test( 'can set the variation attributes, bulk edit variations', async ( { diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-refund.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-refund.spec.js index e4344423a2e..1b84805f475 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-refund.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-refund.spec.js @@ -1,7 +1,7 @@ const { test, expect } = require( '@playwright/test' ); const wcApi = require( '@woocommerce/woocommerce-rest-api' ).default; -test.describe( 'WooCommerce Orders > Refund an order', () => { +test.describe.serial( 'WooCommerce Orders > Refund an order', () => { let productId, orderId, currencySymbol; test.use( { storageState: process.env.ADMINSTATE } ); diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/settings-tax.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/settings-tax.spec.js index 060d0ee3510..844542735a6 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/settings-tax.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/settings-tax.spec.js @@ -29,7 +29,7 @@ test.describe( 'WooCommerce Tax Settings > enable', () => { } ); } ); -test.describe( 'WooCommerce Tax Settings', () => { +test.describe.serial( 'WooCommerce Tax Settings', () => { test.use( { storageState: process.env.ADMINSTATE } ); test.beforeEach( async ( { baseURL } ) => { @@ -56,7 +56,9 @@ test.describe( 'WooCommerce Tax Settings', () => { } ); test( 'can set tax options', async ( { page } ) => { - await page.goto( 'wp-admin/admin.php?page=wc-settings&tab=tax' ); + await page.goto( 'wp-admin/admin.php?page=wc-settings&tab=tax', { + waitUntil: 'networkidle', + } ); // Make sure we're on the tax tab await expect( page.locator( 'a.nav-tab-active' ) ).toContainText( @@ -105,7 +107,9 @@ test.describe( 'WooCommerce Tax Settings', () => { } ); test( 'can add tax classes', async ( { page } ) => { - await page.goto( 'wp-admin/admin.php?page=wc-settings&tab=tax' ); + await page.goto( 'wp-admin/admin.php?page=wc-settings&tab=tax', { + waitUntil: 'networkidle', + } ); await expect( page.locator( 'a.nav-tab-active' ) ).toContainText( 'Tax' @@ -136,10 +140,10 @@ test.describe( 'WooCommerce Tax Settings', () => { ).toContainText( 'Fancy rates' ); } ); - // TODO: This test relies on the previous test completing successfully. test( 'can set rate settings', async ( { page } ) => { await page.goto( - 'wp-admin/admin.php?page=wc-settings&tab=tax§ion=fancy' + 'wp-admin/admin.php?page=wc-settings&tab=tax§ion=fancy', + { waitUntil: 'networkidle' } ); // Make sure the tax tab is active, with the "fancy" subsection diff --git a/plugins/woocommerce/tests/e2e-pw/tests/shopper/calculate-shipping.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/shopper/calculate-shipping.spec.js index c64f39c7a16..3c4d0eb188c 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/shopper/calculate-shipping.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/shopper/calculate-shipping.spec.js @@ -89,14 +89,14 @@ test.describe( 'Cart Calculate Shipping', () => { method_id: 'local_pickup', } ); // confirm that we allow shipping to any country - api.put( 'settings/general/woocommerce_allowed_countries', { + await api.put( 'settings/general/woocommerce_allowed_countries', { value: 'all', } ); } ); test.beforeEach( async ( { page, context } ) => { // Shopping cart is very sensitive to cookies, so be explicit - context.clearCookies(); + await context.clearCookies(); // all tests use the first product await page.goto( `/shop/?add-to-cart=${ firstProductId }` ); diff --git a/plugins/woocommerce/tests/e2e-pw/tests/shopper/cart-coupons.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/shopper/cart-coupons.spec.js index 293f5aff644..36ff100de66 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/shopper/cart-coupons.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/shopper/cart-coupons.spec.js @@ -61,7 +61,7 @@ test.describe( 'Cart applying coupons', () => { test.beforeEach( async ( { page, context } ) => { // Shopping cart is very sensitive to cookies, so be explicit - context.clearCookies(); + await context.clearCookies(); // all tests use the first product await page.goto( `/shop/?add-to-cart=${ firstProductId }` ); diff --git a/plugins/woocommerce/tests/e2e-pw/tests/shopper/cart-redirection.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/shopper/cart-redirection.spec.js index 7777f4ed8f0..ed1a971cc68 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/shopper/cart-redirection.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/shopper/cart-redirection.spec.js @@ -32,7 +32,7 @@ test.describe( 'Cart > Redirect to cart from shop', () => { test.beforeEach( async ( { context } ) => { // Shopping cart is very sensitive to cookies, so be explicit - context.clearCookies(); + await context.clearCookies(); } ); test.afterAll( async ( { baseURL } ) => { diff --git a/plugins/woocommerce/tests/e2e-pw/tests/shopper/cart.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/shopper/cart.spec.js index 1fb579c8519..14f6b62492c 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/shopper/cart.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/shopper/cart.spec.js @@ -33,7 +33,7 @@ test.describe( 'Cart page', () => { test.beforeEach( async ( { context } ) => { // Shopping cart is very sensitive to cookies, so be explicit - context.clearCookies(); + await context.clearCookies(); } ); test.afterAll( async ( { baseURL } ) => { @@ -58,7 +58,7 @@ test.describe( 'Cart page', () => { test( 'should add the product to the cart from the shop page', async ( { page, } ) => { - await page.goto( '/shop/' ); + await page.goto( '/shop/?orderby=date' ); await page.click( `a[data-product_id='${ productId }'][href*=add-to-cart]` ); @@ -73,18 +73,15 @@ test.describe( 'Cart page', () => { test( 'should increase item quantity when "Add to cart" of the same product is clicked', async ( { page, } ) => { - await page.goto( '/shop/' ); - await page.click( - `a[data-product_id='${ productId }'][href*=add-to-cart]` - ); - // Once the view cart link is visible, item has been added - await page.waitForSelector( 'a.added_to_cart' ); - // Click add to cart a second time (load the shop in case redirection enabled) - await page.goto( '/shop/' ); - await page.click( - `a[data-product_id='${ productId }'][href*=add-to-cart]` - ); - await page.waitForSelector( 'a.added_to_cart' ); + let qty = 2; + while ( qty-- ) { + // (load the shop in case redirection enabled) + await page.goto( '/shop/?orderby=date' ); + await page.click( + `a[data-product_id='${ productId }'][href*=add-to-cart]` + ); + await page.waitForLoadState( 'networkidle' ); + } await page.goto( '/cart/' ); await expect( page.locator( 'input.qty' ) ).toHaveValue( '2' ); @@ -93,7 +90,7 @@ test.describe( 'Cart page', () => { test( 'should update quantity when updated via quantity input', async ( { page, } ) => { - await page.goto( '/shop/' ); + await page.goto( '/shop/?orderby=date' ); await page.click( `a[data-product_id='${ productId }'][href*=add-to-cart]` ); @@ -111,7 +108,7 @@ test.describe( 'Cart page', () => { test( 'should remove the item from the cart when remove is clicked', async ( { page, } ) => { - await page.goto( '/shop/' ); + await page.goto( '/shop/?orderby=date' ); await page.click( `a[data-product_id='${ productId }'][href*=add-to-cart]` ); @@ -133,7 +130,7 @@ test.describe( 'Cart page', () => { test( 'should update subtotal in cart totals when adding product to the cart', async ( { page, } ) => { - await page.goto( '/shop/' ); + await page.goto( '/shop/?orderby=date' ); await page.click( `a[data-product_id='${ productId }'][href*=add-to-cart]` ); @@ -155,7 +152,7 @@ test.describe( 'Cart page', () => { test( 'should go to the checkout page when "Proceed to Checkout" is clicked', async ( { page, } ) => { - await page.goto( '/shop/' ); + await page.goto( '/shop/?orderby=date' ); await page.click( `a[data-product_id='${ productId }'][href*=add-to-cart]` ); diff --git a/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout-coupons.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout-coupons.spec.js index e5f033c38ed..ca3201c2d19 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout-coupons.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout-coupons.spec.js @@ -61,7 +61,7 @@ test.describe( 'Checkout coupons', () => { test.beforeEach( async ( { page, context } ) => { // Shopping cart is very sensitive to cookies, so be explicit - context.clearCookies(); + await context.clearCookies(); // all tests use the first product await page.goto( `/shop/?add-to-cart=${ firstProductId }` ); @@ -85,7 +85,7 @@ test.describe( 'Checkout coupons', () => { test( `allows checkout to apply coupon of type ${ coupons[ i ].discount_type }`, async ( { page, } ) => { - await page.goto( '/checkout/' ); + await page.goto( '/checkout/', { waitUntil: 'networkidle' } ); await page.click( 'text=Click here to enter your code' ); await page.fill( '#coupon_code', coupons[ i ].code ); await page.click( 'text=Apply coupon' ); diff --git a/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout-create-account.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout-create-account.spec.js index dbba5359538..856f528a112 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout-create-account.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout-create-account.spec.js @@ -1,5 +1,6 @@ const { test, expect } = require( '@playwright/test' ); const wcApi = require( '@woocommerce/woocommerce-rest-api' ).default; +const { admin } = require( '../../test-data/data' ); const billingEmail = 'marge-test-account@example.com'; @@ -69,6 +70,21 @@ test.describe( 'Shopper Checkout Create Account', () => { await api.put( 'payment_gateways/cod', { enabled: true, } ); + + // make sure there's no pre-existing customer that has the same email we're going to use for account creation + const { data: customersList } = await api.get( 'customers', { + email: billingEmail, + } ); + + if ( customersList && customersList.length ) { + const customerId = customersList[ 0 ].id; + + console.log( + `Customer with email ${ billingEmail } exists! Deleting it before starting test...` + ); + + await api.delete( `customers/${ customerId }`, { force: true } ); + } } ); test.afterAll( async ( { baseURL } ) => { @@ -99,10 +115,10 @@ test.describe( 'Shopper Checkout Create Account', () => { enabled: false, } ); // clear out the customer we create during the test - await api.get( 'customers' ).then( ( response ) => { + await api.get( 'customers' ).then( async ( response ) => { for ( let i = 0; i < response.data.length; i++ ) { if ( response.data[ i ].billing.email === billingEmail ) { - api.delete( `customers/${ response.data[ i ].id }`, { + await api.delete( `customers/${ response.data[ i ].id }`, { force: true, } ); } @@ -112,7 +128,7 @@ test.describe( 'Shopper Checkout Create Account', () => { test.beforeEach( async ( { page, context } ) => { // Shopping cart is very sensitive to cookies, so be explicit - context.clearCookies(); + await context.clearCookies(); // all tests use the first product await page.goto( `shop/?add-to-cart=${ productId }` ); @@ -120,7 +136,7 @@ test.describe( 'Shopper Checkout Create Account', () => { } ); test( 'can create an account during checkout', async ( { page } ) => { - await page.goto( 'checkout/' ); + await page.goto( 'checkout/', { waitUntil: 'networkidle' } ); await page.fill( '#billing_first_name', 'Marge' ); await page.fill( '#billing_last_name', 'Simpson' ); await page.fill( '#billing_address_1', '742 Evergreen Terrace' ); @@ -155,8 +171,8 @@ test.describe( 'Shopper Checkout Create Account', () => { ); await page.click( 'text=Logout' ); // sign in as admin to confirm account creation - await page.fill( '#username', 'admin' ); - await page.fill( '#password', 'password' ); + await page.fill( '#username', admin.username ); + await page.fill( '#password', admin.password ); await page.click( 'text=Log in' ); await page.goto( 'wp-admin/users.php' ); diff --git a/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout-login.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout-login.spec.js index 1bcadeedac9..1f724a4e899 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout-login.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout-login.spec.js @@ -1,18 +1,27 @@ const { test, expect } = require( '@playwright/test' ); const wcApi = require( '@woocommerce/woocommerce-rest-api' ).default; -const first_name = 'Jane'; -const last_name = 'Smith'; -const address_1 = '123 Anywhere St.'; -const address_2 = 'Apartment 42'; -const city = 'New York'; -const state = 'NY'; -const postcode = '10010'; -const country = 'US'; -const phone = '(555) 777-7777'; +const customer = { + username: 'customercheckoutlogin', + password: 'password', + email: `customercheckoutlogin${ new Date() + .getTime() + .toString() }@woocommercecoree2etestsuite.com`, + billing: { + first_name: 'Jane', + last_name: 'Smith', + address_1: '123 Anywhere St.', + address_2: 'Apartment 42', + city: 'New York', + state: 'NY', + postcode: '10010', + country: 'US', + phone: '(555) 777-7777', + }, +}; test.describe( 'Shopper Checkout Login Account', () => { - let productId, orderId, shippingZoneId; + let productId, orderId, shippingZoneId, customerId; test.beforeAll( async ( { baseURL } ) => { const api = new wcApi( { @@ -54,20 +63,10 @@ test.describe( 'Shopper Checkout Login Account', () => { await api.post( `shipping/zones/${ shippingZoneId }/methods`, { method_id: 'free_shipping', } ); - // update customer billing details. - await api.put( 'customers/2', { - billing: { - first_name, - last_name, - address_1, - address_2, - city, - state, - postcode, - country, - phone, - }, - } ); + // create customer and save its id + await api + .post( 'customers', customer ) + .then( ( response ) => ( customerId = response.data.id ) ); // enable a payment method await api.put( 'payment_gateways/cod', { enabled: true, @@ -93,17 +92,9 @@ test.describe( 'Shopper Checkout Login Account', () => { value: 'no', } ); - // reset the customer account to how it was at the start - await api.put( 'customers/2', { - billing: { - address_1: '', - address_2: '', - city: '', - state: '', - postcode: '', - country: '', - phone: '', - }, + // delete the customer + await api.delete( `customers/${ customerId }`, { + force: true, } ); // disable payment method await api.put( 'payment_gateways/cod', { @@ -117,7 +108,7 @@ test.describe( 'Shopper Checkout Login Account', () => { test.beforeEach( async ( { page, context } ) => { // Shopping cart is very sensitive to cookies, so be explicit - context.clearCookies(); + await context.clearCookies(); // all tests use the first product await page.goto( `/shop/?add-to-cart=${ productId }` ); @@ -131,29 +122,35 @@ test.describe( 'Shopper Checkout Login Account', () => { await page.click( 'text=Click here to login' ); // fill in the customer account info - await page.fill( '#username', 'customer' ); - await page.fill( '#password', 'password' ); + await page.fill( '#username', customer.username ); + await page.fill( '#password', customer.password ); await page.click( 'button[name="login"]' ); // billing form should pre-populate await expect( page.locator( '#billing_first_name' ) ).toHaveValue( - first_name + customer.billing.first_name ); await expect( page.locator( '#billing_last_name' ) ).toHaveValue( - last_name + customer.billing.last_name ); await expect( page.locator( '#billing_address_1' ) ).toHaveValue( - address_1 + customer.billing.address_1 ); await expect( page.locator( '#billing_address_2' ) ).toHaveValue( - address_2 + customer.billing.address_2 + ); + await expect( page.locator( '#billing_city' ) ).toHaveValue( + customer.billing.city + ); + await expect( page.locator( '#billing_state' ) ).toHaveValue( + customer.billing.state ); - await expect( page.locator( '#billing_city' ) ).toHaveValue( city ); - await expect( page.locator( '#billing_state' ) ).toHaveValue( state ); await expect( page.locator( '#billing_postcode' ) ).toHaveValue( - postcode + customer.billing.postcode + ); + await expect( page.locator( '#billing_phone' ) ).toHaveValue( + customer.billing.phone ); - await expect( page.locator( '#billing_phone' ) ).toHaveValue( phone ); // place an order await page.click( 'text=Place order' ); @@ -173,7 +170,7 @@ test.describe( 'Shopper Checkout Login Account', () => { orderId = orderReceivedText.split( /(\s+)/ )[ 6 ].toString(); await expect( page.locator( 'ul > li.email' ) ).toContainText( - 'customer@woocommercecoree2etestsuite.com' + customer.email ); // check my account page diff --git a/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout.spec.js index 4cadf5fe1c8..004ade32b5b 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout.spec.js @@ -1,8 +1,8 @@ const { test, expect } = require( '@playwright/test' ); const wcApi = require( '@woocommerce/woocommerce-rest-api' ).default; +const { admin, customer } = require( '../../test-data/data' ); const guestEmail = 'checkout-guest@example.com'; -const customerEmail = 'customer@woocommercecoree2etestsuite.com'; test.describe( 'Checkout page', () => { const singleProductPrice = '9.99'; @@ -106,7 +106,7 @@ test.describe( 'Checkout page', () => { test.beforeEach( async ( { context } ) => { // Shopping cart is very sensitive to cookies, so be explicit - context.clearCookies(); + await context.clearCookies(); } ); test( 'should display cart items in order review', async ( { page } ) => { @@ -248,8 +248,8 @@ test.describe( 'Checkout page', () => { guestOrderId = await orderReceivedText.split( /(\s+)/ )[ 6 ].toString(); await page.goto( 'wp-login.php' ); - await page.fill( 'input[name="log"]', 'admin' ); - await page.fill( 'input[name="pwd"]', 'password' ); + await page.fill( 'input[name="log"]', admin.username ); + await page.fill( 'input[name="pwd"]', admin.password ); await page.click( 'text=Log In' ); // load the order placed as a guest @@ -276,8 +276,8 @@ test.describe( 'Checkout page', () => { test( 'allows existing customer to place order', async ( { page } ) => { await page.goto( 'wp-admin/' ); - await page.fill( 'input[name="log"]', 'customer' ); - await page.fill( 'input[name="pwd"]', 'password' ); + await page.fill( 'input[name="log"]', customer.username ); + await page.fill( 'input[name="pwd"]', customer.password ); await page.click( 'text=Log In' ); await page.waitForLoadState( 'networkidle' ); for ( let i = 1; i < 3; i++ ) { @@ -301,7 +301,7 @@ test.describe( 'Checkout page', () => { await page.selectOption( '#billing_state', 'OR' ); await page.fill( '#billing_postcode', '97403' ); await page.fill( '#billing_phone', '555 555-5555' ); - await page.fill( '#billing_email', customerEmail ); + await page.fill( '#billing_email', customer.email ); await page.click( 'text=Cash on delivery' ); await expect( page.locator( 'div.payment_method_cod' ) ).toBeVisible(); @@ -327,8 +327,8 @@ test.describe( 'Checkout page', () => { await page.goto( 'wp-login.php?loggedout=true' ); await page.waitForLoadState( 'networkidle' ); - await page.fill( 'input[name="log"]', 'admin' ); - await page.fill( 'input[name="pwd"]', 'password' ); + await page.fill( 'input[name="log"]', admin.username ); + await page.fill( 'input[name="pwd"]', admin.password ); await page.click( 'text=Log In' ); // load the order placed as a customer diff --git a/plugins/woocommerce/tests/e2e-pw/tests/shopper/my-account-create-account.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/shopper/my-account-create-account.spec.js index 1e7309979b2..8364bd746bc 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/shopper/my-account-create-account.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/shopper/my-account-create-account.spec.js @@ -5,6 +5,8 @@ const customerEmailAddress = 'john.doe.test@example.com'; test.describe( 'Shopper My Account Create Account', () => { test.beforeAll( async ( { baseURL } ) => { + let customerId; + const api = new wcApi( { url: baseURL, consumerKey: process.env.CONSUMER_KEY, @@ -17,6 +19,25 @@ test.describe( 'Shopper My Account Create Account', () => { value: 'yes', } ); + + // make sure the test customer does not exist + await api + .get( `customers?email=${ customerEmailAddress }` ) + .then( ( response ) => { + const testCustomer = response.data.find( + ( customer ) => customer.email === customerEmailAddress + ); + + if ( testCustomer ) { + customerId = testCustomer.id; + } + } ); + if ( customerId ) { + console.log( + `Customer with email ${ customerEmailAddress } already exists. Deleting it before continuing with the test.` + ); + await api.delete( `customers/${ customerId }`, { force: true } ); + } } ); test.afterAll( async ( { baseURL } ) => { diff --git a/plugins/woocommerce/tests/e2e-pw/tests/shopper/my-account-pay-order.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/shopper/my-account-pay-order.spec.js index 84a11eea464..a1e5dae592b 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/shopper/my-account-pay-order.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/shopper/my-account-pay-order.spec.js @@ -1,6 +1,13 @@ const { test, expect } = require( '@playwright/test' ); const wcApi = require( '@woocommerce/woocommerce-rest-api' ).default; +const randomNum = new Date().getTime().toString(); +const customer = { + username: `customer${ randomNum }`, + password: 'password', + email: `customer${ randomNum }@woocommercecoree2etestsuite.com`, +}; + test.describe( 'Customer can pay for their order through My Account', () => { let productId, orderId; @@ -21,6 +28,10 @@ test.describe( 'Customer can pay for their order through My Account', () => { .then( ( response ) => { productId = response.data.id; } ); + // create customer + await api + .post( 'customers', customer ) + .then( ( response ) => ( customer.id = response.data.id ) ); // create an order await api .post( 'orders', { @@ -28,7 +39,7 @@ test.describe( 'Customer can pay for their order through My Account', () => { billing: { first_name: 'Jane', last_name: 'Smith', - email: 'customer@woocommercecoree2etestsuite.com', + email: customer.email, }, line_items: [ { @@ -42,7 +53,7 @@ test.describe( 'Customer can pay for their order through My Account', () => { } ); // once the order is created, assign it to our existing customer user await api.put( `orders/${ orderId }`, { - customer_id: 2, // should be safe to use this ID. Saves an API call to retrieve. + customer_id: customer.id, } ); // enable COD payment await api.put( 'payment_gateways/cod', { @@ -61,6 +72,7 @@ test.describe( 'Customer can pay for their order through My Account', () => { force: true, } ); await api.delete( `orders/${ orderId }`, { force: true } ); + await api.delete( `customers/${ customer.id }`, { force: true } ); await api.put( 'payment_gateways/cod', { enabled: false, } ); @@ -71,8 +83,8 @@ test.describe( 'Customer can pay for their order through My Account', () => { } ) => { await page.goto( 'my-account/orders/' ); // sign in as the "customer" user - await page.fill( '#username', 'customer' ); - await page.fill( '#password', 'password' ); + await page.fill( '#username', customer.username ); + await page.fill( '#password', customer.password ); await page.click( 'text=Log in' ); await page.click( 'a.pay' ); diff --git a/plugins/woocommerce/tests/e2e-pw/tests/shopper/my-account.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/shopper/my-account.spec.js index 72a4b61fe35..85598a8287f 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/shopper/my-account.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/shopper/my-account.spec.js @@ -1,4 +1,5 @@ const { test, expect } = require( '@playwright/test' ); +const { customer } = require( '../../test-data/data' ); const pages = [ [ 'Orders', 'my-account/orders' ], @@ -18,7 +19,7 @@ test.describe( 'My account page', () => { ); await expect( page.locator( 'div.woocommerce-MyAccount-content > p >> nth=0' ) - ).toContainText( 'Jane Smith' ); + ).toContainText( `${ customer.first_name } ${ customer.last_name }` ); // assert that navigation is visible await expect( diff --git a/plugins/woocommerce/tests/e2e-pw/tests/shopper/single-product.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/shopper/single-product.spec.js index 0d3182333e7..c2eff02ed58 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/shopper/single-product.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/shopper/single-product.spec.js @@ -68,7 +68,7 @@ test.describe( 'Single Product Page', () => { test.beforeEach( async ( { context } ) => { // Shopping cart is very sensitive to cookies, so be explicit - context.clearCookies(); + await context.clearCookies(); } ); test.afterAll( async ( { baseURL } ) => { @@ -158,7 +158,7 @@ test.describe( 'Variable Product Page', () => { test.beforeEach( async ( { context } ) => { // Shopping cart is very sensitive to cookies, so be explicit - context.clearCookies(); + await context.clearCookies(); } ); test.afterAll( async ( { baseURL } ) => { @@ -255,7 +255,7 @@ test.describe( 'Grouped Product Page', () => { test.beforeEach( async ( { context } ) => { // Shopping cart is very sensitive to cookies, so be explicit - context.clearCookies(); + await context.clearCookies(); } ); test.afterAll( async ( { baseURL } ) => { diff --git a/plugins/woocommerce/tests/e2e-pw/tests/smoke-tests/update-woocommerce.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/smoke-tests/update-woocommerce.spec.js index 360a157fc2d..9276e5fd2ad 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/smoke-tests/update-woocommerce.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/smoke-tests/update-woocommerce.spec.js @@ -1,24 +1,29 @@ const { ADMINSTATE, UPDATE_WC } = process.env; const { admin } = require( '../../test-data/data' ); const { test, expect } = require( '@playwright/test' ); -const path = require( 'path' ); const { deletePlugin, downloadZip, deleteZip, } = require( '../../utils/plugin-utils' ); +const skipMessage = 'Skipping this test because UPDATE_WC is not "true"'; + let pluginZipPath; +test.skip( () => { + const shouldSkip = UPDATE_WC !== 'true'; + + if ( shouldSkip ) { + console.log( skipMessage ); + } + + return shouldSkip; +}, skipMessage ); + test.describe.serial( 'WooCommerce plugin can be uploaded and activated', () => { - // Skip test if UPDATE_WC is falsy. - test.skip( - ! Boolean( UPDATE_WC ), - `Skipping this test because UPDATE_WC is falsy: ${ UPDATE_WC }` - ); - test.use( { storageState: ADMINSTATE } ); test.beforeAll( async () => { diff --git a/plugins/woocommerce/tests/e2e-pw/tests/smoke-tests/upload-plugin.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/smoke-tests/upload-plugin.spec.js index faba740f074..10506db7c46 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/smoke-tests/upload-plugin.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/smoke-tests/upload-plugin.spec.js @@ -14,15 +14,22 @@ const { installPluginThruWpCli, } = require( '../../utils/plugin-utils' ); +const skipMessage = 'Skipping this test because PLUGIN_REPOSITORY is undefined'; + let pluginPath; let pluginSlug; -test.describe( `${ PLUGIN_NAME } plugin can be uploaded and activated`, () => { - test.skip( - ! PLUGIN_REPOSITORY, - `SKIPPED: PLUGIN_REPOSITORY is falsy: ${ PLUGIN_REPOSITORY }` - ); +test.skip( () => { + const shouldSkip = ! PLUGIN_REPOSITORY; + if ( shouldSkip ) { + console.log( skipMessage ); + } + + return shouldSkip; +}, skipMessage ); + +test.describe( `${ PLUGIN_NAME } plugin can be uploaded and activated`, () => { test.use( { storageState: ADMINSTATE } ); test.beforeAll( async ( { playwright, baseURL } ) => { diff --git a/plugins/woocommerce/tests/e2e-pw/utils/api.js b/plugins/woocommerce/tests/e2e-pw/utils/api.js index 1fe7c992b80..193e5a40e18 100644 --- a/plugins/woocommerce/tests/e2e-pw/utils/api.js +++ b/plugins/woocommerce/tests/e2e-pw/utils/api.js @@ -13,6 +13,42 @@ if ( process.env.CONSUMER_KEY && process.env.CONSUMER_SECRET ) { } ); } +/** + * Allow explicit construction of api client. + */ +const constructWith = ( consumerKey, consumerSecret ) => { + api = new wcApi( { + url: config.use.baseURL, + consumerKey, + consumerSecret, + version: 'wc/v3', + } ); +}; + +const throwCustomError = ( + error, + customMessage = 'Something went wrong. See details below.' +) => { + throw new Error( + customMessage + .concat( + `\nResponse status: ${ error.response.status } ${ error.response.statusText }` + ) + .concat( + `\nResponse headers:\n${ JSON.stringify( + error.response.headers, + null, + 2 + ) }` + ).concat( `\nResponse data:\n${ JSON.stringify( + error.response.data, + null, + 2 + ) } +` ) + ); +}; + const update = { storeDetails: async ( store ) => { // ensure store address is US @@ -50,6 +86,19 @@ const update = { }; const get = { + coupons: async ( params ) => { + const response = await api + .get( 'coupons', params ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when trying to list all coupons.' + ); + } ); + + return response.data; + }, defaultCountry: async () => { const response = await api.get( 'settings/general/woocommerce_default_country' @@ -59,6 +108,137 @@ const get = { return code; }, + orders: async ( params ) => { + const response = await api + .get( 'orders', params ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when trying to list all orders.' + ); + } ); + + return response.data; + }, + products: async ( params ) => { + const response = await api + .get( 'products', params ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when trying to list all products.' + ); + } ); + + return response.data; + }, + productAttributes: async ( params ) => { + const response = await api + .get( 'products/attributes', params ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when trying to list all product attributes.' + ); + } ); + + return response.data; + }, + productCategories: async ( params ) => { + const response = await api + .get( 'products/categories', params ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when trying to list all product categories.' + ); + } ); + + return response.data; + }, + productTags: async ( params ) => { + const response = await api + .get( 'products/tags', params ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when trying to list all product tags.' + ); + } ); + + return response.data; + }, + shippingClasses: async ( params ) => { + const response = await api + .get( 'products/shipping_classes', params ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when trying to list all shipping classes.' + ); + } ); + + return response.data; + }, + + shippingZones: async ( params ) => { + const response = await api + .get( 'shipping/zones', params ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when trying to list all shipping zones.' + ); + } ); + + return response.data; + }, + shippingZoneMethods: async ( shippingZoneId ) => { + const response = await api + .get( `shipping/zones/${ shippingZoneId }/methods` ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + `Something went wrong when trying to list all shipping methods in shipping zone ${ shippingZoneId }.` + ); + } ); + + return response.data; + }, + taxClasses: async () => { + const response = await api + .get( 'taxes/classes' ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when trying to list all tax classes.' + ); + } ); + + return response.data; + }, + taxRates: async ( params ) => { + const response = await api + .get( 'taxes', params ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when trying to list all tax rates.' + ); + } ); + + return response.data; + }, }; const create = { @@ -74,16 +254,158 @@ const create = { }; const deletePost = { + coupons: async ( ids ) => { + const res = await api + .post( 'coupons/batch', { delete: ids } ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when batch deleting coupons.' + ); + } ); + + return res.data; + }, product: async ( id ) => { await api.delete( `products/${ id }`, { force: true, } ); }, + products: async ( ids ) => { + const res = await api + .post( 'products/batch', { delete: ids } ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when batch deleting products.' + ); + } ); + return res.data; + }, + productAttributes: async ( id ) => { + const res = await api + .post( 'products/attributes/batch', { delete: id } ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when batch deleting product attributes.' + ); + } ); + return res.data; + }, + productCategories: async ( ids ) => { + const res = await api + .post( 'products/categories/batch', { delete: ids } ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when batch deleting product categories.' + ); + } ); + return res.data; + }, + productTags: async ( ids ) => { + const res = await api + .post( 'products/tags/batch', { delete: ids } ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when batch deleting product tags.' + ); + } ); + return res.data; + }, order: async ( id ) => { await api.delete( `orders/${ id }`, { force: true, } ); }, + orders: async ( ids ) => { + const res = await api + .post( 'orders/batch', { delete: ids } ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when batch deleting orders.' + ); + } ); + return res.data; + }, + shippingClasses: async ( ids ) => { + const res = await api + .post( 'products/shipping_classes/batch', { delete: ids } ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when batch deleting shipping classes.' + ); + } ); + return res.data; + }, + shippingZone: async ( id ) => { + const res = await api + .delete( `shipping/zones/${ id }`, { + force: true, + } ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when deleting shipping zone.' + ); + } ); + return res.data; + }, + shippingZoneMethod: async ( shippingZoneId, shippingMethodId ) => { + const res = await api + .delete( + `shipping/zones/${ shippingZoneId }/methods/${ shippingMethodId }`, + { + force: true, + } + ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when deleting shipping zone method.' + ); + } ); + return res.data; + }, + taxClass: async ( slug ) => { + const res = await api + .delete( `taxes/classes/${ slug }`, { + force: true, + } ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + `Something went wrong when deleting tax class ${ slug }.` + ); + } ); + return res.data; + }, + taxRates: async ( ids ) => { + const res = await api + .post( 'taxes/batch', { delete: ids } ) + .then( ( response ) => response ) + .catch( ( error ) => { + throwCustomError( + error, + 'Something went wrong when batch deleting tax rates.' + ); + } ); + return res.data; + }, }; module.exports = { @@ -91,4 +413,5 @@ module.exports = { get, create, deletePost, + constructWith, }; diff --git a/plugins/woocommerce/tests/e2e-pw/utils/index.js b/plugins/woocommerce/tests/e2e-pw/utils/index.js index ff02a21ec22..faf3ec4e3c3 100644 --- a/plugins/woocommerce/tests/e2e-pw/utils/index.js +++ b/plugins/woocommerce/tests/e2e-pw/utils/index.js @@ -1,7 +1,9 @@ const onboarding = require( './onboarding' ); const api = require( './api' ); +const site = require( './site' ); module.exports = { onboarding, api, + site, }; diff --git a/plugins/woocommerce/tests/e2e-pw/utils/site.js b/plugins/woocommerce/tests/e2e-pw/utils/site.js new file mode 100644 index 00000000000..6fea5e6b0a9 --- /dev/null +++ b/plugins/woocommerce/tests/e2e-pw/utils/site.js @@ -0,0 +1,242 @@ +const api = require( './api' ); + +const deleteAllCoupons = async () => { + console.log( 'Deleting all coupons...' ); + + let coupons, + page = 1; + + while ( + ( coupons = await api.get.coupons( { per_page: 100, page: page++ } ) ) + .length > 0 + ) { + const ids = coupons.map( ( { id } ) => id ); + await api.deletePost.coupons( ids ); + } + + console.log( 'Done.' ); +}; + +const deleteAllProducts = async () => { + console.log( 'Deleting all products...' ); + + let products, + page = 1; + + while ( + ( products = await api.get.products( { per_page: 100, page: page++ } ) ) + .length > 0 + ) { + const ids = products.map( ( { id } ) => id ); + await api.deletePost.products( ids ); + } + + console.log( 'Done.' ); +}; + +const deleteAllProductAttributes = async () => { + console.log( 'Deleting all product attributes...' ); + + let attributes, + page = 1; + + while ( + ( attributes = await api.get.productAttributes( { + per_page: 100, + page: page++, + } ) ).length > 0 + ) { + const ids = attributes.map( ( { id } ) => id ); + await api.deletePost.productAttributes( ids ); + } + + console.log( 'Done.' ); +}; + +const deleteAllProductCategories = async () => { + console.log( 'Deleting all product categories...' ); + + let categories, + page = 1; + + // Exclude "Uncategorized" as it cannot be deleted + while ( + ( categories = ( + await api.get.productCategories( { per_page: 100, page: page++ } ) + ).filter( ( { slug } ) => slug !== 'uncategorized' ) ).length > 0 + ) { + const ids = categories.map( ( { id } ) => id ); + await api.deletePost.productCategories( ids ); + } + + console.log( 'Done.' ); +}; + +const deleteAllProductTags = async () => { + console.log( 'Deleting all product tags...' ); + + let tags, + page = 1; + + while ( + ( tags = await api.get.productTags( { + per_page: 100, + page: page++, + } ) ).length > 0 + ) { + const ids = tags.map( ( { id } ) => id ); + await api.deletePost.productTags( ids ); + } + + console.log( 'Done.' ); +}; + +const deleteAllOrders = async () => { + console.log( 'Deleting all orders...' ); + + let orders, + page = 1; + + while ( + ( orders = await api.get.orders( { per_page: 100, page: page++ } ) ) + .length > 0 + ) { + const ids = orders.map( ( { id } ) => id ); + await api.deletePost.orders( ids ); + } + + console.log( 'Done.' ); +}; + +const deleteAllShippingZones = async () => { + console.log( 'Deleting all shipping zones...' ); + + let shippingZones, + page = 1; + + // Exclude "Locations not covered by your other zones" as it cannot be deleted. + while ( + ( shippingZones = ( + await api.get.shippingZones( { + per_page: 100, + page: page++, + } ) + ).filter( + ( { name } ) => name !== 'Locations not covered by your other zones' + ) ).length > 0 + ) { + const ids = shippingZones.map( ( { id } ) => id ); + for ( const id of ids ) { + await api.deletePost.shippingZone( id ); + } + } + + console.log( 'Done.' ); +}; + +const deleteAllShippingClasses = async () => { + console.log( 'Deleting all shipping classes...' ); + + let shippingClasses, + page = 1; + + while ( + ( shippingClasses = await api.get.shippingClasses( { + per_page: 100, + page: page++, + } ) ).length > 0 + ) { + const ids = shippingClasses.map( ( { id } ) => id ); + await api.deletePost.shippingClasses( ids ); + } + + console.log( 'Done.' ); +}; + +const deleteAllShippingMethodsInDefaultShippingZone = async () => { + console.log( 'Deleting all shipping methods...' ); + + let shippingMethods; + + while ( + ( shippingMethods = await api.get.shippingZoneMethods( 0 ) ).length > 0 + ) { + const ids = shippingMethods.map( ( { id } ) => id ); + for ( const id of ids ) { + await api.deletePost.shippingZoneMethod( 0, id ); + } + } + + console.log( 'Done.' ); +}; + +const deleteAllTaxClasses = async () => { + console.log( 'Deleting all non-default tax classes...' ); + + let taxClasses; + + const getExistingNonDefaultTaxClasses = async () => { + return ( await api.get.taxClasses() ).filter( + ( { slug } ) => + ! [ 'standard', 'reduced-rate', 'zero-rate' ].includes( slug ) + ); + }; + + while ( + ( taxClasses = await getExistingNonDefaultTaxClasses() ).length > 0 + ) { + const slugs = taxClasses.map( ( { slug } ) => slug ); + for ( const slug of slugs ) { + await api.deletePost.taxClass( slug ); + } + } + + console.log( 'Done.' ); +}; + +const deleteAllTaxRates = async () => { + console.log( 'Deleting all tax rates...' ); + + let taxes, + page = 1; + + while ( + ( taxes = await api.get.taxRates( { per_page: 100, page: page++ } ) ) + .length > 0 + ) { + const ids = taxes.map( ( { id } ) => id ); + await api.deletePost.taxRates( ids ); + } + + console.log( 'Done.' ); +}; + +/** + * Reset the test site. Useful when running E2E tests on a hosted test site to reset it to a somewhat pristine state prior to running tests. + * + * @param {string} cKey Consumer key + * @param {string} cSecret Consumer secret + */ +const reset = async ( cKey, cSecret ) => { + console.log( '--------------------------' ); + console.log( 'Resetting test site...' ); + console.log( '--------------------------' ); + + api.constructWith( cKey, cSecret ); + + await deleteAllCoupons(); + await deleteAllProducts(); + await deleteAllProductAttributes(); + await deleteAllProductCategories(); + await deleteAllProductTags(); + await deleteAllOrders(); + await deleteAllShippingClasses(); + await deleteAllShippingZones(); + await deleteAllShippingMethodsInDefaultShippingZone(); + await deleteAllTaxClasses(); + await deleteAllTaxRates(); +}; + +module.exports = { + reset, +}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 299870a211f..77ecb9aa174 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1328,6 +1328,7 @@ importers: '@woocommerce/woocommerce-rest-api': ^1.0.1 '@wordpress/babel-plugin-import-jsx-pragma': 1.1.3 '@wordpress/babel-preset-default': 3.0.2 + '@wordpress/browserslist-config': ^5.7.0 '@wordpress/env': ^4.8.0 '@wordpress/stylelint-config': 19.1.0 allure-commandline: ^2.17.2 @@ -1354,6 +1355,8 @@ importers: webpack: 5.70.0 webpack-cli: 3.3.12 wp-textdomain: 1.0.1 + dependencies: + '@wordpress/browserslist-config': 5.7.0 devDependencies: '@babel/cli': 7.12.8_@babel+core@7.12.9 '@babel/core': 7.12.9 @@ -15629,6 +15632,11 @@ packages: engines: {node: '>=14'} dev: false + /@wordpress/browserslist-config/5.7.0: + resolution: {integrity: sha512-d0wx5DXjGsMDurijJe006lm4FFKjbj2mM9I3MoXR0HCzMy8xk5fl6ZY2574yx4pea+f/UTKfDBi8ArUvhsjGOA==} + engines: {node: '>=14'} + dev: false + /@wordpress/components/12.0.9_tymsfwxsfigcu46i7beagdrini: resolution: {integrity: sha512-J6uM20Jpchr/NywQmAeVqx/LohwKizi2F8HylqN1Xt2mYzuOrDirlEhQT1wmfqiEqEt0l+mefZEBlxeknMfBag==} dependencies: @@ -39037,7 +39045,7 @@ packages: serialize-javascript: 6.0.0 source-map: 0.6.1 terser: 5.10.0_acorn@8.8.0 - webpack: 5.70.0 + webpack: 5.70.0_webpack-cli@3.3.12 transitivePeerDependencies: - acorn