Merge branch 'trunk' into feature/34548-multichannel-marketing-backend

This commit is contained in:
Nima 2023-01-16 12:06:38 +00:00
commit b82421fa48
420 changed files with 6497 additions and 3204 deletions

View File

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

View File

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

View File

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

View File

@ -0,0 +1,287 @@
name: Bump WP L-2 Support
on:
workflow_dispatch:
inputs:
releaseBranch:
description: Provide the release branch you want to bump the WP L-2 support. Example release/6.9. Note that trunk will also be bumped to match.
default: ''
required: true
permissions: {}
env:
GIT_COMMITTER_NAME: 'WooCommerce Bot'
GIT_COMMITTER_EMAIL: 'no-reply@woocommerce.com'
GIT_AUTHOR_NAME: 'WooCommerce Bot'
GIT_AUTHOR_EMAIL: 'no-reply@woocommerce.com'
jobs:
check-release-branch-exists:
name: Check for existence of release branch
runs-on: ubuntu-20.04
steps:
- name: Check for release branch
id: release-branch-check
uses: actions/github-script@v6
with:
script: |
// This will throw an error for non-200 responses, which prevents subsequent jobs from completing, as desired.
await github.request( 'GET /repos/{owner}/{repo}/branches/{branch}', {
owner: context.repo.owner,
repo: context.repo.repo,
branch: '${{ inputs.releaseBranch }}',
} );
validate-bump:
name: Validate and bump WP L-2 support version
runs-on: ubuntu-20.04
needs: check-release-branch-exists
if: success()
permissions:
actions: write
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- name: Get latest WP version
id: latestWP
uses: actions/github-script@v6
with:
script: |
const https = require( 'https' );
https.get( 'https://api.wordpress.org/core/stable-check/1.0/', ( resp ) => {
let data = '';
// A chunk of data has been received.
resp.on( 'data', ( chunk ) => {
data += chunk;
} );
// The whole response has been received. Print out the result.
resp.on( 'end', () => {
JSON.parse(data, ( key, val ) => {
if ( val === 'latest' ) {
core.setOutput( 'version', key )
}
} );
} );
} ).on( 'error', ( err ) => {
console.log( 'Error: ' + err.message );
} );
- name: Get L-2 WP version
id: l2Version
if: steps.latestWP.outputs.version != '' && steps.latestWP.outputs.version != null
uses: actions/github-script@v6
with:
script: |
const version = "${{ steps.latestWP.outputs.version }}";
const latestWPVersionMajor = version.split( '.' )[0];
const latestWPVersionMinor = version.split( '.' )[1];
const l2 = (parseInt( ( latestWPVersionMajor + latestWPVersionMinor ), 10 ) - 2 ).toString();
const l2Major = l2.split( '' )[0];
const l2Minor = l2.split( '' )[1];
core.setOutput( 'version', l2Major + '.' + l2Minor );
- name: Git fetch the release branch
run: git fetch origin ${{ inputs.releaseBranch }}
- name: Checkout release branch
run: git checkout ${{ inputs.releaseBranch }}
- name: Create a PR branch based on release branch
run: git checkout -b WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/${{ inputs.releaseBranch }}
- name: Check if WP L-2 support needs to be bumped the release branch
id: readmeWPVersion
if: steps.l2Version.outputs.version != '' && steps.l2Version.outputs.version != null
uses: actions/github-script@v6
with:
script: |
const fs = require( 'node:fs' );
const l2Version = "${{ steps.l2Version.outputs.version }}";
let readme = '';
fs.readFile( './plugins/woocommerce/readme.txt', 'utf-8', function( err, data ) {
if ( err ) {
console.error( err );
}
readme = data.split( "\n" );
const newReadme = [];
let needsChange = false;
for ( const line of readme ) {
if ( line.match( /Requires\sat\sleast:\s\d+\.\d/ ) ) {
const readmeVersion = line.match( /\d+\.\d/ );
// If the versions don't match, means we need to make a change.
if ( readmeVersion != l2Version ) {
needsChange = true;
newReadme.push( 'Requires at least: ' + l2Version );
continue;
}
}
newReadme.push( line );
}
if ( needsChange ) {
fs.writeFile( './plugins/woocommerce/readme.txt', newReadme.join( "\n" ), err => {
if ( err ) {
core.setFailed( `Unable to bump the WP L-2 support version. ${err}` );
}
core.setOutput( 'needsChange', needsChange );
// Copy the readme.txt file to the root of VM to be used later.
fs.writeFile( '../../readme.txt', newReadme.join( "\n" ), err => {
if ( err ) {
core.setFailed( `Unable to copy the readme.txt file to the root of VM. ${err}` );
}
} );
} );
} else {
core.setFailed( 'No changes needed. WP Version is L-2 compatible.' );
}
} );
- name: Commit changes
if: steps.readmeWPVersion.outputs.needsChange == 'true'
run: git commit --no-verify -am "Update readme.txt WP L-2 support version."
- name: Push changes
if: steps.readmeWPVersion.outputs.needsChange == 'true'
run: git push origin WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/${{ inputs.releaseBranch }}
- name: Push the PR up to GitHub
id: release-branch-pr
if: steps.readmeWPVersion.outputs.needsChange == 'true'
uses: actions/github-script@v6
with:
script: |
const PRBody = "This PR bumps the WP version to L-2 compatible for the release branch ${{ inputs.releaseBranch }}.\n";
const pr = await github.rest.pulls.create( {
owner: context.repo.owner,
repo: context.repo.repo,
title: "Bump WP Version to L-2 compatible for ${{ inputs.releaseBranch }}",
head: "WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/${{ inputs.releaseBranch }}",
base: "${{ inputs.releaseBranch }}",
body: PRBody
} );
if ( pr.status != 201 ) {
core.setFailed( "Unable to push WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/${{ inputs.releaseBranch }} to GitHub." );
}
core.setOutput( 'pr', pr.data.number );
await github.rest.pulls.requestReviewers( {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.data.number,
reviewers: [ context.actor ]
} );
- name: Checkout trunk branch
if: steps.release-branch-pr.outputs.pr != '' && steps.release-branch-pr.outputs.pr != null
run: git checkout trunk
- name: Create a branch based on trunk branch
if: steps.release-branch-pr.outputs.pr != '' && steps.release-branch-pr.outputs.pr != null
run: git checkout -b WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/trunk
- name: Check if WP L-2 support needs to be bumped for trunk
id: readmeWPVersionTrunk
if: steps.release-branch-pr.outputs.pr != '' && steps.release-branch-pr.outputs.pr != null
uses: actions/github-script@v6
with:
script: |
const fs = require( 'node:fs' );
const l2Version = "${{ steps.l2Version.outputs.version }}";
let readme = '';
fs.readFile( './plugins/woocommerce/readme.txt', 'utf-8', function( err, data ) {
if ( err ) {
console.error( err );
}
readme = data.split( "\n" );
const newReadme = [];
let needsChange = false;
for ( const line of readme ) {
if ( line.match( /Requires\sat\sleast:\s\d+\.\d/ ) ) {
const readmeVersion = line.match( /\d+\.\d/ );
// If the versions don't match, means we need to make a change.
if ( readmeVersion != l2Version ) {
needsChange = true;
newReadme.push( 'Requires at least: ' + l2Version );
continue;
}
}
newReadme.push( line );
}
if ( needsChange ) {
fs.writeFile( './plugins/woocommerce/readme.txt', newReadme.join( "\n" ), err => {
if ( err ) {
core.setFailed( `Unable to bump the WP L-2 support version. ${err}` );
}
core.setOutput( 'needsChange', needsChange );
// Copy the readme.txt file to the root of VM to be used later.
fs.writeFile( '../../readme.txt', newReadme.join( "\n" ), err => {
if ( err ) {
core.setFailed( `Unable to copy the readme.txt file to the root of VM. ${err}` );
}
} );
} );
} else {
core.setFailed( 'No changes needed. WP Version is L-2 compatible.' );
}
} );
- name: Commit changes
if: steps.readmeWPVersionTrunk.outputs.needsChange == 'true'
run: git commit --no-verify -am "Update readme.txt WP L-2 support version."
- name: Push changes
if: steps.readmeWPVersionTrunk.outputs.needsChange == 'true'
run: git push origin WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/trunk
- name: Push the PR up to GitHub
if: steps.readmeWPVersionTrunk.outputs.needsChange == 'true'
uses: actions/github-script@v6
with:
script: |
const PRBody = "This PR bumps the WP version to L-2 compatible for trunk.\n";
const pr = await github.rest.pulls.create( {
owner: context.repo.owner,
repo: context.repo.repo,
title: "Bump WP Version to L-2 compatible for trunk",
head: "WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/trunk",
base: "trunk",
body: PRBody
} );
if ( pr.status != 201 ) {
core.setFailed( "Unable to push WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/trunk to GitHub." );
}
await github.rest.pulls.requestReviewers( {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.data.number,
reviewers: [ context.actor ]
} );

