Merge branch 'trunk' into feature/34904-marketing-introduction-banner

Conflicts:
	plugins/woocommerce-admin/client/marketing/overview-multichannel/MarketingOverviewMultichannel.tsx
This commit is contained in:
Gan Eng Chin 2023-03-17 01:21:13 +08:00
commit f769a8c6f5
No known key found for this signature in database
GPG Key ID: 94D5D972860ADB01
533 changed files with 8274 additions and 4738 deletions

View File

@ -29,7 +29,7 @@ runs:
- name: Setup PNPM - name: Setup PNPM
uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd
with: with:
version: '^7.22.0' version: '7.29.1'
- name: Setup Node - name: Setup Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c

View File

@ -61,7 +61,7 @@
'plugin: woocommerce': 'plugin: woocommerce':
- plugins/woocommerce/**/* - plugins/woocommerce/**/*
'focus: react admin': 'focus: react admin [team:Ghidorah]':
- plugins/woocommerce/src/Admin/**/* - plugins/woocommerce/src/Admin/**/*
- plugins/woocommerce/src/Internal/Admin/**/* - plugins/woocommerce/src/Internal/Admin/**/*
- plugins/woocommerce-admin/**/* - plugins/woocommerce-admin/**/*

View File

@ -31,9 +31,9 @@ jobs:
include: include:
- wp: nightly - wp: nightly
php: '7.4' php: '7.4'
- wp: '5.9' - wp: '6.0'
php: 7.4 php: 7.4
- wp: '5.8' - wp: '5.9'
php: 7.4 php: 7.4
services: services:
database: database:

View File

@ -1,12 +0,0 @@
# 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

@ -13,6 +13,7 @@ permissions: {}
jobs: jobs:
e2e-tests-run: e2e-tests-run:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.user.login != 'github-actions[bot]' }}
name: Runs E2E tests. name: Runs E2E tests.
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
permissions: permissions:

View File

@ -1,12 +0,0 @@
# 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

@ -13,7 +13,7 @@ permissions: {}
jobs: jobs:
build: build:
if: github.repository_owner == 'woocommerce' if: github.repository_owner == 'woocommerce' && github.event.pull_request.user.login != 'github-actions[bot]'
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
permissions: permissions:
contents: read contents: read

View File

@ -1,12 +0,0 @@
# 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

@ -15,6 +15,7 @@ permissions: {}
jobs: jobs:
test: test:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.user.login != 'github-actions[bot]' }}
name: Code coverage (PHP 7.4, WP Latest) name: Code coverage (PHP 7.4, WP Latest)
timeout-minutes: 30 timeout-minutes: 30
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04

View File

@ -1,12 +0,0 @@
# 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

@ -16,6 +16,7 @@ permissions: {}
jobs: jobs:
test: test:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.user.login != 'github-actions[bot]' }}
name: Code sniff (PHP 7.4, WP Latest) name: Code sniff (PHP 7.4, WP Latest)
timeout-minutes: 15 timeout-minutes: 15
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04

View File

@ -1,12 +0,0 @@
# 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

@ -8,6 +8,7 @@ permissions: {}
jobs: jobs:
analyze: analyze:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.user.login != 'github-actions[bot]' }}
name: Check pull request changes to highlight name: Check pull request changes to highlight
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
permissions: permissions:

View File

@ -11,6 +11,7 @@ permissions: {}
jobs: jobs:
changelogger_used: changelogger_used:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.user.login != 'github-actions[bot]' }}
name: Changelogger use name: Changelogger use
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
permissions: permissions:

View File

@ -12,6 +12,7 @@ permissions: {}
jobs: jobs:
lint-test-js: lint-test-js:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.user.login != 'github-actions[bot]' }}
name: Lint and Test JS name: Lint and Test JS
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
permissions: permissions:

View File

@ -1,12 +0,0 @@
# 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,12 +0,0 @@
# 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,12 +0,0 @@
# 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

@ -14,6 +14,7 @@ permissions: {}
jobs: jobs:
test: test:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.user.login != 'github-actions[bot]' }}
name: PHP ${{ matrix.php }} WP ${{ matrix.wp }} name: PHP ${{ matrix.php }} WP ${{ matrix.wp }}
timeout-minutes: 30 timeout-minutes: 30
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04

View File