View File

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

View File

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

View File

@ -10,10 +10,16 @@ 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
issues: write
steps:
- uses: actions/checkout@v3

View File

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

View File

@ -1,18 +1,20 @@
name: Run tests against PR in an environment with COT enabled
on:
pull_request:
types: [labeled]
workflow_dispatch:
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
@ -66,8 +68,9 @@ jobs:
cot-api-tests-run:
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
@ -116,99 +119,101 @@ jobs:
if-no-files-found: ignore
retention-days: 5
test-summary:
name: Post test results
if: |
always() &&
! github.event.pull_request.head.repo.fork &&
(
contains( needs.*.result, 'success' ) ||
contains( needs.*.result, 'failure' )
)
runs-on: ubuntu-20.04
needs: [cot-api-tests-run, cot-e2e-tests-run]
steps:
- name: Create dirs
run: |
mkdir -p repo
mkdir -p artifacts/api
mkdir -p artifacts/e2e
mkdir -p output
- name: Checkout code
uses: actions/checkout@v3
with:
path: repo
- name: Download API test report artifact
uses: actions/download-artifact@v3
with:
name: api-test-report---pr-${{ github.event.number }}
path: artifacts/api
- name: Download Playwright E2E test report artifact
uses: actions/download-artifact@v3
with:
name: e2e-test-report---pr-${{ github.event.number }}
path: artifacts/e2e
- name: Prepare test summary
id: prepare-test-summary
uses: actions/github-script@v6
env:
API_SUMMARY_PATH: ${{ github.workspace }}/artifacts/api/allure-report/widgets/summary.json
E2E_PW_SUMMARY_PATH: ${{ github.workspace }}/artifacts/e2e/allure-report/widgets/summary.json
PR_NUMBER: ${{ github.event.number }}
SHA: ${{ github.event.pull_request.head.sha }}
with:
result-encoding: string
script: |
const script = require( './repo/.github/workflows/scripts/prepare-test-summary.js' )
return await script( { core } )
- name: Find PR comment by github-actions[bot]
uses: peter-evans/find-comment@v2
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Test Results Summary
- name: Create or update PR comment
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: ${{ steps.prepare-test-summary.outputs.result }}
edit-mode: replace
publish-test-reports:
name: Publish test reports
if: |
always() &&
! github.event.pull_request.head.repo.fork &&
(
contains( needs.*.result, 'success' ) ||
contains( needs.*.result, 'failure' )
)
runs-on: ubuntu-20.04
needs: [cot-api-tests-run, cot-e2e-tests-run]
env:
GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
RUN_ID: ${{ github.run_id }}
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
steps:
- name: Publish test reports
env:
API_ARTIFACT: api-test-report---pr-${{ github.event.number }}
E2E_ARTIFACT: e2e-test-report---pr-${{ github.event.number }}
run: |
gh workflow run publish-test-reports-pr.yml \
-f run_id=$RUN_ID \
-f api_artifact=$API_ARTIFACT \
-f e2e_artifact=$E2E_ARTIFACT \
-f pr_number=$PR_NUMBER \
-f commit_sha=$COMMIT_SHA \
-f s3_root=public \
--repo woocommerce/woocommerce-test-reports
# test-summary:
# name: Post test results
# if: |
# always() &&
# ! github.event.pull_request.head.repo.fork &&
# (
# contains( needs.*.result, 'success' ) ||
# 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
# run: |
# mkdir -p repo
# mkdir -p artifacts/api
# mkdir -p artifacts/e2e
# mkdir -p output
#
# - name: Checkout code
# uses: actions/checkout@v3
# with:
# path: repo
#
# - name: Download API test report artifact
# uses: actions/download-artifact@v3
# with:
# name: api-test-report---pr-${{ github.event.number }}
# path: artifacts/api
#
# - name: Download Playwright E2E test report artifact
# uses: actions/download-artifact@v3
# with:
# name: e2e-test-report---pr-${{ github.event.number }}
# path: artifacts/e2e
#
# - name: Prepare test summary
# id: prepare-test-summary
# uses: actions/github-script@v6
# env:
# API_SUMMARY_PATH: ${{ github.workspace }}/artifacts/api/allure-report/widgets/summary.json
# E2E_PW_SUMMARY_PATH: ${{ github.workspace }}/artifacts/e2e/allure-report/widgets/summary.json
# PR_NUMBER: ${{ github.event.number }}
# SHA: ${{ github.event.pull_request.head.sha }}
# with:
# result-encoding: string
# script: |
# const script = require( './repo/.github/workflows/scripts/prepare-test-summary.js' )
# return await script( { core } )
#
# - name: Find PR comment by github-actions[bot]
# uses: peter-evans/find-comment@v2
# id: find-comment
# with:
# issue-number: ${{ github.event.pull_request.number }}
# comment-author: 'github-actions[bot]'
# body-includes: Test Results Summary
#
# - name: Create or update PR comment
# uses: peter-evans/create-or-update-comment@v2
# with:
# comment-id: ${{ steps.find-comment.outputs.comment-id }}
# issue-number: ${{ github.event.pull_request.number }}
# body: ${{ steps.prepare-test-summary.outputs.result }}
# edit-mode: replace
#
# publish-test-reports:
# name: Publish test reports
# if: |
# always() &&
# ! github.event.pull_request.head.repo.fork &&
# (
# contains( needs.*.result, 'success' ) ||
# contains( needs.*.result, 'failure' )
# )
# runs-on: ubuntu-20.04
# needs: [cot-api-tests-run, cot-e2e-tests-run]
# env:
# GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
# PR_NUMBER: ${{ github.event.number }}
# RUN_ID: ${{ github.run_id }}
# COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
# steps:
# - name: Publish test reports
# env:
# API_ARTIFACT: api-test-report---pr-${{ github.event.number }}
# E2E_ARTIFACT: e2e-test-report---pr-${{ github.event.number }}
# run: |
# gh workflow run publish-test-reports-pr.yml \
# -f run_id=$RUN_ID \
# -f api_artifact=$API_ARTIFACT \
# -f e2e_artifact=$E2E_ARTIFACT \
# -f pr_number=$PR_NUMBER \
# -f commit_sha=$COMMIT_SHA \
# -f s3_root=public \
# --repo woocommerce/woocommerce-test-reports

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,12 @@
# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
name: Run tests against PR
on:
pull_request:
paths:
- '!**'
- '**/changelog/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

View File

@ -1,16 +1,22 @@
name: Run tests against PR
on:
pull_request:
workflow_dispatch:
pull_request:
paths-ignore:
- '**/changelog/**'
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 +85,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 +137,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 +172,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:

View File

@ -0,0 +1,12 @@
# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
name: Build Live Branch
on:
pull_request:
paths:
- '!**'
- '**/changelog/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

View File

@ -1,16 +1,22 @@
name: Build Live Branch
on:
pull_request:
paths-ignore:
- '**/changelog/**'
concurrency:
# Cancel concurrent jobs on pull_request but not push, by including the run_id in the concurrency group for the latter.
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

View File

@ -0,0 +1,12 @@
# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
name: Run code coverage on PR
on:
pull_request:
paths:
- '!**'
- '**/changelog/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

View File

@ -1,54 +1,60 @@
name: Run code coverage on PR
on:
pull_request:
workflow_dispatch:
pull_request:
paths-ignore:
- '**/changelog/**'
workflow_dispatch:
defaults:
run:
shell: bash
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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
services:
database:
image: mysql:5.6
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 100
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
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 100
- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
- name: Tool versions
run: |
php --version
composer --version
- name: Tool versions
run: |
php --version
composer --version
- name: Build Admin feature config
working-directory: plugins/woocommerce
run:
pnpm run build:feature-config
- name: Build Admin feature config
working-directory: plugins/woocommerce
run: pnpm run build:feature-config
- name: Init DB and WP
working-directory: plugins/woocommerce
run: bash tests/bin/install.sh woo_test root root 127.0.0.1 latest
- name: Init DB and WP
working-directory: plugins/woocommerce
run: bash tests/bin/install.sh woo_test root root 127.0.0.1 latest
- name: Run unit tests with code coverage. Allow to fail.
working-directory: plugins/woocommerce
run: |
RUN_CODE_COVERAGE=1 bash tests/bin/phpunit.sh
exit 0
- name: Run unit tests with code coverage. Allow to fail.
working-directory: plugins/woocommerce
run: |
RUN_CODE_COVERAGE=1 bash tests/bin/phpunit.sh
exit 0
- name: Send code coverage to Codecov.
run: |
bash <(curl -s https://codecov.io/bash)
- name: Send code coverage to Codecov.
run: |
bash <(curl -s https://codecov.io/bash)

View File

@ -0,0 +1,12 @@
# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
name: Run code coverage on PR
on:
pull_request:
paths:
- '!**'
- '**/changelog/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

View File

@ -1,5 +1,8 @@
name: Run code sniff on PR
on: pull_request
on:
pull_request:
paths-ignore:
- '**/changelog/**'
defaults:
run:
shell: bash
@ -8,11 +11,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:

View File

@ -0,0 +1,12 @@
# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
name: Highlight templates changes
on:
pull_request:
paths:
- '!**'
- '**/changelog/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

View File

@ -1,9 +1,17 @@
name: Highlight templates changes
on: pull_request
on:
pull_request:
paths-ignore:
- '**/changelog/**'
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:
@ -24,32 +32,32 @@ jobs:
- name: Check results
uses: actions/github-script@v6
with:
script: |
const template = '${{ steps.run.outputs.templates }}';
script: |
const template = '${{ steps.run.outputs.templates }}';
if ( template === '' ) {
return;
}
if ( template === '' ) {
return;
}
const templateArr = template.split( '\n' );
const modTemplateArr = [];
let needsVersionBump = false;
const templateArr = template.split( '\n' );
const modTemplateArr = [];
let needsVersionBump = false;
templateArr.forEach( ( el ) => {
if ( el.match( /NOTICE/ ) ) {
modTemplateArr.pop();
return;
}
templateArr.forEach( ( el ) => {
if ( el.match( /NOTICE/ ) ) {
modTemplateArr.pop();
return;
}
if ( el.match( /WARNING/ ) ) {
needsVersionBump = true;
}
if ( el.match( /WARNING/ ) ) {
needsVersionBump = true;
}
modTemplateArr.push( el );
} );
modTemplateArr.push( el );
} );
const templateResult = modTemplateArr.join( '\n' );
const templateResult = modTemplateArr.join( '\n' );
if ( needsVersionBump ) {
core.setFailed( `Templates have changed but template versions were not bumped:\n${ templateResult }` );
}
if ( needsVersionBump ) {
core.setFailed( `Templates have changed but template versions were not bumped:\n${ templateResult }` );
}

View File

@ -1,32 +1,37 @@
name: Run lint checks potentially affecting projects across the monorepo
on:
pull_request:
branches:
- 'trunk'
pull_request:
branches:
- 'trunk'
concurrency:
group: changelogger-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
group: changelogger-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
changelogger_used:
name: Changelogger use
runs-on: ubuntu-20.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
changelogger_used:
name: Changelogger use
runs-on: ubuntu-20.04
permissions:
contents: read
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
with:
build: false
- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
with:
build: false
- name: Check change files are touched for touched projects
env:
BASE: ${{ github.event.pull_request.base.sha }}
HEAD: ${{ github.event.pull_request.head.sha }}
run: php tools/monorepo/check-changelogger-use.php --debug "$BASE" "$HEAD"
- name: Check change files are touched for touched projects
env:
BASE: ${{ github.event.pull_request.base.sha }}
HEAD: ${{ github.event.pull_request.head.sha }}
run: php tools/monorepo/check-changelogger-use.php --debug "$BASE" "$HEAD"
- name: Run changelog validation
run: pnpm run -r changelog validate
- name: Run changelog validation
run: pnpm run -r changelog validate

View File

@ -1,14 +1,21 @@
name: Lint and tests for JS packages and woocommerce-admin/client
on: pull_request
on:
pull_request:
paths-ignore:
- '**/changelog/**'
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

12
.github/workflows/pr-lint-test-skip.yml vendored Normal file
View File

@ -0,0 +1,12 @@
# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
name: Run smoke tests against pull request.
on:
pull_request:
paths:
- '!**'
- '**/changelog/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

View File

@ -1,18 +1,23 @@
name: 'Label Pull Request Project'
on:
pull_request_target:
types:
- opened
- synchronize
pull_request_target:
types:
- opened
- synchronize
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
label_project:
runs-on: ubuntu-20.04
steps:
- uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/project-pr-labeler.yml
label_project:
runs-on: ubuntu-20.04
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v3
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
configuration-path: .github/project-pr-labeler.yml

View File

@ -0,0 +1,12 @@
# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
name: Lint and tests for JS packages and woocommerce-admin/client
on:
pull_request:
paths:
- '!**'
- '**/changelog/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

View File

@ -1,19 +1,26 @@
name: Run smoke tests against pull request.
on:
pull_request:
paths-ignore:
- '**/changelog/**'
branches:
- trunk
types:
- labeled
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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

View File

@ -0,0 +1,12 @@
# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
name: Run unit tests on PR
on:
pull_request:
paths:
- '!**'
- '**/changelog/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

View File

@ -1,18 +1,24 @@
name: Run unit tests on PR
on:
pull_request
pull_request:
paths-ignore:
- '**/changelog/**'
defaults:
run:
shell: bash
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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
@ -22,9 +28,9 @@ jobs:
include:
- wp: nightly
php: '7.4'
- wp: '5.9'
- wp: '6.0'
php: 7.4
- wp: '5.8'
- wp: '5.9'
php: 7.4
services:
database:
@ -40,25 +46,12 @@ jobs:
- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
with:
php-version: ${{ matrix.php }}
php-version: ${{ matrix.php }}
- name: Tool versions
run: |
php --version
composer --version
- name: Add PHP8 Compatibility.
run: |
if [ "$(php -r "echo version_compare(PHP_VERSION,'8.0','>=');")" ]; then
cd plugins/woocommerce
curl -L https://github.com/woocommerce/phpunit/archive/add-compatibility-with-php8-to-phpunit-7.zip -o /tmp/phpunit-7.5-fork.zip
unzip -d /tmp/phpunit-7.5-fork /tmp/phpunit-7.5-fork.zip
composer bin phpunit config --unset platform
composer bin phpunit config repositories.0 '{"type": "path", "url": "/tmp/phpunit-7.5-fork/phpunit-add-compatibility-with-php8-to-phpunit-7", "options": {"symlink": false}}'
composer bin phpunit require --dev -W phpunit/phpunit:@dev --ignore-platform-reqs
rm -rf ./vendor/phpunit/
composer dump-autoload
fi
php --version
composer --version
- name: Init DB and WP
working-directory: plugins/woocommerce

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,6 +3,8 @@ on:
schedule:
- cron: '25 7 * * *'
permissions: {}
jobs:
ping_site:
runs-on: ubuntu-20.04

View File

@ -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 }}
@ -77,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:
@ -121,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:
@ -171,6 +179,8 @@ jobs:
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
@ -244,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