@ -1,14 +1,14 @@
name: Smoke test release name: Smoke test release
on: on:
release: release:
types: [published] types: [released, prereleased, published]
workflow_dispatch: workflow_dispatch:
inputs: inputs:
tag: tag:
description: 'WooCommerce Release Tag' description: 'WooCommerce Release Tag'
required: true required: true
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.event.release.tag_name || inputs.tag }}
cancel-in-progress: true cancel-in-progress: true
permissions: {} permissions: {}
env: env:
@ -23,31 +23,31 @@ jobs:
contents: read contents: read
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
outputs: outputs:
tag: ${{ steps.tag.outputs.result }} tag: ${{ steps.get-tag.outputs.tag }}
created: ${{ steps.created-at.outputs.created }} created: ${{ steps.created-at.outputs.created }}
steps: steps:
- name: Validate tag - name: Validate tag
if: ${{ github.event_name == 'workflow_dispatch' }} if: ${{ github.event_name == 'workflow_dispatch' }}
env: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
run: gh release view "${{ github.event.inputs.tag }}" --repo=woocommerce/woocommerce run: gh release view "${{ inputs.tag }}" --repo=woocommerce/woocommerce
- name: Get tag - name: Get tag from triggered event
uses: actions/github-script@v6 id: get-tag
id: tag env:
with: RELEASE_TAG: ${{ github.event.release.tag_name || inputs.tag }}
result-encoding: string run: |
script: | echo "Triggered event: ${{ github.event_name }}"
console.log( "${{ github.event_name }}" ); echo "Tag from event: $RELEASE_TAG"
return "${{ github.event.release.tag_name }}" || "${{ github.event.inputs.tag }}" echo "tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
- name: Verify woocommerce.zip asset - name: Verify woocommerce.zip asset
env: env:
GITHUB_TOKEN: ${{ github.token }} GH_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
RELEASE_TAG: ${{ steps.tag.outputs.result }} RELEASE_TAG: ${{ steps.get-tag.outputs.tag }}
run: | run: |
gh release download $RELEASE_TAG --repo woocommerce/woocommerce ASSET_NAMES=$(gh release view $RELEASE_TAG --repo woocommerce/woocommerce --json assets --jq ".assets[].name")
if [[ -f "woocommerce.zip" ]] if [[ $ASSET_NAMES == *"woocommerce.zip"* ]]
then then
echo "$RELEASE_TAG has a valid woocommerce.zip asset." echo "$RELEASE_TAG has a valid woocommerce.zip asset."
exit 0 exit 0
@ -59,8 +59,8 @@ jobs:
- name: Get 'created-at' of WooCommerce zip - name: Get 'created-at' of WooCommerce zip
id: created-at id: created-at
env: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
run: echo "created=$(gh release view ${{ steps.tag.outputs.result }} --json assets --jq .assets[0].createdAt --repo woocommerce/woocommerce)" >> $GITHUB_OUTPUT run: echo "created=$(gh release view ${{ steps.get-tag.outputs.tag }} --json assets --jq .assets[0].createdAt --repo woocommerce/woocommerce)" >> $GITHUB_OUTPUT
e2e-update-wc: e2e-update-wc:
name: Test WooCommerce update name: Test WooCommerce update
@ -93,6 +93,7 @@ jobs:
CUSTOMER_PASSWORD: ${{ secrets.RELEASE_TEST_CUSTOMER_PASSWORD }} CUSTOMER_PASSWORD: ${{ secrets.RELEASE_TEST_CUSTOMER_PASSWORD }}
CUSTOMER_USER: ${{ secrets.RELEASE_TEST_CUSTOMER_USER }} CUSTOMER_USER: ${{ secrets.RELEASE_TEST_CUSTOMER_USER }}
DEFAULT_TIMEOUT_OVERRIDE: 120000 DEFAULT_TIMEOUT_OVERRIDE: 120000
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
UPDATE_WC: ${{ needs.get-tag.outputs.tag }} UPDATE_WC: ${{ needs.get-tag.outputs.tag }}
run: | run: |
pnpm exec playwright test \ pnpm exec playwright test \
@ -106,7 +107,7 @@ jobs:
- name: Configure AWS credentials - name: Configure AWS credentials
if: success() || failure() if: success() || failure()
uses: aws-actions/configure-aws-credentials@v1 uses: aws-actions/configure-aws-credentials@v1-node16
with: with:
aws-region: ${{ secrets.REPORTS_AWS_REGION }} aws-region: ${{ secrets.REPORTS_AWS_REGION }}
aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }} aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }}
@ -183,7 +184,7 @@ jobs:
- name: Configure AWS credentials - name: Configure AWS credentials
if: success() || failure() if: success() || failure()
uses: aws-actions/configure-aws-credentials@v1 uses: aws-actions/configure-aws-credentials@v1-node16
with: with:
aws-region: ${{ secrets.REPORTS_AWS_REGION }} aws-region: ${{ secrets.REPORTS_AWS_REGION }}
aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }} aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }}
@ -284,7 +285,7 @@ jobs:
- name: Configure AWS credentials - name: Configure AWS credentials
if: success() || failure() if: success() || failure()
uses: aws-actions/configure-aws-credentials@v1 uses: aws-actions/configure-aws-credentials@v1-node16
with: with:
aws-region: ${{ secrets.REPORTS_AWS_REGION }} aws-region: ${{ secrets.REPORTS_AWS_REGION }}
aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }} aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }}
@ -393,7 +394,7 @@ jobs:
- name: Download release zip - name: Download release zip
env: env:
GITHUB_TOKEN: ${{ github.token }} GH_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
run: gh release download ${{ needs.get-wp-versions.outputs.tag }} --dir tmp run: gh release download ${{ needs.get-wp-versions.outputs.tag }} --dir tmp
- name: Replace `plugins/woocommerce` with unzipped woocommerce release build - name: Replace `plugins/woocommerce` with unzipped woocommerce release build
@ -427,7 +428,7 @@ jobs:
- name: Configure AWS credentials - name: Configure AWS credentials
if: success() || failure() if: success() || failure()
uses: aws-actions/configure-aws-credentials@v1 uses: aws-actions/configure-aws-credentials@v1-node16
with: with:
aws-region: ${{ secrets.REPORTS_AWS_REGION }} aws-region: ${{ secrets.REPORTS_AWS_REGION }}
aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }} aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }}
@ -567,7 +568,7 @@ jobs:
- name: Download release zip - name: Download release zip
env: env:
GITHUB_TOKEN: ${{ github.token }} GH_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
run: gh release download ${{ needs.get-tag.outputs.tag }} --dir tmp run: gh release download ${{ needs.get-tag.outputs.tag }} --dir tmp
- name: Replace `plugins/woocommerce` with unzipped woocommerce release build - name: Replace `plugins/woocommerce` with unzipped woocommerce release build
@ -587,7 +588,7 @@ jobs:
- name: Configure AWS credentials - name: Configure AWS credentials
if: success() || failure() if: success() || failure()
uses: aws-actions/configure-aws-credentials@v1 uses: aws-actions/configure-aws-credentials@v1-node16
with: with:
aws-region: ${{ secrets.REPORTS_AWS_REGION }} aws-region: ${{ secrets.REPORTS_AWS_REGION }}
aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }} aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }}

View File

@ -0,0 +1,61 @@
# Duplicate workflow that returns success for this check when the author is "github-actions". 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: Status Check Bypass for Automation
on:
pull_request:
jobs:
bypass-lint:
if: ${{ github.event.pull_request.user.login == 'github-actions[bot]' }}
runs-on: ubuntu-latest
name: "Lint and Test JS"
steps:
- run: 'echo "No build required"'
bypass-7-4-latest:
if: ${{ github.event.pull_request.user.login == 'github-actions[bot]' }}
runs-on: ubuntu-latest
name: "PHP 7.4 WP latest"
steps:
- run: 'echo "No build required"'
bypass-8-0-latest:
if: ${{ github.event.pull_request.user.login == 'github-actions[bot]' }}
runs-on: ubuntu-latest
name: "PHP 8.0 WP latest"
steps:
- run: 'echo "No build required"'
bypass-api-tests:
if: ${{ github.event.pull_request.user.login == 'github-actions[bot]' }}
runs-on: ubuntu-latest
name: "Runs API tests."
steps:
- run: 'echo "No build required"'
bypass-k6:
if: ${{ github.event.pull_request.user.login == 'github-actions[bot]' }}
runs-on: ubuntu-latest
name: "Runs k6 Performance tests"
steps:
- run: 'echo "No build required"'
bypass-sniff:
if: ${{ github.event.pull_request.user.login == 'github-actions[bot]' }}
runs-on: ubuntu-latest
name: "Code sniff (PHP 7.4, WP Latest)"
steps:
- run: 'echo "No build required"'
bypass-changelogger-use:
if: ${{ github.event.pull_request.user.login == 'github-actions[bot]' }}
runs-on: ubuntu-latest
name: "Changelogger use"
steps:
- run: 'echo "No build required"'
bypass-e2e:
if: ${{ github.event.pull_request.user.login == 'github-actions[bot]' }}
runs-on: ubuntu-latest
name: "Runs E2E tests."
steps:
- run: 'echo "No build required"'
bypass-pr-highlight:
if: ${{ github.event.pull_request.user.login == 'github-actions[bot]' }}
runs-on: ubuntu-latest
name: "Check pull request changes to highlight"
steps:
- run: 'echo "No build required"'

View File

@ -25,7 +25,7 @@ jobs:
node-version: 16 node-version: 16
- name: 'Install Syncpack' - name: 'Install Syncpack'
run: npm install -g syncpack@^8.2.4 run: npm install -g syncpack@^9.8.4
- name: 'List Mismatches' - name: 'List Mismatches'
run: syncpack list-mismatches run: syncpack list-mismatches

View File

@ -1,6 +1,6 @@
{ {
"dev": true, "dev": true,
"filter": "^(?:config|react|react-dom|eslint|typescript|@typescript-eslint|@types/react).*$", "filter": "^(?:config|react|react-dom|eslint|typescript|@typescript-eslint|@types/react|@wordpress|@types/wordpress__components|postcss).*$",
"indent": "\t", "indent": "\t",
"overrides": true, "overrides": true,
"peer": true, "peer": true,
@ -72,6 +72,88 @@
"**" "**"
], ],
"pinVersion": "^8.32.0" "pinVersion": "^8.32.0"
},
{
"dependencies": [
"@wordpress/eslint-plugin",
"@wordpress/babel-plugin-import-jsx-pragma",
"@wordpress/babel-preset-default",
"@wordpress/env",
"@wordpress/stylelint-config",
"@wordpress/prettier-config",
"@wordpress/scripts",
"@wordpress/jest-console",
"@wordpress/dependency-extraction-webpack-plugin",
"@wordpress/e2e-test-utils",
"@wordpress/jest-preset-default",
"@wordpress/postcss-plugins-preset",
"@wordpress/custom-templated-path-webpack-plugin",
"@wordpress/postcss-themes"
],
"packages": [
"**"
],
"isIgnored": true
},
{
"dependencies": [
"@wordpress/block**",
"@wordpress/viewport"
],
"packages": [
"@woocommerce/product-editor",
"woocommerce/client/admin",
"@woocommerce/components"
],
"isIgnored": true
},
{
"dependencies": [
"@wordpress/**"
],
"packages": [
"@woocommerce/experimental"
],
"isIgnored": true
},
{
"dependencies": [
"@wordpress/**"
],
"packages": [
"**"
],
"pinVersion": "wp-6.0"
},
{
"dependencies": [
"@types/wordpress__components"
],
"packages": [
"**"
],
"pinVersion": "^19.10.3"
},
{
"dependencies": [
"postcss-loader"
],
"dependencyTypes": [
"devDependencies"
],
"packages": [
"**"
],
"pinVersion": "^4.3.0"
},
{
"dependencies": [
"postcss"
],
"packages": [
"**"
],
"pinVersion": "^8.4.7"
} }
] ]
} }

View File

@ -27,7 +27,7 @@ pnpm exec syncpack -- list-mismatches
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "You must sync the dependencies listed above before you can push this branch." echo "You must sync the dependencies listed above before you can push this branch."
echo "This can usually be accomplished automatically by updating the pinned version in `.syncpackrc` and then running \`pnpm run sync-dependencies\`." echo "This can usually be accomplished automatically by updating the pinned version in \`.syncpackrc\` and then running \`pnpm run sync-dependencies\`."
exit 1 exit 1
fi fi

4
changelog/pr-36705 Normal file
View File

@ -0,0 +1,4 @@
Significance: minor
Type: add
Added `woocommerce_widget_layered_nav_filters_start/end` hooks around layered nav filters widget

View File

@ -29,7 +29,7 @@
"@babel/runtime": "^7.17.2", "@babel/runtime": "^7.17.2",
"@types/node": "14.14.33", "@types/node": "14.14.33",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@wordpress/data": "^6.15.0", "@wordpress/data": "wp-6.0",
"@wordpress/eslint-plugin": "^11.1.0", "@wordpress/eslint-plugin": "^11.1.0",
"@wordpress/prettier-config": "^1.1.1", "@wordpress/prettier-config": "^1.1.1",
"babel-loader": "^8.2.3", "babel-loader": "^8.2.3",
@ -44,13 +44,13 @@
"mkdirp": "^1.0.4", "mkdirp": "^1.0.4",
"moment": "^2.29.1", "moment": "^2.29.1",
"node-stream-zip": "^1.15.0", "node-stream-zip": "^1.15.0",
"postcss-loader": "^3.0.0", "postcss-loader": "^4.3.0",
"prettier": "npm:wp-prettier@^2.2.1-beta-1", "prettier": "npm:wp-prettier@^2.2.1-beta-1",
"regenerator-runtime": "^0.13.9", "regenerator-runtime": "^0.13.9",
"request": "^2.88.2", "request": "^2.88.2",
"sass": "^1.49.9", "sass": "^1.49.9",
"sass-loader": "^10.2.1", "sass-loader": "^10.2.1",
"syncpack": "^8.3.9", "syncpack": "^9.8.4",
"turbo": "^1.7.0", "turbo": "^1.7.0",
"typescript": "^4.8.3", "typescript": "^4.8.3",
"url-loader": "^1.1.2", "url-loader": "^1.1.2",
@ -62,5 +62,11 @@
"@wordpress/babel-preset-default": "^6.4.1", "@wordpress/babel-preset-default": "^6.4.1",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"wp-textdomain": "1.0.1" "wp-textdomain": "1.0.1"
},
"pnpm": {
"overrides": {
"@types/react": "^17.0.2",
"react": "^17.0.2"
}
} }
} }

View File

@ -0,0 +1,4 @@
Significance: minor
Type: dev
Use syncpack to update dependencies.

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Update showOtherPaymentMethods() to test latest payment task properly

View File

@ -41,7 +41,7 @@
"@types/config": "0.0.41", "@types/config": "0.0.41",
"@types/expect-puppeteer": "^4.4.7", "@types/expect-puppeteer": "^4.4.7",
"@types/puppeteer": "^5.4.5", "@types/puppeteer": "^5.4.5",
"@typescript-eslint/eslint-plugin": "^5.43.0", "@typescript-eslint/eslint-plugin": "^5.54.0",
"@woocommerce/api": "^0.2.0", "@woocommerce/api": "^0.2.0",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",

View File

@ -31,12 +31,6 @@ export class PaymentsSetup extends BasePage {
} }
async showOtherPaymentMethods(): Promise< void > { async showOtherPaymentMethods(): Promise< void > {
const selector = '.woocommerce-task-payments button.toggle-button';
await this.page.waitForSelector( selector );
const toggleButton = await this.page.$(
`${ selector }[aria-expanded=false]`
);
await toggleButton?.click();
await waitForElementByText( 'h2', 'Offline payment methods' ); await waitForElementByText( 'h2', 'Offline payment methods' );
} }

View File

@ -0,0 +1 @@
package-lock=false

View File

@ -0,0 +1,11 @@
# Admin Layout
A collection of WooCommerce Admin layout components and utilities.
## Installation
Install the module
```bash
pnpm install @woocommerce/product-editor --save
```

View File

@ -0,0 +1,3 @@
# Changelog
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

View File

@ -0,0 +1,4 @@
Significance: minor
Type: dev
Create @woocommerce/admin-layout package to house header, footer, and similar components and utilities.

View File

@ -0,0 +1,32 @@
{
"name": "woocommerce/admin-layout",
"description": "WooCommerce Admin layout component library",
"type": "library",
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
"automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
"php": "7.2"
}
},
"extra": {
"changelogger": {
"formatter": {
"filename": "../../../tools/changelogger/class-package-formatter.php"
},
"types": {
"fix": "Fixes an existing bug",
"add": "Adds functionality",
"update": "Update existing functionality",
"dev": "Development related task",
"tweak": "A minor adjustment to the codebase",
"performance": "Address performance issues",
"enhancement": "Improve existing functionality"
},
"changelog": "CHANGELOG.md"
}
}
}

483
packages/js/admin-layout/composer.lock generated Normal file
View File