View File

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

View File

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

View File

@ -6,9 +6,14 @@ on:
- trunk
paths:
- '**/package.json'
permissions: {}
jobs:
syncpack:
runs-on: ubuntu-latest
permissions:
contents: read
name: syncpack
steps:
- name: 'Checkout'

View File

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

View File

@ -3,6 +3,9 @@ on:
issues:
types:
- labeled
permissions: {}
jobs:
add-dev-comment:
if: "github.event.label.name == 'needs: developer feedback'"

View File

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

View File

@ -49,7 +49,10 @@ This repository is not suitable for support. Please don't use our issue tracker
* [The Official WooCommerce Facebook Group](https://www.facebook.com/groups/advanced.woocommerce).
* For customizations, you may want to check our list of [WooExperts](https://woocommerce.com/experts/) or [Codeable](https://codeable.io/).
Support requests in issues on this repository will be closed on sight.
NOTE: Unfortunately, we are unable to honor support requests in issues on this repository; as a result, any requests submitted in this manner will be closed.
## Community
For peer to peer support, real-time announcements, and office hours, please [join our slack community](https://woocommerce.com/community-slack/)!
## Contributing to WooCommerce
If you have a patch or have stumbled upon an issue with WooCommerce core, you can contribute this back to the code. Please read our [contributor guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) for more information on how you can do this.

View File

@ -1,5 +1,110 @@
== Changelog ==
= 7.3.0 2023-01-10 =
**WooCommerce**
* Fix - Remove redundant Pinterest plugin from marketing task [#36158](https://github.com/woocommerce/woocommerce/pull/36158)
* Fix - Corrects a hard-coded reference to the WP post meta table within the HPOS Migration Helper, that would fail on some sites. [#36100](https://github.com/woocommerce/woocommerce/pull/36100)
* Fix - Add a blank space between the emoji and the message within a notice popup [#35698](https://github.com/woocommerce/woocommerce/pull/35698)
* Fix - Add a data migration for changed New Zealand and Ukraine state codes [#35960](https://github.com/woocommerce/woocommerce/pull/35960)
* Fix - Add back missing scss files from assets. [#35624](https://github.com/woocommerce/woocommerce/pull/35624)
* Fix - Address HPOS synchronization issues relating to the deletion of orders. [#35723](https://github.com/woocommerce/woocommerce/pull/35723)
* Fix - Avoid a potential fatal error when forming edit-order URLs. [#35995](https://github.com/woocommerce/woocommerce/pull/35995)
* Fix - Fix call of array_key_exists in SSR. [#35598](https://github.com/woocommerce/woocommerce/pull/35598)
* Fix - Fix ellipsis dropdown menu is mostly hidden within the task list [#35949](https://github.com/woocommerce/woocommerce/pull/35949)
* Fix - Fixes fatal error resulting from translating the WooCommerce main menu. [#35695](https://github.com/woocommerce/woocommerce/pull/35695)
* Fix - Fix get orders REST API endpoint when using 'search' or 'parent' and HPOS is enabled [#35818](https://github.com/woocommerce/woocommerce/pull/35818)
* Fix - Fix handling of non-ASCII product attributes when the attributes lookup table is in use [#34432](https://github.com/woocommerce/woocommerce/pull/34432)
* Fix - Fix handling of statuses in orders list table (HPOS). [#35370](https://github.com/woocommerce/woocommerce/pull/35370)
* Fix - Fix logo icon for Google Listings and Ads. [#35732](https://github.com/woocommerce/woocommerce/pull/35732)
* Fix - Fix product tab to be shown on production build [#35976](https://github.com/woocommerce/woocommerce/pull/35976)
* Fix - Fix regexp used for filtering country dropdown on the store details step #35941 [#35942](https://github.com/woocommerce/woocommerce/pull/35942)
* Fix - Fix the gap in the featured product checkbox [#35710](https://github.com/woocommerce/woocommerce/pull/35710)
* Fix - Fix tooltips not appearing in the orders list admin page. [#35638](https://github.com/woocommerce/woocommerce/pull/35638)
* Fix - Fix unread note count on inbox panel [#35396](https://github.com/woocommerce/woocommerce/pull/35396)
* Fix - Fix unsaved modal propmt to not be shown during form submission [#35657](https://github.com/woocommerce/woocommerce/pull/35657)
* Fix - Fix version in template and function docblocks. [#35473](https://github.com/woocommerce/woocommerce/pull/35473)
* Fix - Fix WooCommerce Admin client React build warnings and remove unnecessary scss imports. [#35930](https://github.com/woocommerce/woocommerce/pull/35930)
* Fix - Fix wrong query param in onboarding product api call [#35926](https://github.com/woocommerce/woocommerce/pull/35926)
* Fix - If order types have not been registered, do not attempt to count orders. [#35820](https://github.com/woocommerce/woocommerce/pull/35820)
* Fix - Make the 'unprotected upload directory' notice dismissable. [#33544](https://github.com/woocommerce/woocommerce/pull/33544)
* Fix - Update Playwright to 1.28.0 and explicitly set PHP version in GH action [#35679](https://github.com/woocommerce/woocommerce/pull/35679)
* Fix - When importing product CSV, ensure line breaks within header columns do not break the import process. [#35880](https://github.com/woocommerce/woocommerce/pull/35880)
* Add - Add CES exit prompt for setting pages, when tracking is enabled. [#35761](https://github.com/woocommerce/woocommerce/pull/35761)
* Add - Add CES feedback functionality to the share feedback button within the Product MVP. [#35690](https://github.com/woocommerce/woocommerce/pull/35690)
* Add - Add Denmark postcode validation. [#35653](https://github.com/woocommerce/woocommerce/pull/35653)
* Add - Add exit prompt logic to get feedback if users leave product pages without saving when tracking is enabled. [#35728](https://github.com/woocommerce/woocommerce/pull/35728)
* Add - Add FormFileUpload component [#35358](https://github.com/woocommerce/woocommerce/pull/35358)
* Add - Add HPOS information to WC Tracker. [#35446](https://github.com/woocommerce/woocommerce/pull/35446)
* Add - Add new option to create new attribute within add attribute modal. [#35100](https://github.com/woocommerce/woocommerce/pull/35100)
* Add - Add new product management breadcrumbs to header [#35596](https://github.com/woocommerce/woocommerce/pull/35596)
* Add - Add new Product MVP CES footer for gathering feedback on the new product management screen. [#35652](https://github.com/woocommerce/woocommerce/pull/35652)
* Add - Add one-click installation to recommended extensions in Marketing page. [#35542](https://github.com/woocommerce/woocommerce/pull/35542)
* Add - Add pagination to variations list [#35979](https://github.com/woocommerce/woocommerce/pull/35979)
* Add - Add product settings menu in header [#35592](https://github.com/woocommerce/woocommerce/pull/35592)
* Add - Add product tab headers and move sections to respective tabs [#35862](https://github.com/woocommerce/woocommerce/pull/35862)
* Add - Add product variations list to new product management experience [#35889](https://github.com/woocommerce/woocommerce/pull/35889)
* Add - Add support for custom order types in HPOS admin UI. [#35658](https://github.com/woocommerce/woocommerce/pull/35658)
* Add - Add the woocommerce_order_applied_coupon hook [#35616](https://github.com/woocommerce/woocommerce/pull/35616)
* Add - Add tracks events for 'product_view_product_click' and 'product_view_product_dismiss' [#35582](https://github.com/woocommerce/woocommerce/pull/35582)
* Add - Introduces action `woocommerce_order_list_table_restrict_manage_orders` as an equivalent of the legacy `restrict_manage_posts` hook. [#36000](https://github.com/woocommerce/woocommerce/pull/36000)
* Add - Open categories menu list when the user focus the category field [#35606](https://github.com/woocommerce/woocommerce/pull/35606)
* Update - Match country name or ' - region' when filtering country select control #36120 [#36159](https://github.com/woocommerce/woocommerce/pull/36159)
* Update - Update WooCommerce Blocks to 9.1.3 [#36125](https://github.com/woocommerce/woocommerce/pull/36125)
* Update - Adapt the summary text in the product management form. [#35717](https://github.com/woocommerce/woocommerce/pull/35717)
* Update - Add Codisto for WooCommerce to free extensions list [#36009](https://github.com/woocommerce/woocommerce/pull/36009)
* Update - Add experimental open menu on focus option to the attribute and attribute term input fields. [#35758](https://github.com/woocommerce/woocommerce/pull/35758)
* Update - Add missing tracks events [#35262](https://github.com/woocommerce/woocommerce/pull/35262)
* Update - Add Pinterest for WooCommerce to free extensions list [#36003](https://github.com/woocommerce/woocommerce/pull/36003)
* Update - Automatically create the custom order tables if the corresponding feature is enabled [#35357](https://github.com/woocommerce/woocommerce/pull/35357)
* Update - Disable TikTok in the OBW [#35924](https://github.com/woocommerce/woocommerce/pull/35924)
* Update - Include taxes migration in MigrationHelper::migrate_country_states [#35967](https://github.com/woocommerce/woocommerce/pull/35967)
* Update - Increase consistency in relation to the way taxonomy term ordering is persisted. [#34645](https://github.com/woocommerce/woocommerce/pull/34645)
* Update - Make product form header and actions responsive for smaller viewports [#35623](https://github.com/woocommerce/woocommerce/pull/35623)
* Update - Remove welcome to woocommerce store note [#35342](https://github.com/woocommerce/woocommerce/pull/35342)
* Update - Surface Amazon Pay as "Additional Payment Options" for UK/EU/JP [#35726](https://github.com/woocommerce/woocommerce/pull/35726)
* Update - Update api-core-tests readme to reference correct directory for .env file [#35759](https://github.com/woocommerce/woocommerce/pull/35759)
* Update - Update country data in api-core-tests to prevent numerous test data updates [#35557](https://github.com/woocommerce/woocommerce/pull/35557)
* Update - update FAQ in readme consumed by .org [#35696](https://github.com/woocommerce/woocommerce/pull/35696)
* Update - Update WooCommerce Blocks to 9.1.1 [#36004](https://github.com/woocommerce/woocommerce/pull/36004)
* Update - Update wording for In-App Marketplace tour. [#35929](https://github.com/woocommerce/woocommerce/pull/35929)
* Update - Updating all CES events to support two questions in modal. [#35680](https://github.com/woocommerce/woocommerce/pull/35680)
* Dev - Allow the user to select multiple images in the Media Library [#35722](https://github.com/woocommerce/woocommerce/pull/35722)
* Dev - Check if blocks have been added to rich text editors before updating value [#35626](https://github.com/woocommerce/woocommerce/pull/35626)
* Dev - Make e2e tests compatible with nightly and release smoke test sites. [#35492](https://github.com/woocommerce/woocommerce/pull/35492)
* Dev - Move file picker by clicking card into the MediaUploader component [#35738](https://github.com/woocommerce/woocommerce/pull/35738)
* Dev - Update the "can manually add a variation" E2E test to prevent automatic creation of variations from all attributes. [#36008](https://github.com/woocommerce/woocommerce/pull/36008)
* Tweak - Avoid deprecation notices under PHP 8.1 when calling wp_parse_url(). [#35648](https://github.com/woocommerce/woocommerce/pull/35648)
* Tweak - Correct the usage of 'address' and 'addresses' within `wc_get_account_menu_items()`. [#32026](https://github.com/woocommerce/woocommerce/pull/32026)
* Tweak - Create ProductForm component to merge similar structures between AddProductPage and EditProductPage [#35783](https://github.com/woocommerce/woocommerce/pull/35783)
* Tweak - Improves efficiency of code responsible for determining plugin IDs (during feature compatibility checks). [#35727](https://github.com/woocommerce/woocommerce/pull/35727)
* Tweak - Make the formatted shipping address available via the `woocommerce_cart_no_shipping_available_html` hook. [#30723](https://github.com/woocommerce/woocommerce/pull/30723)
* Tweak - Make the OrdersTableDataStore init_order_record() and get_order_data_for_ids() functions protected rather than private [#35829](https://github.com/woocommerce/woocommerce/pull/35829)
* Tweak - Move CSS about notice outside of .woocommerce class scope [#35912](https://github.com/woocommerce/woocommerce/pull/35912)
* Tweak - Resolve an error in the product tracking code by testing to see if the `post_type` query var is set before checking its value. [#34501](https://github.com/woocommerce/woocommerce/pull/34501)
* Tweak - Simplify wording within the customer emails for on-hold orders. [#31886](https://github.com/woocommerce/woocommerce/pull/31886)
* Tweak - WooCommerce has now been tested up to WordPress 6.1.x. [#35985](https://github.com/woocommerce/woocommerce/pull/35985)
* Performance - Split CALC_FOUND_ROW query into seperate count query for better performance. [#35468](https://github.com/woocommerce/woocommerce/pull/35468)
* Enhancement - Add a bottom padding to the whole form [#35721](https://github.com/woocommerce/woocommerce/pull/35721)
* Enhancement - Add a confirmation modal when the user tries to navigate away with unsaved changes [#35625](https://github.com/woocommerce/woocommerce/pull/35625)
* Enhancement - Add a default placeholder title for newly added attributes and always show remove button for attributes [#35904](https://github.com/woocommerce/woocommerce/pull/35904)
* Enhancement - Add help tip for Product Image and Product Gallery meta boxes [#35834](https://github.com/woocommerce/woocommerce/pull/35834)
* Enhancement - Add support for product attribute taxonomy template [#35617](https://github.com/woocommerce/woocommerce/pull/35617)
* Enhancement - Add warning banner that informs the user if they have conflicting tax display settings [#36010](https://github.com/woocommerce/woocommerce/pull/36010)
* Enhancement - Change the width of pricing fields, SKU and Shipping Class to 50% in big screens (>960px) in new product management experience [#35545](https://github.com/woocommerce/woocommerce/pull/35545)
* Enhancement - Fix price field currency symbol position [#35718](https://github.com/woocommerce/woocommerce/pull/35718)
* Enhancement - Improve element stacking in modals on tablet and mobile [#35733](https://github.com/woocommerce/woocommerce/pull/35733)
* Security - Customers REST API endpoint will now return user metadata only when requester has an administrator role [#36408](https://github.com/woocommerce/woocommerce/pull/36408).
= 7.2.3 2023-1-9
**WooCommerce Blocks 8.9.4**
* Fix - fatal error in WordPress 5.8 when creating a post or page. #7496
* Fix - hangs in the block editor with WordPress 5.8. #8095
* Fix - Filter by Attribute block crashing in the editor of WordPress 5.8. #8101
= 7.2.2 2022-12-21 =
** WooCommerce**

View File

@ -16,6 +16,7 @@
"scripts": {
"build": "pnpm exec turbo run turbo:build",
"test": "pnpm exec turbo run turbo:test",
"clean": "pnpm store prune && git clean -fx **/node_modules && pnpm i",
"preinstall": "npx only-allow pnpm",
"postinstall": "pnpm git:update-hooks",
"git:update-hooks": "rm -r .git/hooks && mkdir -p .git/hooks && husky install",

View File

@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: Dev dependency update.

View File

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

View File

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

View File

@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: Dev dependency update.

View File

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

View File

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

View File

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

View File

@ -1,4 +0,0 @@
Significance: patch
Type: update
Updating downshift to 6.1.12.

View File

@ -1,4 +0,0 @@
Significance: minor
Type: update
Move classname down in SelectControl Menu so it is on the actual Menu element.

View File

@ -1,4 +0,0 @@
Significance: minor
Type: add
Add experimental ConditionalWrapper component

View File

@ -1,4 +0,0 @@
Significance: patch
Type: add
Add async filtering support to the `__experimentalSelectControl` component

View File

@ -1,4 +0,0 @@
Significance: patch
Type: add
Add experimental open menu when user focus the select control input element

View File

@ -1,4 +0,0 @@
Significance: minor
Type: dev
Allow the user to select multiple images in the Media Library

View File

@ -1,4 +0,0 @@
Significance: minor
Type: add
Adding isHidden option for primary button in TourKit component.

View File

@ -1,4 +0,0 @@
Significance: patch
Type: fix
Fix pagination label text from uppercase to normal and font styles

View File

@ -0,0 +1,4 @@
Significance: minor
Type: add
Adding WooProductFieldItem slotfill.

View File

@ -1,4 +1,4 @@
Significance: minor
Type: enhancement
Type: add
Add noDataLabel property into table.js component to allow No Data label customization.
Adding the WooProductSectionItem slotfill component.

View File

@ -0,0 +1,4 @@
Significance: minor
Type: add
Add product field store and helper functions for rendering fields from config.

View File

@ -1,4 +0,0 @@
Significance: minor
Type: add
Add support for custom suffix prop on SelectControl.

View File

@ -0,0 +1,4 @@
Significance: minor
Type: tweak
Update spelling of Cancelled to Canceled for US English.

View File

@ -1,4 +0,0 @@
Significance: minor
Type: dev
Move file picker by clicking card into the MediaUploader component

View File

@ -1,5 +1,4 @@
Significance: patch
Type: dev
Comment: Dev dependency bump
Migrate Link component to TS

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Migrate ProductImage component to TS

View File

@ -1,4 +1,4 @@
Significance: patch
Type: dev
Migrate search component to TS
Migrate Section component to TS

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Migrate Tag component to TS

View File

@ -1,4 +0,0 @@
Significance: patch
Type: enhancement
Update font size and spacing in the tooltip component

View File

@ -1,4 +0,0 @@
Significance: patch
Type: enhancement
Align the field height across the whole form

View File

@ -1,4 +0,0 @@
Significance: patch
Type: enhancement
Fade the value selection field in the Attributes modal when no attribute is added

View File

@ -1,4 +0,0 @@
Significance: minor
Type: fix
Set editor mode on initialization to prevent initial text editor focus

View File

@ -1,4 +0,0 @@
Significance: minor
Type: add
Make Table component accept className prop.

View File

@ -0,0 +1,4 @@
Significance: minor
Type: fix
Fix SortableItem duplicated id

View File

@ -1,4 +0,0 @@
Significance: patch
Type: fix
Include react-dates styles (no longer in WP 6.1+).

View File

@ -1,4 +0,0 @@
Significance: patch
Type: fix
Close DateTimePickerControl's dropdown when blurring from input.

View File

@ -1,4 +0,0 @@
Significance: patch
Type: fix
DateTimePickerControl's onChange now only fires when there is an actual change to the datetime.

View File

@ -1,5 +0,0 @@
Significance: patch
Type: fix
Comment: Just a minor tweak to the CSS for the DateTimePickerControl suffix.

View File

@ -1,4 +0,0 @@
Significance: patch
Type: fix
Fixed DatePicker to work in WordPress 6.1 when currentDate is set to a moment instance.

View File

@ -1,4 +0,0 @@
Significance: patch
Type: tweak
Update variable name within useFormContext.

View File

@ -1,4 +0,0 @@
Significance: patch
Type: tweak
Updated image gallery toolbar position and tooltips.

View File

@ -1,4 +0,0 @@
Significance: minor
Type: tweak
Fix up initial block selection in RichTextEditor and add media blocks

View File

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

View File

@ -1,4 +0,0 @@
Significance: patch
Type: fix
Set initial values prop from reset form function as optional

View File

@ -1,4 +0,0 @@
Significance: minor
Type: add
Add className prop to ListItem.

View File

@ -1,4 +0,0 @@
Significance: patch
Type: add
Add aria-label for simple select dropdown

View File

@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: Dev dependency update.

View File

@ -1,4 +0,0 @@
Significance: minor
Type: add
Added ability to force time when DateTimePickerControl is date-only (timeForDateOnly prop).

View File

@ -1,4 +0,0 @@
Significance: major
Type: update
Switch DateTimePickerControl formatting to PHP style, for WP compatibility.

View File

@ -1,4 +0,0 @@
Significance: patch
Type: fix
Fix DateTimePickerControl's popover styling when slot-fill is used.

View File

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

View File

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

View File

@ -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",
@ -118,6 +118,7 @@
"@types/prop-types": "^15.7.4",
"@types/react": "^17.0.2",
"@types/testing-library__jest-dom": "^5.14.3",
"@types/uuid": "^8.3.0",
"@types/wordpress__components": "^19.10.1",
"@types/wordpress__data": "^6.0.0",
"@types/wordpress__media-utils": "^3.0.0",
@ -137,6 +138,7 @@
"sass-loader": "^10.2.1",
"ts-jest": "^27.1.3",
"typescript": "^4.8.3",
"uuid": "^8.3.0",
"webpack": "^5.70.0",
"webpack-cli": "^3.3.12"
},

View File

@ -21,7 +21,7 @@ export { default as FilterPicker } from './filter-picker';
export { H, Section } from './section';
export { ImageGallery, ImageGalleryItem } from './image-gallery';
export { default as ImageUpload } from './image-upload';
export { default as Link } from './link';
export { Link } from './link';
export { default as List } from './list';
export { MediaUploader } from './media-uploader';
export { default as MenuItem } from './ellipsis-menu/menu-item';
@ -84,3 +84,6 @@ export { DynamicForm } from './dynamic-form';
export { default as TourKit } from './tour-kit';
export * as TourKitTypes from './tour-kit/types';
export { CollapsibleContent } from './collapsible-content';
export { createOrderedChildren, sortFillsByOrder } from './utils';
export { WooProductFieldItem as __experimentalWooProductFieldItem } from './woo-product-field-item';
export { WooProductSectionItem as __experimentalWooProductSectionItem } from './woo-product-section-item';

View File

@ -1,77 +0,0 @@
/**
* External dependencies
*/
import PropTypes from 'prop-types';
import { partial } from 'lodash';
import { createElement } from '@wordpress/element';
import { getHistory } from '@woocommerce/navigation';
/**
* Use `Link` to create a link to another resource. It accepts a type to automatically
* create wp-admin links, wc-admin links, and external links.
*/
function Link( { children, href, type, ...props } ) {
// @todo Investigate further if we can use <Link /> directly.
// With React Router 5+, <RouterLink /> cannot be used outside of the main <Router /> elements,
// which seems to include components imported from @woocommerce/components. For now, we can use the history object directly.
const wcAdminLinkHandler = ( onClick, event ) => {
// If cmd, ctrl, alt, or shift are used, use default behavior to allow opening in a new tab.
if (
event.ctrlKey ||
event.metaKey ||
event.altKey ||
event.shiftKey
) {
return;
}
event.preventDefault();
// If there is an onclick event, execute it.
const onClickResult = onClick ? onClick( event ) : true;
// Mimic browser behavior and only continue if onClickResult is not explicitly false.
if ( onClickResult === false ) {
return;
}
getHistory().push( event.target.closest( 'a' ).getAttribute( 'href' ) );
};
const passProps = {
...props,
'data-link-type': type,
};
if ( type === 'wc-admin' ) {
passProps.onClick = partial( wcAdminLinkHandler, passProps.onClick );
}
return (
<a href={ href } { ...passProps }>
{ children }
</a>
);
}
Link.propTypes = {
/**
* The resource to link to.
*/
href: PropTypes.string.isRequired,
/**
* Type of link. For wp-admin and wc-admin, the correct prefix is appended.
*/
type: PropTypes.oneOf( [ 'wp-admin', 'wc-admin', 'external' ] ).isRequired,
};
Link.defaultProps = {
type: 'wc-admin',
};
Link.contextTypes = {
router: PropTypes.object,
};
export default Link;

View File

@ -0,0 +1,94 @@
/**
* External dependencies
*/
import PropTypes from 'prop-types';
import { partial } from 'lodash';
import { createElement } from '@wordpress/element';
import { getHistory } from '@woocommerce/navigation';
import React from 'react';
interface LinkProps {
/** Type of link. For wp-admin and wc-admin, the correct prefix is appended. */
type?: 'wc-admin' | 'wp-admin' | 'external';
/** The resource to link to. */
href: string;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type LinkOnClickHandlerFunction = ( ...props: any ) => any; // we don't want to restrict this function at all
type LinkOnclickHandler = (
onClick: LinkOnClickHandlerFunction | undefined,
event: React.MouseEvent< Element > | undefined
) => void;
/**
* Use `Link` to create a link to another resource. It accepts a type to automatically
* create wp-admin links, wc-admin links, and external links.
*/
export const Link = ( {
href,
children,
type = 'wc-admin',
...props
}: React.AnchorHTMLAttributes< HTMLAnchorElement > &
LinkProps ): React.ReactElement => {
// ( { children, href, type, ...props } ) => {
// @todo Investigate further if we can use <Link /> directly.
// With React Router 5+, <RouterLink /> cannot be used outside of the main <Router /> elements,
// which seems to include components imported from @woocommerce/components. For now, we can use the history object directly.
const wcAdminLinkHandler: LinkOnclickHandler = ( onClick, event ) => {
// If cmd, ctrl, alt, or shift are used, use default behavior to allow opening in a new tab.
if (
event?.ctrlKey ||
event?.metaKey ||
event?.altKey ||
event?.shiftKey
) {
return;
}
event?.preventDefault();
// If there is an onclick event, execute it.
const onClickResult = onClick && event ? onClick( event ) : true;
// Mimic browser behavior and only continue if onClickResult is not explicitly false.
if ( onClickResult === false ) {
return;
}
if ( event?.target instanceof Element ) {
const closestEventTarget = event.target
.closest( 'a' )
?.getAttribute( 'href' );
if ( closestEventTarget ) {
getHistory().push( closestEventTarget );
} else {
// eslint-disable-next-line no-console
console.error(
'@woocommerce/components/link is trying to push an undefined state into navigation stack'
); // This shouldn't happen as we wrap with <a> below
}
}
};
const passProps = {
...props,
'data-link-type': type,
};
if ( type === 'wc-admin' ) {
passProps.onClick = partial( wcAdminLinkHandler, passProps.onClick );
}
return (
<a href={ href } { ...passProps }>
{ children }
</a>
);
};
Link.contextTypes = {
router: PropTypes.object,
};
export default Link;

Some files were not shown because too many files have changed in this diff Show More