@ -0,0 +1,483 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "5ce7bfd856ef579554b96ae2f7451072",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
"version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
"reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
"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.4"
},
"bin": [
"bin/changelogger"
],
"type": "project",
"extra": {
"autotagger": true,
"branch-alias": {
"dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
"::VERSION": "src/Application.php"
},
"changelogger": {
"link-template": "https://github.com/Automattic/jetpack-changelogger/compare/${old}...${new}"
}
},
"autoload": {
"psr-4": {
"Automattic\\Jetpack\\Changelog\\": "lib",
"Automattic\\Jetpack\\Changelogger\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0-or-later"
],
"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.3.0"
},
"time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
"version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/1.1.4"
},
"time": "2021-05-03T11:20:27+00:00"
},
{
"name": "symfony/console",
"version": "3.4.x-dev",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/a10b1da6fc93080c180bba7219b5ff5b7518fe81",
"reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8",
"symfony/debug": "~2.8|~3.0|~4.0",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
"symfony/dependency-injection": "<3.4",
"symfony/process": "<3.3"
},
"provide": {
"psr/log-implementation": "1.0"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "~3.3|~4.0",
"symfony/dependency-injection": "~3.4|~4.0",
"symfony/event-dispatcher": "~2.8|~3.0|~4.0",
"symfony/lock": "~3.4|~4.0",
"symfony/process": "~3.3|~4.0"
},
"suggest": {
"psr/log": "For using the console logger",
"symfony/event-dispatcher": "",
"symfony/lock": "",
"symfony/process": ""
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Console\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/console/tree/3.4"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-10-24T10:57:07+00:00"
},
{
"name": "symfony/debug",
"version": "4.4.x-dev",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
"reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"psr/log": "^1|^2|^3"
},
"conflict": {
"symfony/http-kernel": "<3.4"
},
"require-dev": {
"symfony/http-kernel": "^3.4|^4.0|^5.0"
},
"default-branch": true,
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Debug\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"abandoned": "symfony/error-handler",
"time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "dev-main",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "f9c7affe77a00ae32ca127ca6833d034e6d33f25"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f9c7affe77a00ae32ca127ca6833d034e6d33f25",
"reference": "f9c7affe77a00ae32ca127ca6833d034e6d33f25",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-mbstring": "*"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/main"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-01-30T17:25:47+00:00"
},
{
"name": "symfony/process",
"version": "3.4.x-dev",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "b8648cf1d5af12a44a51d07ef9bf980921f15fca"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/b8648cf1d5af12a44a51d07ef9bf980921f15fca",
"reference": "b8648cf1d5af12a44a51d07ef9bf980921f15fca",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Process\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/process/tree/3.4"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-10-24T10:57:07+00:00"
},
{
"name": "wikimedia/at-ease",
"version": "v2.0.0",
"source": {
"type": "git",
"url": "https://github.com/wikimedia/at-ease.git",
"reference": "013ac61929797839c80a111a3f1a4710d8248e7a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/wikimedia/at-ease/zipball/013ac61929797839c80a111a3f1a4710d8248e7a",
"reference": "013ac61929797839c80a111a3f1a4710d8248e7a",
"shasum": ""
},
"require": {
"php": ">=5.6.99"
},
"require-dev": {
"jakub-onderka/php-console-highlighter": "0.3.2",
"jakub-onderka/php-parallel-lint": "1.0.0",
"mediawiki/mediawiki-codesniffer": "22.0.0",
"mediawiki/minus-x": "0.3.1",
"ockcyp/covers-validator": "0.5.1 || 0.6.1",
"phpunit/phpunit": "4.8.36 || ^6.5"
},
"type": "library",
"autoload": {
"files": [
"src/Wikimedia/Functions.php"
],
"psr-4": {
"Wikimedia\\AtEase\\": "src/Wikimedia/AtEase/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "Tim Starling",
"email": "tstarling@wikimedia.org"
},
{
"name": "MediaWiki developers",
"email": "wikitech-l@lists.wikimedia.org"
}
],
"description": "Safe replacement to @ for suppressing warnings.",
"homepage": "https://www.mediawiki.org/wiki/at-ease",
"support": {
"source": "https://github.com/wikimedia/at-ease/tree/master"
},
"time": "2018-10-10T15:39:06+00:00"
}
],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"platform-overrides": {
"php": "7.2"
},
"plugin-api-version": "2.3.0"
}

View File

@ -0,0 +1,72 @@
{
"name": "@woocommerce/admin-layout",
"version": "1.0.0-beta.0",
"description": "WooCommerce admin layout copmonents and utilities.",
"author": "Automattic",
"license": "GPL-2.0-or-later",
"keywords": [
"wordpress",
"woocommerce"
],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/admin-layout/README.md",
"repository": {
"type": "git",
"url": "https://github.com/woocommerce/woocommerce.git"
},
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"main": "build/index.js",
"module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index",
"sideEffects": [
"build-style/**",
"src/**/*.scss"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"turbo:build": "pnpm run build:js && pnpm run build:css",
"prepare": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"lint": "eslint src",
"build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
"build:css": "webpack",
"start": "concurrently \"tsc --build --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint:fix": "eslint src --fix"
},
"devDependencies": {
"@types/react": "^17.0.2",
"@types/wordpress__components": "^19.10.3",
"@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-style-build": "workspace:*",
"@wordpress/browserslist-config": "wp-6.0",
"css-loader": "^3.6.0",
"eslint": "^8.32.0",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"postcss-loader": "^4.3.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"sass-loader": "^10.2.1",
"ts-jest": "^27.1.3",
"typescript": "^4.8.3",
"webpack": "^5.70.0",
"webpack-cli": "^3.3.12"
},
"peerDependencies": {
"@types/react": "^17.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"dependencies": {
"@woocommerce/components": "workspace:*",
"@wordpress/components": "wp-6.0",
"@wordpress/element": "wp-6.0"
}
}

View File

@ -0,0 +1 @@
export * from './plugins';

View File

@ -0,0 +1,10 @@
export { WC_FOOTER_SLOT_NAME, WooFooterItem } from './woo-footer-item';
export { WC_HEADER_SLOT_NAME, WooHeaderItem } from './woo-header-item';
export {
WC_HEADER_NAVIGATION_SLOT_NAME,
WooHeaderNavigationItem,
} from './woo-header-navigation-item';
export {
WC_HEADER_PAGE_TITLE_SLOT_NAME,
WooHeaderPageTitle,
} from './woo-header-page-title';

View File

@ -1,14 +1,16 @@
/** /**
* External dependencies * External dependencies
*/ */
import React from 'react';
import { Slot, Fill } from '@wordpress/components'; import { Slot, Fill } from '@wordpress/components';
import { createElement } from '@wordpress/element';
/** import {
* Internal dependencies createOrderedChildren,
*/ sortFillsByOrder,
import { createOrderedChildren, sortFillsByOrder } from '~/utils'; } from '@woocommerce/components';
export const WC_FOOTER_SLOT_NAME = 'woocommerce_footer_item'; export const WC_FOOTER_SLOT_NAME = 'woocommerce_footer_item';
/** /**
* Create a Fill for extensions to add items to the WooCommerce Admin footer. * Create a Fill for extensions to add items to the WooCommerce Admin footer.
* *
@ -27,7 +29,10 @@ export const WC_FOOTER_SLOT_NAME = 'woocommerce_footer_item';
* @param {Array} param0.children - Node children. * @param {Array} param0.children - Node children.
* @param {Array} param0.order - Node order. * @param {Array} param0.order - Node order.
*/ */
export const WooFooterItem: React.FC< { order?: number } > & { export const WooFooterItem: React.FC< {
children?: React.ReactNode;
order?: number;
} > & {
Slot: React.FC< Slot.Props >; Slot: React.FC< Slot.Props >;
} = ( { children, order = 1 } ) => { } = ( { children, order = 1 } ) => {
return ( return (

View File

@ -0,0 +1,51 @@
/**
* External dependencies
*/
import React from 'react';
import { Slot, Fill } from '@wordpress/components';
import { createElement } from '@wordpress/element';
import {
createOrderedChildren,
sortFillsByOrder,
} from '@woocommerce/components';
export const WC_HEADER_SLOT_NAME = 'woocommerce_header_item';
/**
* Create a Fill for extensions to add items to the WooCommerce Admin header.
*
* @slotFill WooHeaderItem
* @scope woocommerce-admin
* @example
* const MyHeaderItem = () => (
* <WooHeaderItem>My header item</WooHeaderItem>
* );
*
* registerPlugin( 'my-extension', {
* render: MyHeaderItem,
* scope: 'woocommerce-admin',
* } );
* @param {Object} param0
* @param {Array} param0.children - Node children.
* @param {Array} param0.order - Node order.
*/
export const WooHeaderItem: React.FC< {
children?: React.ReactNode;
order?: number;
} > & {
Slot: React.FC< Slot.Props >;
} = ( { children, order = 1 } ) => {
return (
<Fill name={ WC_HEADER_SLOT_NAME }>
{ ( fillProps: Fill.Props ) => {
return createOrderedChildren( children, order, fillProps );
} }
</Fill>
);
};
WooHeaderItem.Slot = ( { fillProps } ) => (
<Slot name={ WC_HEADER_SLOT_NAME } fillProps={ fillProps }>
{ sortFillsByOrder }
</Slot>
);

View File

@ -0,0 +1,53 @@
/**
* External dependencies
*/
import React from 'react';
import { Slot, Fill } from '@wordpress/components';
import { createElement } from '@wordpress/element';
import {
createOrderedChildren,
sortFillsByOrder,
} from '@woocommerce/components';
export const WC_HEADER_NAVIGATION_SLOT_NAME =
'woocommerce_header_navigation_item';
/**
* Create a Fill for extensions to add items to the WooCommerce Admin
* navigation area left of the page title.
*
* @slotFill WooHeaderNavigationItem
* @scope woocommerce-admin
* @example
* const MyNavigationItem = () => (
* <WooHeaderNavigationItem>My nav item</WooHeaderNavigationItem>
* );
*
* registerPlugin( 'my-extension', {
* render: MyNavigationItem,
* scope: 'woocommerce-admin',
* } );
* @param {Object} param0
* @param {Array} param0.children - Node children.
* @param {Array} param0.order - Node order.
*/
export const WooHeaderNavigationItem: React.FC< {
children?: React.ReactNode;
order?: number;
} > & {
Slot: React.FC< Slot.Props >;
} = ( { children, order = 1 } ) => {
return (
<Fill name={ WC_HEADER_NAVIGATION_SLOT_NAME }>
{ ( fillProps: Fill.Props ) => {
return createOrderedChildren( children, order, fillProps );
} }
</Fill>
);
};
WooHeaderNavigationItem.Slot = ( { fillProps }: Slot.Props ) => (
<Slot name={ WC_HEADER_NAVIGATION_SLOT_NAME } fillProps={ fillProps }>
{ sortFillsByOrder }
</Slot>
);

View File

@ -0,0 +1,41 @@
/**
* External dependencies
*/
import React from 'react';
import { Slot, Fill } from '@wordpress/components';
import { createElement, Fragment } from '@wordpress/element';
export const WC_HEADER_PAGE_TITLE_SLOT_NAME = 'woocommerce_header_page_title';
/**
* Create a Fill for extensions to add custom page titles.
*
* @slotFill WooHeaderPageTitle
* @scope woocommerce-admin
* @example
* const MyPageTitle = () => (
* <WooHeaderPageTitle>My page title</WooHeaderPageTitle>
* );
*
* registerPlugin( 'my-page-title', {
* render: MyPageTitle,
* scope: 'woocommerce-admin',
* } );
* @param {Object} param0
* @param {Array} param0.children - Node children.
*/
export const WooHeaderPageTitle: React.FC< {
children?: React.ReactNode;
} > & {
Slot: React.FC< Slot.Props >;
} = ( { children } ) => {
return <Fill name={ WC_HEADER_PAGE_TITLE_SLOT_NAME }>{ children }</Fill>;
};
WooHeaderPageTitle.Slot = ( { fillProps } ) => (
<Slot name={ WC_HEADER_PAGE_TITLE_SLOT_NAME } fillProps={ fillProps }>
{ ( fills ) => {
return <>{ [ ...fills ].pop() }</>;
} }
</Slot>
);

View File

View File

@ -0,0 +1,6 @@
{
"extends": "../tsconfig-cjs",
"compilerOptions": {
"outDir": "build"
}
}

View File

@ -0,0 +1,10 @@
{
"extends": "../tsconfig",
"compilerOptions": {
"rootDir": "src",
"outDir": "build-module",
"declaration": true,
"declarationMap": true,
"declarationDir": "./build-types"
}
}

View File

@ -0,0 +1,18 @@
/**
* Internal dependencies
*/
const { webpackConfig } = require( '@woocommerce/internal-style-build' );
module.exports = {
mode: process.env.NODE_ENV || 'development',
entry: {
'build-style': __dirname + '/src/style.scss',
},
output: {
path: __dirname,
},
module: {
rules: webpackConfig.rules,
},
plugins: webpackConfig.plugins,
};

View File

@ -0,0 +1,4 @@
Significance: minor
Type: dev
Syncpack update of @typescript/eslint dependencies.

View File

@ -51,8 +51,8 @@
"@types/create-hmac": "1.1.0", "@types/create-hmac": "1.1.0",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/node": "13.13.5", "@types/node": "13.13.5",
"@typescript-eslint/eslint-plugin": "^5.43.0", "@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.43.0", "@typescript-eslint/parser": "^5.54.0",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"axios-mock-adapter": "^1.20.0", "axios-mock-adapter": "^1.20.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",

View File

@ -0,0 +1,4 @@
Significance: minor
Type: add
Fix dependency versions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: dev
Sync @wordpress package versions via syncpack.

View File

@ -37,33 +37,34 @@
"@types/wordpress__block-library": "^2.6.1", "@types/wordpress__block-library": "^2.6.1",
"@types/wordpress__blocks": "^11.0.7", "@types/wordpress__blocks": "^11.0.7",
"@types/wordpress__rich-text": "^3.4.6", "@types/wordpress__rich-text": "^3.4.6",
"@types/wordpress__components": "^19.10.3",
"@woocommerce/csv-export": "workspace:*", "@woocommerce/csv-export": "workspace:*",
"@woocommerce/currency": "workspace:*", "@woocommerce/currency": "workspace:*",
"@woocommerce/data": "workspace:*", "@woocommerce/data": "workspace:*",
"@woocommerce/date": "workspace:*", "@woocommerce/date": "workspace:*",
"@woocommerce/navigation": "workspace:*", "@woocommerce/navigation": "workspace:*",
"@wordpress/a11y": "3.5.0", "@wordpress/a11y": "wp-6.0",
"@wordpress/api-fetch": "^6.0.1", "@wordpress/api-fetch": "wp-6.0",
"@wordpress/base-styles": "^4.3.0", "@wordpress/base-styles": "wp-6.0",
"@wordpress/block-editor": "^9.8.0", "@wordpress/block-editor": "^9.8.0",
"@wordpress/block-library": "^7.16.0", "@wordpress/block-library": "^7.16.0",
"@wordpress/blocks": "^11.18.0", "@wordpress/blocks": "^11.18.0",
"@wordpress/components": "19.8.5", "@wordpress/components": "wp-6.0",
"@wordpress/compose": "5.4.1", "@wordpress/compose": "wp-6.0",
"@wordpress/core-data": "^4.2.1", "@wordpress/core-data": "wp-6.0",
"@wordpress/date": "^4.3.1", "@wordpress/date": "wp-6.0",
"@wordpress/deprecated": "^3.3.1", "@wordpress/deprecated": "wp-6.0",
"@wordpress/dom": "^3.3.2", "@wordpress/dom": "wp-6.0",
"@wordpress/element": "^4.1.1", "@wordpress/element": "wp-6.0",
"@wordpress/hooks": "^3.5.0", "@wordpress/hooks": "wp-6.0",
"@wordpress/html-entities": "^3.3.1", "@wordpress/html-entities": "wp-6.0",
"@wordpress/i18n": "^4.3.1", "@wordpress/i18n": "wp-6.0",
"@wordpress/icons": "^8.1.0", "@wordpress/icons": "wp-6.0",
"@wordpress/keyboard-shortcuts": "^3.17.0", "@wordpress/keyboard-shortcuts": "wp-6.0",
"@wordpress/keycodes": "^3.3.1", "@wordpress/keycodes": "wp-6.0",
"@wordpress/media-utils": "^4.6.0", "@wordpress/media-utils": "wp-6.0",
"@wordpress/rich-text": "^5.17.0", "@wordpress/rich-text": "wp-6.0",
"@wordpress/url": "^3.4.1", "@wordpress/url": "wp-6.0",
"@wordpress/viewport": "^4.1.2", "@wordpress/viewport": "^4.1.2",
"classnames": "^2.3.1", "classnames": "^2.3.1",
"core-js": "^3.21.1", "core-js": "^3.21.1",
@ -86,8 +87,10 @@
"react-transition-group": "^4.4.2" "react-transition-group": "^4.4.2"
}, },
"peerDependencies": { "peerDependencies": {
"@wordpress/data": "^6.2.1", "@wordpress/data": "wp-6.0",
"lodash": "^4.17.0", "lodash": "^4.17.0",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2"
}, },
@ -117,23 +120,23 @@
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/lodash": "^4.14.184", "@types/lodash": "^4.14.184",
"@types/prop-types": "^15.7.4", "@types/prop-types": "^15.7.4",
"@types/react": "^17.0.2",
"@types/testing-library__jest-dom": "^5.14.3", "@types/testing-library__jest-dom": "^5.14.3",
"@types/uuid": "^8.3.0", "@types/uuid": "^8.3.0",
"@types/wordpress__components": "^19.10.1", "@types/wordpress__components": "^19.10.3",
"@types/wordpress__data": "^6.0.0", "@types/wordpress__data": "^6.0.0",
"@types/wordpress__media-utils": "^3.0.0", "@types/wordpress__media-utils": "^3.0.0",
"@types/wordpress__viewport": "^2.5.4", "@types/wordpress__viewport": "^2.5.4",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-style-build": "workspace:*", "@woocommerce/internal-style-build": "workspace:*",
"@wordpress/browserslist-config": "^4.1.1", "@wordpress/browserslist-config": "wp-6.0",
"@wordpress/scripts": "^12.6.1", "@wordpress/scripts": "^12.6.1",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "^27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "^27.5.1",
"postcss-loader": "^3.0.0", "postcss": "^8.4.7",
"postcss-loader": "^4.3.0",
"react": "^17.0.2", "react": "^17.0.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"sass-loader": "^10.2.1", "sass-loader": "^10.2.1",
@ -168,6 +171,8 @@
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2"
} }

View File

@ -131,7 +131,8 @@ export const DateTimePickerControl: React.FC< DateTimePickerControlProps > = ( {
const formatDateTimeForDisplay = useCallback( const formatDateTimeForDisplay = useCallback(
( dateTime: Moment ) => { ( dateTime: Moment ) => {
return dateTime.isValid() return dateTime.isValid()
? formatDate( displayFormat, dateTime.local() ) ? // @ts-expect-error TODO - fix this type error with moment
formatDate( displayFormat, dateTime.local() )
: dateTime.creationData().input?.toString() || ''; : dateTime.creationData().input?.toString() || '';
}, },
[ displayFormat ] [ displayFormat ]

View File

@ -103,6 +103,7 @@ describe( 'DateTimePickerControl', () => {
const input = container.querySelector( 'input' ); const input = container.querySelector( 'input' );
expect( input?.value ).toBe( expect( input?.value ).toBe(
// @ts-expect-error TODO - fix this type error with moment
formatDate( default24HourDateTimeFormat, dateTime ) formatDate( default24HourDateTimeFormat, dateTime )
); );
} ); } );
@ -122,6 +123,7 @@ describe( 'DateTimePickerControl', () => {
expect( input?.value ).toBe( expect( input?.value ).toBe(
formatDate( formatDate(
default24HourDateTimeFormat, default24HourDateTimeFormat,
// @ts-expect-error TODO - fix this type error with moment
moment.utc( ambiguousISODateTimeString ).local() moment.utc( ambiguousISODateTimeString ).local()
) )
); );
@ -142,6 +144,7 @@ describe( 'DateTimePickerControl', () => {
expect( input?.value ).toBe( expect( input?.value ).toBe(
formatDate( formatDate(
default24HourDateTimeFormat, default24HourDateTimeFormat,
// @ts-expect-error TODO - fix this type error with moment
moment.utc( unambiguousISODateTimeString ).local() moment.utc( unambiguousISODateTimeString ).local()
) )
); );
@ -159,6 +162,7 @@ describe( 'DateTimePickerControl', () => {
const input = container.querySelector( 'input' ); const input = container.querySelector( 'input' );
expect( input?.value ).toBe( expect( input?.value ).toBe(
// @ts-expect-error TODO - fix this type error with moment
formatDate( default12HourDateTimeFormat, dateTime ) formatDate( default12HourDateTimeFormat, dateTime )
); );
} ); } );
@ -175,6 +179,7 @@ describe( 'DateTimePickerControl', () => {
); );
const input = container.querySelector( 'input' ); const input = container.querySelector( 'input' );
// @ts-expect-error TODO - fix this type error with moment
expect( input?.value ).toBe( formatDate( dateTimeFormat, dateTime ) ); expect( input?.value ).toBe( formatDate( dateTimeFormat, dateTime ) );
} ); } );
@ -198,6 +203,7 @@ describe( 'DateTimePickerControl', () => {
const input = container.querySelector( 'input' ); const input = container.querySelector( 'input' );
expect( input?.value ).toBe( expect( input?.value ).toBe(
// @ts-expect-error TODO - fix this type error with moment
formatDate( default24HourDateTimeFormat, updatedDateTime ) formatDate( default24HourDateTimeFormat, updatedDateTime )
); );
} ); } );

View File

@ -0,0 +1,4 @@
Significance: minor
Type: dev
Sync @wordpress package versions via syncpack.

View File

@ -27,11 +27,11 @@
"react-native": "src/index", "react-native": "src/index",
"dependencies": { "dependencies": {
"@woocommerce/number": "workspace:*", "@woocommerce/number": "workspace:*",
"@wordpress/deprecated": "^2.12.3", "@wordpress/deprecated": "wp-6.0",
"@wordpress/element": "^4.1.1", "@wordpress/element": "wp-6.0",
"@wordpress/hooks": "^3.5.0", "@wordpress/hooks": "wp-6.0",
"@wordpress/html-entities": "^3.3.1", "@wordpress/html-entities": "wp-6.0",
"@wordpress/i18n": "^3.20.0" "@wordpress/i18n": "wp-6.0"
}, },
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"

View File

@ -0,0 +1,4 @@
Significance: minor
Type: dev
Sync @wordpress package versions via syncpack.

View File

@ -0,0 +1,4 @@
Significance: minor
Type: dev
Add CES data store to @woocommerce/customer-effort-score

View File

@ -0,0 +1,4 @@
Significance: minor
Type: dev
Add additional components to package.

View File

@ -26,12 +26,12 @@
"react-native": "src/index", "react-native": "src/index",
"dependencies": { "dependencies": {
"@woocommerce/experimental": "workspace:*", "@woocommerce/experimental": "workspace:*",
"@wordpress/components": "^19.5.0", "@wordpress/components": "wp-6.0",
"@wordpress/compose": "^5.1.2", "@wordpress/compose": "wp-6.0",
"@wordpress/data": "^6.15.0", "@wordpress/data": "wp-6.0",
"@wordpress/element": "^4.1.1", "@wordpress/element": "wp-6.0",
"@wordpress/i18n": "^4.3.1", "@wordpress/i18n": "wp-6.0",
"@wordpress/notices": "^3.3.2", "@wordpress/notices": "wp-6.0",
"classnames": "^2.3.1", "classnames": "^2.3.1",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"react-transition-group": "^4.4.2" "react-transition-group": "^4.4.2"
@ -45,17 +45,20 @@
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/prop-types": "^15.7.4", "@types/prop-types": "^15.7.4",
"@types/testing-library__jest-dom": "^5.14.3", "@types/testing-library__jest-dom": "^5.14.3",
"@types/wordpress__components": "^19.10.1", "@types/wordpress__components": "^19.10.3",
"@types/wordpress__data": "^6.0.0", "@types/wordpress__data": "^6.0.0",
"@woocommerce/data": "workspace:*",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-style-build": "workspace:*", "@woocommerce/internal-style-build": "workspace:*",
"@wordpress/browserslist-config": "^4.1.1", "@woocommerce/navigation": "workspace:*",
"@wordpress/browserslist-config": "wp-6.0",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "^27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "^27.5.1",
"postcss-loader": "^3.0.0", "postcss": "^8.4.7",
"postcss-loader": "^4.3.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"sass-loader": "^10.2.1", "sass-loader": "^10.2.1",
"ts-jest": "^27.1.3", "ts-jest": "^27.1.3",

View File

@ -9,7 +9,7 @@ import { useDispatch } from '@wordpress/data';
/** /**
* Internal dependencies * Internal dependencies
*/ */
import { CustomerFeedbackModal } from './customer-feedback-modal'; import { CustomerFeedbackModal } from '../customer-feedback-modal';
const noop = () => {}; const noop = () => {};

View File

@ -8,7 +8,7 @@ import { useDispatch } from '@wordpress/data';
/** /**
* Internal dependencies * Internal dependencies
*/ */
import { CustomerEffortScore } from '../customer-effort-score'; import { CustomerEffortScore } from '..';
const noop = () => {}; const noop = () => {};

View File

@ -0,0 +1 @@
export const ALLOW_TRACKING_OPTION_NAME = 'woocommerce_allow_tracking';

View File

@ -10,7 +10,7 @@ import {
addCustomerEffortScoreExitPageListener, addCustomerEffortScoreExitPageListener,
addExitPage, addExitPage,
removeCustomerEffortScoreExitPageListener, removeCustomerEffortScoreExitPageListener,
} from './customer-effort-score-exit-page'; } from '../../utils/customer-effort-score-exit-page';
export const useCustomerEffortScoreExitPageTracker = ( export const useCustomerEffortScoreExitPageTracker = (
pageId: string, pageId: string,

View File

@ -1,5 +1,9 @@
export * from './customer-effort-score'; export * from './components/customer-effort-score';
export * from './customer-feedback-simple'; export * from './components/customer-feedback-simple';
export * from './customer-feedback-modal'; export * from './components/customer-feedback-modal';
export * from './product-mvp-feedback-modal'; export * from './components/product-mvp-feedback-modal';
export * from './feedback-modal'; export * from './components/feedback-modal';
export * from './hooks/use-customer-effort-score-exit-page-tracker';
export * from './store';
export * from './utils/customer-effort-score-exit-page';
export * from './constants';

View File

@ -11,7 +11,9 @@ import * as actions from './actions';
import * as resolvers from './resolvers'; import * as resolvers from './resolvers';
import * as selectors from './selectors'; import * as selectors from './selectors';
import reducer from './reducer'; import reducer from './reducer';
import { STORE_KEY } from './constants'; import { QUEUE_OPTION_NAME, STORE_KEY } from './constants';
export { QUEUE_OPTION_NAME, STORE_KEY };
export default registerStore( STORE_KEY, { export default registerStore( STORE_KEY, {
actions, actions,

View File

@ -1,6 +1,6 @@
@import 'customer-feedback-simple/customer-feedback-simple.scss'; @import 'components/customer-feedback-simple/customer-feedback-simple.scss';
@import 'product-mvp-feedback-modal/product-mvp-feedback-modal.scss'; @import 'components/product-mvp-feedback-modal/product-mvp-feedback-modal.scss';
@import 'feedback-modal/feedback-modal.scss'; @import 'components/feedback-modal/feedback-modal.scss';
.woocommerce-customer-effort-score__selection { .woocommerce-customer-effort-score__selection {
margin: 1em 0 1.5em 0; margin: 1em 0 1.5em 0;

View File

@ -9,7 +9,13 @@ import { getQuery } from '@woocommerce/navigation';
/** /**
* Internal dependencies * Internal dependencies
*/ */
import { ALLOW_TRACKING_OPTION_NAME } from './constants'; import { ALLOW_TRACKING_OPTION_NAME } from '../constants';
interface AdminWindow extends Window {
pagenow?: string;
adminpage?: string;
}
declare let window: AdminWindow;
const CUSTOMER_EFFORT_SCORE_EXIT_PAGE_KEY = 'customer-effort-score-exit-page'; const CUSTOMER_EFFORT_SCORE_EXIT_PAGE_KEY = 'customer-effort-score-exit-page';

View File

@ -0,0 +1,4 @@
Significance: minor
Type: dev
Sync @wordpress package versions via syncpack.

View File

@ -28,16 +28,16 @@
"dependencies": { "dependencies": {
"@woocommerce/date": "workspace:*", "@woocommerce/date": "workspace:*",
"@woocommerce/navigation": "workspace:*", "@woocommerce/navigation": "workspace:*",
"@wordpress/api-fetch": "^6.0.1", "@wordpress/api-fetch": "wp-6.0",
"@wordpress/compose": "^5.1.2", "@wordpress/compose": "wp-6.0",
"@wordpress/core-data": "^4.1.2", "@wordpress/core-data": "wp-6.0",
"@wordpress/data": "^6.15.0", "@wordpress/data": "wp-6.0",
"@wordpress/data-controls": "^2.3.2", "@wordpress/data-controls": "wp-6.0",
"@wordpress/deprecated": "^3.3.1", "@wordpress/deprecated": "wp-6.0",
"@wordpress/element": "^4.1.1", "@wordpress/element": "wp-6.0",
"@wordpress/hooks": "^3.5.0", "@wordpress/hooks": "wp-6.0",
"@wordpress/i18n": "^4.3.1", "@wordpress/i18n": "wp-6.0",
"@wordpress/url": "^3.4.1", "@wordpress/url": "wp-6.0",
"dompurify": "^2.3.6", "dompurify": "^2.3.6",
"md5": "^2.3.0", "md5": "^2.3.0",
"qs": "^6.10.3", "qs": "^6.10.3",
@ -72,7 +72,7 @@
"typescript": "^4.8.3" "typescript": "^4.8.3"
}, },
"peerDependencies": { "peerDependencies": {
"@wordpress/core-data": "^4.1.0", "@wordpress/core-data": "wp-6.0",
"moment": "^2.18.1", "moment": "^2.18.1",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2"

View File

@ -0,0 +1,4 @@
Significance: minor
Type: dev
Sync @wordpress package versions via syncpack.

View File

@ -27,8 +27,8 @@
"react-native": "src/index", "react-native": "src/index",
"dependencies": { "dependencies": {
"@types/d3-time-format": "^2.3.0", "@types/d3-time-format": "^2.3.0",
"@wordpress/date": "^4.3.1", "@wordpress/date": "wp-6.0",
"@wordpress/i18n": "^4.3.1", "@wordpress/i18n": "wp-6.0",
"moment": "^2.29.1", "moment": "^2.29.1",
"moment-timezone": "^0.5.34", "moment-timezone": "^0.5.34",
"qs": "^6.10.3" "qs": "^6.10.3"

View File

@ -1,5 +1,6 @@
module.exports = [ module.exports = [
// wc-admin packages // wc-admin packages
'@woocommerce/admin-layout',
'@woocommerce/components', '@woocommerce/components',
'@woocommerce/csv-export', '@woocommerce/csv-export',
'@woocommerce/currency', '@woocommerce/currency',

View File

@ -0,0 +1,4 @@
Significance: minor
Type: add
Add @woocommerce/admin-layout package.

View File

@ -0,0 +1,4 @@
Significance: minor
Type: dev
Sync @wordpress package versions via syncpack.

View File

@ -24,7 +24,7 @@
], ],
"dependencies": { "dependencies": {
"@jest/globals": "^27.5.1", "@jest/globals": "^27.5.1",
"@wordpress/deprecated": "^3.2.3", "@wordpress/deprecated": "wp-6.0",
"config": "3.3.7" "config": "3.3.7"
}, },
"devDependencies": { "devDependencies": {
@ -40,7 +40,7 @@
"@woocommerce/internal-e2e-builds": "workspace:*", "@woocommerce/internal-e2e-builds": "workspace:*",
"@wordpress/babel-plugin-import-jsx-pragma": "1.1.3", "@wordpress/babel-plugin-import-jsx-pragma": "1.1.3",
"@wordpress/babel-preset-default": "3.0.2", "@wordpress/babel-preset-default": "3.0.2",
"@wordpress/browserslist-config": "^4.1.0", "@wordpress/browserslist-config": "wp-6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"eslint-plugin-jest": "23.20.0" "eslint-plugin-jest": "23.20.0"
}, },

View File

@ -57,7 +57,7 @@
"@woocommerce/internal-e2e-builds": "workspace:*", "@woocommerce/internal-e2e-builds": "workspace:*",
"@wordpress/babel-plugin-import-jsx-pragma": "1.1.3", "@wordpress/babel-plugin-import-jsx-pragma": "1.1.3",
"@wordpress/babel-preset-default": "3.0.2", "@wordpress/babel-preset-default": "3.0.2",
"@wordpress/browserslist-config": "^4.1.0", "@wordpress/browserslist-config": "wp-6.0",
"ndb": "^1.1.5", "ndb": "^1.1.5",
"semver": "^7.3.2" "semver": "^7.3.2"
}, },

View File

@ -16,8 +16,8 @@
"module": "build-module/index.js", "module": "build-module/index.js",
"dependencies": { "dependencies": {
"@automattic/puppeteer-utils": "github:Automattic/puppeteer-utils#0f3ec50", "@automattic/puppeteer-utils": "github:Automattic/puppeteer-utils#0f3ec50",
"@wordpress/deprecated": "^3.2.3", "@wordpress/deprecated": "wp-6.0",
"@wordpress/e2e-test-utils": "wp-5.8", "@wordpress/e2e-test-utils": "wp-6.0",
"config": "3.3.7", "config": "3.3.7",
"fishery": "^1.2.0" "fishery": "^1.2.0"
}, },
@ -30,13 +30,13 @@
"@babel/plugin-transform-runtime": "^7.16.4", "@babel/plugin-transform-runtime": "^7.16.4",
"@babel/polyfill": "7.12.1", "@babel/polyfill": "7.12.1",
"@babel/preset-env": "7.12.7", "@babel/preset-env": "7.12.7",
"@typescript-eslint/eslint-plugin": "^5.43.0", "@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.43.0", "@typescript-eslint/parser": "^5.54.0",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-e2e-builds": "workspace:*", "@woocommerce/internal-e2e-builds": "workspace:*",
"@wordpress/babel-plugin-import-jsx-pragma": "1.1.3", "@wordpress/babel-plugin-import-jsx-pragma": "1.1.3",
"@wordpress/babel-preset-default": "3.0.2", "@wordpress/babel-preset-default": "3.0.2",
"@wordpress/browserslist-config": "^4.1.0", "@wordpress/browserslist-config": "wp-6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"eslint-plugin-jest": "23.20.0" "eslint-plugin-jest": "23.20.0"
}, },

View File

@ -0,0 +1,4 @@
module.exports = {
extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ],
root: true,
};

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