fix merge conflicts

This commit is contained in:
Ron Rennick 2021-11-15 13:03:14 -04:00
commit e13869c442
45 changed files with 6461 additions and 241 deletions

70
.github/workflows/mirrors.yml vendored Normal file
View File

@ -0,0 +1,70 @@
name: Mirrors
on:
push:
branches: ['trunk', 'release/**']
jobs:
build:
name: Build WooCommerce zip
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build
id: build
uses: woocommerce/action-build@trunk
env:
BUILD_ENV: mirrors
- name: Upload PR zip
uses: actions/upload-artifact@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: woocommerce
path: ${{ steps.build.outputs.zip_path }}
retention-days: 7
mirror:
name: Push to Mirror
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Create directories
run: |
mkdir -p tmp/woocommerce-build
mkdir -p monorepo
- name: Checkout monorepo
uses: actions/checkout@v2
with:
path: monorepo
- name: Download WooCommerce ZIP
uses: actions/download-artifact@v2
with:
name: woocommerce
path: tmp/woocommerce-build
- name: Extract and replace WooCommerce zip.
working-directory: tmp/woocommerce-build
run: |
mkdir -p woocommerce/woocommerce-production
unzip woocommerce.zip -d woocommerce/woocommerce-production
mv woocommerce/woocommerce-production/woocommerce/* woocommerce/woocommerce-production
rm -rf woocommerce/woocommerce-production/woocommerce
- name: Set up mirror
working-directory: tmp/woocommerce-build
run: |
touch mirrors.txt
echo "woocommerce/woocommerce-production" >> mirrors.txt
- name: Push to mirror
uses: Automattic/action-push-to-mirrors@v1
with:
source-directory: ${{ github.workspace }}/monorepo
token: ${{ secrets.API_TOKEN_GITHUB }}
username: matticbot
working-directory: ${{ github.workspace }}/tmp/woocommerce-build
timeout-minutes: 5 # 2021-01-18: Successful runs seem to take about half a minute.

View File

@ -11,6 +11,8 @@ jobs:
- name: Build
id: build
uses: woocommerce/action-build@trunk
env:
BUILD_ENV: e2e
- name: Upload PR zip
uses: actions/upload-artifact@v2
@ -41,8 +43,8 @@ jobs:
- name: Install PNPM and install dependencies
working-directory: package/woocommerce
run: |
npm install -g pnpm
pnpm install
npm install -g pnpm
pnpm install
- name: Load docker images and start containers.
working-directory: package/woocommerce/plugins/woocommerce
@ -66,8 +68,8 @@ jobs:
- name: Install dependencies again
working-directory: package/woocommerce
run: |
npm install -g pnpm
pnpm install
npm install -g pnpm
pnpm install
- name: Run tests command.
working-directory: package/woocommerce/plugins/woocommerce
@ -79,5 +81,5 @@ jobs:
USER_KEY: ${{ secrets.PR_E2E_TEST_ADMIN_USER }}
USER_SECRET: ${{ secrets.PR_E2E_TEST_ADMIN_PASSWORD }}
run: |
pnpx wc-e2e test:e2e
pnpx wc-api-tests test api
pnpx wc-e2e test:e2e
pnpx wc-api-tests test api

View File

@ -0,0 +1,7 @@
# Changelog
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
---
[See legacy changelogs for previous versions](https://github.com/woocommerce/woocommerce/blob/<last-commit-hash-before-this-merge>/packages/js/api-core-tests/CHANGELOG.md).

View File

@ -0,0 +1,32 @@
{
"name": "woocommerce/api-core-tests",
"description": "WooCommerce API core test",
"type": "library",
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
"automattic/jetpack-changelogger": "3.0.2"
},
"extra": {
"changelogger": {
"formatter": {
"class": "PackageFormatter"
},
"types": [
"Fix",
"Add",
"Update",
"Dev",
"Tweak",
"Performance",
"Enhancement"
],
"changelog": "NEXT_CHANGELOG.md"
}
},
"autoload": {
"files": [
"../../../tools/changelogger/PackageFormatter.php"
]
}
}

1021
packages/js/api-core-tests/composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
# Changelog
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
---
[See legacy changelogs for previous versions](https://github.com/woocommerce/woocommerce/blob/<last-commit-hash-before-this-merge>/packages/js/api/CHANGELOG.md).

View File

View File

@ -0,0 +1,32 @@
{
"name": "woocommerce/api",
"description": "WooCommerce API",
"type": "library",
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
"automattic/jetpack-changelogger": "3.0.2"
},
"extra": {
"changelogger": {
"formatter": {
"class": "PackageFormatter"
},
"types": [
"Fix",
"Add",
"Update",
"Dev",
"Tweak",
"Performance",
"Enhancement"
],
"changelog": "NEXT_CHANGELOG.md"
}
},
"autoload": {
"files": [
"../../../tools/changelogger/PackageFormatter.php"
]
}
}

1021
packages/js/api/composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
# Changelog
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
---
[See legacy changelogs for previous versions](https://github.com/woocommerce/woocommerce/blob/<last-commit-hash-before-this-merge>/packages/js/e2e-core-tests/CHANGELOG.md).

View File

@ -0,0 +1,32 @@
{
"name": "woocommerce/e2e-core-tests",
"description": "WooCommerce end to end core tests",
"type": "library",
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
"automattic/jetpack-changelogger": "3.0.2"
},
"extra": {
"changelogger": {
"formatter": {
"class": "PackageFormatter"
},
"types": [
"Fix",
"Add",
"Update",
"Dev",
"Tweak",
"Performance",
"Enhancement"
],
"changelog": "NEXT_CHANGELOG.md"
}
},
"autoload": {
"files": [
"../../../tools/changelogger/PackageFormatter.php"
]
}
}

1021
packages/js/e2e-core-tests/composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -9,32 +9,12 @@ const {
uiUnblocked,
evalAndClick,
createOrder,
clickAndWaitForSelector,
} = require( '@woocommerce/e2e-utils' );
const { waitForSelector } = require( '@woocommerce/e2e-environment' );
const config = require( 'config' );
const simpleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99';
/**
* Evaluate and click a button selector then wait for a result selector.
* This is a work around for what appears to be intermittent delays in handling confirm dialogs.
*
* @param buttonSelector
* @param resultSelector
* @returns {Promise<void>}
*/
const clickAndWaitForSelector = async ( buttonSelector, resultSelector ) => {
await evalAndClick( buttonSelector );
await waitForSelector(
page,
resultSelector,
{
timeout: 5000
}
);
};
const runRefundOrderTest = () => {
describe('WooCommerce Orders > Refund an order', () => {
let productId;

View File

@ -4,6 +4,7 @@
- Added quotes around `WORDPRESS_TITLE` value in .env file to address issue with docker compose 2 "key cannot contain a space" error.
- Added `LATEST_WP_VERSION_MINUS` that allows setting a number to subtract from the current WordPress version for the WordPress Docker image.
- Support for PHP_VERSION, MARIADB_VERSION environment variables for built in container initialization
## Fixed

View File

@ -0,0 +1,7 @@
# Changelog
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
---
[See legacy changelogs for previous versions](https://github.com/woocommerce/woocommerce/blob/<last-commit-hash-before-this-merge>/packages/js/e2e-environment/CHANGELOG.md).

View File

@ -17,22 +17,30 @@ if [[ $1 ]]; then
export WORDPRESS_VERSION=$(./bin/get-previous-version.js $WORDPRESS_VERSION $LATEST_WP_VERSION_MINUS 2> /dev/null)
fi
if ! [[ $TRAVIS_PHP_VERSION =~ ^[0-9]+\.[0-9]+ ]]; then
TRAVIS_PHP_VERSION=$(./bin/get-latest-docker-tag.js php 7 2> /dev/null)
fi
if [[ $TRAVIS_PHP_VERSION =~ ^[0-9]+\.[0-9]+ ]]; then
export DC_PHP_VERSION=$TRAVIS_PHP_VERSION
if [[ $PHP_VERSION =~ ^[0-9]+\.[0-9]+ ]]; then
export DC_PHP_VERSION=$PHP_VERSION
else
export DC_PHP_VERSION="7.4.22"
if ! [[ $TRAVIS_PHP_VERSION =~ ^[0-9]+\.[0-9]+ ]]; then
TRAVIS_PHP_VERSION=$(./bin/get-latest-docker-tag.js php 7 2> /dev/null)
fi
if [[ $TRAVIS_PHP_VERSION =~ ^[0-9]+\.[0-9]+ ]]; then
export DC_PHP_VERSION=$TRAVIS_PHP_VERSION
else
export DC_PHP_VERSION="7.4.25"
fi
fi
if ! [[ $TRAVIS_MARIADB_VERSION =~ ^[0-9]+\.[0-9]+ ]]; then
TRAVIS_MARIADB_VERSION=$(./bin/get-latest-docker-tag.js mariadb 10 2> /dev/null)
fi
if [[ $TRAVIS_MARIADB_VERSION =~ ^[0-9]+\.[0-9]+ ]]; then
export DC_MARIADB_VERSION=$TRAVIS_MARIADB_VERSION
if [[ $MARIADB_VERSION =~ ^[0-9]+\.[0-9]+ ]]; then
export DC_MARIADB_VERSION=$MARIADB_VERSION
else
export DC_MARIADB_VERSION="10.6.4"
if ! [[ $TRAVIS_MARIADB_VERSION =~ ^[0-9]+\.[0-9]+ ]]; then
TRAVIS_MARIADB_VERSION=$(./bin/get-latest-docker-tag.js mariadb 10 2> /dev/null)
fi
if [[ $TRAVIS_MARIADB_VERSION =~ ^[0-9]+\.[0-9]+ ]]; then
export DC_MARIADB_VERSION=$TRAVIS_MARIADB_VERSION
else
export DC_MARIADB_VERSION="10.6.5"
fi
fi
if [[ $1 == 'up' ]]; then

View File

@ -126,9 +126,17 @@ The built in container defaults to mapping the root folder of the repository to
Since the introduction of the WooCommerce Monorepo, a `WC_CORE_PATH` environment variable maps to Core WooCommerce at `plugins/woocommerce`. It can also be overriden in a similar fashion.
### Specifying Server Software versions
The built-in container supports these variables for use locally and in CI environments:
- `WP_VERSION` - WordPress (default `latest`)
- `PHP_VERSION` - PHP (default `latest`)
- `MARIADB_VERSION` - MariaDB (default `latest`)
### Travis CI Supported Versions
Travis CI uses environment variables to allow control of some software versions in the testing environment. The built in container supports these variables:
Travis CI uses environment variables to allow control of some software versions in the testing environment. The built-in container supports these variables:
- `WP_VERSION` - WordPress (default `latest`)
- `TRAVIS_PHP_VERSION` - PHP (default `latest`)

View File

@ -0,0 +1,32 @@
{
"name": "woocommerce/e2e-environment",
"description": "WooCommerce end to end testing environment",
"type": "library",
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
"automattic/jetpack-changelogger": "3.0.2"
},
"extra": {
"changelogger": {
"formatter": {
"class": "PackageFormatter"
},
"types": [
"Fix",
"Add",
"Update",
"Dev",
"Tweak",
"Performance",
"Enhancement"
],
"changelog": "NEXT_CHANGELOG.md"
}
},
"autoload": {
"files": [
"../../../tools/changelogger/PackageFormatter.php"
]
}
}

1021
packages/js/e2e-environment/composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -5,11 +5,14 @@
- `utils.waitForTimeout( delay )` pause processing for `delay` milliseconds
- `AdminEdit` class with utility functions for the respective edit screens
- Update `shopper.addToCartFromShopPage()` and `.removeFromCart()` to accept product Id or Title
- Added `deleteAllProductAttributes()`, `deleteAllProductCategories()`, and `deleteAllProductTags()` to clean up meta data added when products are imported
- Added `withRestApi.createProductCategory()` that creates a product category and returns the ID
- `deleteAllProductAttributes()`, `deleteAllProductCategories()`, and `deleteAllProductTags()` to clean up meta data added when products are imported
- `withRestApi.createProductCategory()` that creates a product category and returns the ID
- `withRestApi.deleteCoupon()` that deletes a single coupon
- `withRestApi.addTaxClasses()` that adds an array of tax classes if they do not exist
- `withRestApi.addTaxRates()` that adds an array of tax rates if they do not exist
- `clickAndWaitForSelector( buttonSelector, resultSelector, timeout )` to click a button and wait for response
- Optional parameter `testResponse` to `withRestApi` functions that contain an `expect()`
# 0.1.6

View File

@ -0,0 +1,7 @@
# Changelog
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
---
[See legacy changelogs for previous versions](https://github.com/woocommerce/woocommerce/blob/<last-commit-hash-before-this-merge>/packages/js/e2e-utils/CHANGELOG.md).

View File

@ -233,6 +233,7 @@ There is a general utilities object `utils` with the following functions:
| `deleteAllShippingZones` | | Delete all the existing shipping zones |
| `waitForSelectorWithoutThrow` | `selector`, `timeoutInSeconds` | conditionally wait for a selector without throwing an error. Default timeout is 5 seconds |
| `createOrder` | `orderOptions` | Creates an order using the API with the passed in details |
| `clickAndWaitForSelector` | `buttonSelector`, `resultSelector`, `timeout` | Click a button and wait for response |
### Test Utilities

View File

View File

@ -0,0 +1,32 @@
{
"name": "woocommerce/e2e-utiles",
"description": "WooCommerce end to end testing utilities",
"type": "library",
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
"automattic/jetpack-changelogger": "3.0.2"
},
"extra": {
"changelogger": {
"formatter": {
"class": "PackageFormatter"
},
"types": [
"Fix",
"Add",
"Update",
"Dev",
"Tweak",
"Performance",
"Enhancement"
],
"changelog": "NEXT_CHANGELOG.md"
}
},
"autoload": {
"files": [
"../../../tools/changelogger/PackageFormatter.php"
]
}
}

1021
packages/js/e2e-utils/composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@automattic/puppeteer-utils": "github:Automattic/puppeteer-utils#0f3ec50",
"@wordpress/deprecated": "^2.10.0",
"@wordpress/e2e-test-utils": "^4.16.1",
"config": "3.3.3",

View File

@ -2,6 +2,7 @@
* External dependencies
*/
import { pressKeyWithModifier } from '@wordpress/e2e-test-utils';
import { waitForSelector } from '@automattic/puppeteer-utils';
/**
* Internal dependencies
@ -220,11 +221,11 @@ export const evalAndClick = async ( selector ) => {
* @param {string} selector Selector of the select2 search field
*/
export const selectOptionInSelect2 = async ( value, selector = 'input.select2-search__field' ) => {
await page.waitForSelector(selector);
await page.click(selector);
await page.type(selector, value);
await page.waitForSelector( selector );
await page.click( selector );
await page.type( selector, value );
await waitForTimeout( 2000 ); // to avoid flakyness, must wait before pressing Enter
await page.keyboard.press('Enter');
await page.keyboard.press( 'Enter' );
};
/**
@ -234,12 +235,12 @@ export const selectOptionInSelect2 = async ( value, selector = 'input.select2-se
* @param {string} orderId Order ID
* @param {string} customerName Customer's full name attached to order ID.
*/
export const searchForOrder = async (value, orderId, customerName) => {
await clearAndFillInput('#post-search-input', value);
await expect(page).toMatchElement('#post-search-input', value);
await expect(page).toClick('#search-submit' );
await page.waitForSelector('#the-list', { timeout: 10000 } );
await expect(page).toMatchElement('.order_number > a.order-view', {text: `#${orderId} ${customerName}`});
export const searchForOrder = async ( value, orderId, customerName) => {
await clearAndFillInput( '#post-search-input', value );
await expect( page ).toMatchElement( '#post-search-input', value );
await expect( page ).toClick( '#search-submit' );
await page.waitForSelector( '#the-list', { timeout: 10000 } );
await expect( page ).toMatchElement( '.order_number > a.order-view', { text: `#${orderId} ${customerName}` } );
};
/**
@ -255,16 +256,16 @@ export const applyCoupon = async ( couponCode ) => {
page.reload(),
page.waitForNavigation( { waitUntil: 'networkidle0' } ),
]);
await expect(page).toClick('a', {text: 'Click here to enter your code'});
await expect( page ).toClick( 'a', { text: 'Click here to enter your code' } );
await uiUnblocked();
await clearAndFillInput('#coupon_code', couponCode);
await expect(page).toClick('button', {text: 'Apply coupon'});
await clearAndFillInput( '#coupon_code', couponCode );
await expect( page ).toClick( 'button', {text: 'Apply coupon' } );
await uiUnblocked();
} catch (error) {
await clearAndFillInput('#coupon_code', couponCode);
await expect(page).toClick('button', {text: 'Apply coupon'});
} catch ( error ) {
await clearAndFillInput( '#coupon_code', couponCode );
await expect( page ).toClick( 'button', { text: 'Apply coupon' } );
await uiUnblocked();
};
}
};
/**
@ -278,9 +279,9 @@ export const removeCoupon = async ( couponCode ) => {
page.reload(),
page.waitForNavigation( { waitUntil: 'networkidle0' } ),
]);
await expect(page).toClick('[data-coupon="'+couponCode.toLowerCase()+'"]', {text: '[Remove]'});
await expect( page ).toClick( '[data-coupon="'+couponCode.toLowerCase()+'"]', {text: '[Remove]' } );
await uiUnblocked();
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon has been removed.'});
await expect( page ).toMatchElement( '.woocommerce-message', {text: 'Coupon has been removed.' } );
};
/**
@ -296,3 +297,24 @@ export const selectOrderAction = async ( action ) => {
page.waitForNavigation( { waitUntil: 'networkidle0' } ),
] );
}
/**
* Evaluate and click a button selector then wait for a result selector.
* This is a work around for what appears to be intermittent delays in handling confirm dialogs.
*
* @param {string} buttonSelector Selector of button to click
* @param {string} resultSelector Selector to wait for after click
* @param {number} timeout Timeout length in milliseconds. Default 5000.
* @returns {Promise<void>}
*/
export const clickAndWaitForSelector = async ( buttonSelector, resultSelector, timeout = 5000 ) => {
await evalAndClick( buttonSelector );
await waitForSelector(
page,
resultSelector,
{
timeout
}
);
};

View File

@ -16,6 +16,7 @@ docker-compose.yaml
Dockerfile
Gruntfile.js
none
project.json
package-lock.json
package.json
packages/woocommerce-admin/docs

View File

@ -0,0 +1,5 @@
# Changelog
---
[See changelogs for previous versions](https://github.com/woocommerce/woocommerce/blob/77ccfc56ca5680f3bc1496d8b2f93befa28e1483/changelog.txt).

View File

@ -266,16 +266,16 @@
},
{
"name": "symfony/console",
"version": "v5.3.7",
"version": "v5.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "8b1008344647462ae6ec57559da166c2bfa5e16a"
"reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/8b1008344647462ae6ec57559da166c2bfa5e16a",
"reference": "8b1008344647462ae6ec57559da166c2bfa5e16a",
"url": "https://api.github.com/repos/symfony/console/zipball/d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3",
"reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3",
"shasum": ""
},
"require": {
@ -345,7 +345,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v5.3.7"
"source": "https://github.com/symfony/console/tree/v5.3.10"
},
"funding": [
{
@ -361,7 +361,7 @@
"type": "tidelift"
}
],
"time": "2021-08-25T20:02:16+00:00"
"time": "2021-10-26T09:30:15+00:00"
},
{
"name": "symfony/deprecation-contracts",
@ -1059,16 +1059,16 @@
},
{
"name": "symfony/string",
"version": "v5.3.7",
"version": "v5.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5"
"reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/8d224396e28d30f81969f083a58763b8b9ceb0a5",
"reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5",
"url": "https://api.github.com/repos/symfony/string/zipball/d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c",
"reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c",
"shasum": ""
},
"require": {
@ -1122,7 +1122,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v5.3.7"
"source": "https://github.com/symfony/string/tree/v5.3.10"
},
"funding": [
{
@ -1138,7 +1138,7 @@
"type": "tidelift"
}
],
"time": "2021-08-26T08:00:08+00:00"
"time": "2021-10-27T18:21:46+00:00"
}
],
"aliases": [],
@ -1153,5 +1153,5 @@
"platform-overrides": {
"php": "7.3"
},
"plugin-api-version": "2.1.0"
"plugin-api-version": "2.0.0"
}

View File

@ -411,5 +411,5 @@
"platform-overrides": {
"php": "7.0"
},
"plugin-api-version": "2.1.0"
"plugin-api-version": "2.0.0"
}

View File

@ -1112,16 +1112,16 @@
},
{
"name": "sebastian/exporter",
"version": "3.1.3",
"version": "3.1.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "6b853149eab67d4da22291d36f5b0631c0fd856e"
"reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e",
"reference": "6b853149eab67d4da22291d36f5b0631c0fd856e",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db",
"reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db",
"shasum": ""
},
"require": {
@ -1130,7 +1130,7 @@
},
"require-dev": {
"ext-mbstring": "*",
"phpunit/phpunit": "^6.0"
"phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
@ -1177,7 +1177,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
"source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3"
"source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4"
},
"funding": [
{
@ -1185,7 +1185,7 @@
"type": "github"
}
],
"time": "2020-11-30T07:47:53+00:00"
"time": "2021-11-11T13:51:24+00:00"
},
{
"name": "sebastian/global-state",
@ -1697,5 +1697,5 @@
"platform-overrides": {
"php": "7.0"
},
"plugin-api-version": "2.1.0"
"plugin-api-version": "2.0.0"
}

View File

@ -9,16 +9,16 @@
"packages-dev": [
{
"name": "gettext/gettext",
"version": "v4.8.5",
"version": "v4.8.6",
"source": {
"type": "git",
"url": "https://github.com/php-gettext/Gettext.git",
"reference": "ef2e312dff383fc0e4cd62dd39042e1157f137d4"
"reference": "bbeb8f4d3077663739aecb4551b22e720c0e9efe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-gettext/Gettext/zipball/ef2e312dff383fc0e4cd62dd39042e1157f137d4",
"reference": "ef2e312dff383fc0e4cd62dd39042e1157f137d4",
"url": "https://api.github.com/repos/php-gettext/Gettext/zipball/bbeb8f4d3077663739aecb4551b22e720c0e9efe",
"reference": "bbeb8f4d3077663739aecb4551b22e720c0e9efe",
"shasum": ""
},
"require": {
@ -70,7 +70,7 @@
"support": {
"email": "oom@oscarotero.com",
"issues": "https://github.com/oscarotero/Gettext/issues",
"source": "https://github.com/php-gettext/Gettext/tree/v4.8.5"
"source": "https://github.com/php-gettext/Gettext/tree/v4.8.6"
},
"funding": [
{
@ -86,20 +86,20 @@
"type": "patreon"
}
],
"time": "2021-07-13T16:45:53+00:00"
"time": "2021-10-19T10:44:53+00:00"
},
{
"name": "gettext/languages",
"version": "2.8.1",
"version": "2.9.0",
"source": {
"type": "git",
"url": "https://github.com/php-gettext/Languages.git",
"reference": "4ad818b6341e177b7c508ec4c37e18932a7b788a"
"reference": "ed56dd2c7f4024cc953ed180d25f02f2640e3ffa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-gettext/Languages/zipball/4ad818b6341e177b7c508ec4c37e18932a7b788a",
"reference": "4ad818b6341e177b7c508ec4c37e18932a7b788a",
"url": "https://api.github.com/repos/php-gettext/Languages/zipball/ed56dd2c7f4024cc953ed180d25f02f2640e3ffa",
"reference": "ed56dd2c7f4024cc953ed180d25f02f2640e3ffa",
"shasum": ""
},
"require": {
@ -148,7 +148,7 @@
],
"support": {
"issues": "https://github.com/php-gettext/Languages/issues",
"source": "https://github.com/php-gettext/Languages/tree/2.8.1"
"source": "https://github.com/php-gettext/Languages/tree/2.9.0"
},
"funding": [
{
@ -160,7 +160,7 @@
"type": "github"
}
],
"time": "2021-07-14T15:03:58+00:00"
"time": "2021-11-11T17:30:39+00:00"
},
{
"name": "mck89/peast",
@ -624,5 +624,5 @@
"platform-overrides": {
"php": "7.0"
},
"plugin-api-version": "2.1.0"
"plugin-api-version": "2.0.0"
}

View File

View File

@ -1,121 +1,141 @@
{
"name": "woocommerce/woocommerce",
"description": "An eCommerce toolkit that helps you sell anything. Beautifully.",
"homepage": "https://woocommerce.com/",
"type": "wordpress-plugin",
"license": "GPL-3.0-or-later",
"prefer-stable": true,
"minimum-stability": "dev",
"repositories": [
{
"type": "path",
"url": "lib"
}
],
"require": {
"php": ">=7.0",
"automattic/jetpack-autoloader": "2.10.1",
"automattic/jetpack-constants": "1.5.1",
"composer/installers": "~1.7",
"maxmind-db/reader": "1.6.0",
"pelago/emogrifier": "3.1.0",
"psr/container": "1.0.0",
"woocommerce/action-scheduler": "3.3.0",
"woocommerce/woocommerce-admin": "2.8.0",
"woocommerce/woocommerce-blocks": "6.1.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4",
"yoast/phpunit-polyfills": "^1.0"
},
"config": {
"optimize-autoloader": true,
"platform": {
"php": "7.0"
},
"preferred-install": {
"woocommerce/action-scheduler": "dist",
"woocommerce/woocommerce-rest-api": "dist",
"woocommerce/woocommerce-blocks": "dist"
},
"sort-packages": true
},
"autoload": {
"exclude-from-classmap": [
"includes/legacy",
"includes/libraries"
],
"classmap": [
"includes/rest-api"
],
"psr-4": {
"Automattic\\WooCommerce\\": "src/",
"Automattic\\WooCommerce\\Vendor\\": "lib/packages/"
},
"psr-0": {
"Automattic\\WooCommerce\\Vendor\\": "lib/packages/"
}
},
"autoload-dev": {
"psr-4": {
"Automattic\\WooCommerce\\Tests\\": "tests/php/src/",
"Automattic\\WooCommerce\\Testing\\Tools\\": "tests/Tools/"
},
"classmap": [
"tests/legacy/unit-tests/rest-api/Helpers"
]
},
"scripts": {
"post-install-cmd": [
"@composer bin all install --ansi",
"sh ./bin/package-update.sh"
],
"post-update-cmd": [
"@composer bin all update --ansi",
"sh ./bin/package-update.sh"
],
"test": [
"phpunit"
],
"phpcs": [
"phpcs -s -p"
],
"phpcs-pre-commit": [
"phpcs -s -p -n"
],
"phpcbf": [
"phpcbf -p"
],
"makepot-audit": [
"wp --allow-root i18n make-pot . --exclude=\".github,.wordpress-org,bin,sample-data,node_modules,tests\" --slug=woocommerce"
],
"makepot": [
"@makepot-audit --skip-audit"
],
"bin": [
"echo 'bin not installed'"
],
"build-lib": [
"sh ./bin/build-lib.sh"
]
},
"extra": {
"installer-paths": {
"packages/{$name}": [
"woocommerce/action-scheduler",
"woocommerce/woocommerce-blocks",
"woocommerce/woocommerce-admin"
]
},
"scripts-description": {
"test": "Run unit tests",
"phpcs": "Analyze code against the WordPress coding standards with PHP_CodeSniffer",
"phpcbf": "Fix coding standards warnings/errors automatically with PHP Code Beautifier",
"makepot-audit": "Generate i18n/languages/woocommerce.pot file and run audit",
"makepot": "Generate i18n/languages/woocommerce.pot file"
},
"bamarni-bin": {
"target-directory": "bin/composer"
}
}
"name": "woocommerce/woocommerce",
"description": "An eCommerce toolkit that helps you sell anything. Beautifully.",
"homepage": "https://woocommerce.com/",
"type": "wordpress-plugin",
"license": "GPL-3.0-or-later",
"prefer-stable": true,
"minimum-stability": "dev",
"repositories": [
{
"type": "path",
"url": "lib"
}
],
"require": {
"php": ">=7.0",
"automattic/jetpack-autoloader": "2.10.1",
"automattic/jetpack-constants": "1.5.1",
"composer/installers": "~1.7",
"maxmind-db/reader": "1.6.0",
"pelago/emogrifier": "3.1.0",
"psr/container": "1.0.0",
"woocommerce/action-scheduler": "3.3.0",
"woocommerce/woocommerce-admin": "2.8.0",
"woocommerce/woocommerce-blocks": "6.1.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4",
"yoast/phpunit-polyfills": "^1.0",
"automattic/jetpack-changelogger": "3.0.2"
},
"config": {
"optimize-autoloader": true,
"preferred-install": {
"woocommerce/action-scheduler": "dist",
"woocommerce/woocommerce-rest-api": "dist",
"woocommerce/woocommerce-blocks": "dist"
},
"sort-packages": true,
"platform": {
"php": "7.0.33"
}
},
"autoload": {
"exclude-from-classmap": [
"includes/legacy",
"includes/libraries"
],
"classmap": [
"includes/rest-api"
],
"psr-4": {
"Automattic\\WooCommerce\\": "src/",
"Automattic\\WooCommerce\\Vendor\\": "lib/packages/"
},
"psr-0": {
"Automattic\\WooCommerce\\Vendor\\": "lib/packages/"
},
"files": [
"../../tools/changelogger/PluginFormatter.php"
]
},
"autoload-dev": {
"psr-4": {
"Automattic\\WooCommerce\\Tests\\": "tests/php/src/",
"Automattic\\WooCommerce\\Testing\\Tools\\": "tests/Tools/"
},
"classmap": [
"tests/legacy/unit-tests/rest-api/Helpers"
]
},
"scripts": {
"post-install-cmd": [
"@composer bin all install --ansi",
"sh ./bin/package-update.sh"
],
"post-update-cmd": [
"@composer bin all update --ansi",
"sh ./bin/package-update.sh"
],
"test": [
"phpunit"
],
"phpcs": [
"phpcs -s -p"
],
"phpcs-pre-commit": [
"phpcs -s -p -n"
],
"phpcbf": [
"phpcbf -p"
],
"makepot-audit": [
"wp --allow-root i18n make-pot . --exclude=\".github,.wordpress-org,bin,sample-data,node_modules,tests\" --slug=woocommerce"
],
"makepot": [
"@makepot-audit --skip-audit"
],
"bin": [
"echo 'bin not installed'"
],
"build-lib": [
"sh ./bin/build-lib.sh"
]
},
"extra": {
"installer-paths": {
"packages/{$name}": [
"woocommerce/action-scheduler",
"woocommerce/woocommerce-blocks",
"woocommerce/woocommerce-admin"
]
},
"scripts-description": {
"test": "Run unit tests",
"phpcs": "Analyze code against the WordPress coding standards with PHP_CodeSniffer",
"phpcbf": "Fix coding standards warnings/errors automatically with PHP Code Beautifier",
"makepot-audit": "Generate i18n/languages/woocommerce.pot file and run audit",
"makepot": "Generate i18n/languages/woocommerce.pot file"
},
"bamarni-bin": {
"target-directory": "bin/composer"
},
"changelogger": {
"formatter": {
"class": "PluginFormatter"
},
"types": [
"Fix",
"Add",
"Update",
"Dev",
"Tweak",
"Performance",
"Enhancement"
],
"versioning": "wordpress",
"changelog": "NEXT_CHANGELOG.md"
}
}
}

View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "2850714f99d072cbc80188fd4b56630f",
"content-hash": "8d115ec1c2d2dab03533d674edb48a44",
"packages": [
{
"name": "automattic/jetpack-autoloader",
@ -438,27 +438,22 @@
},
{
"name": "symfony/css-selector",
"version": "v3.3.6",
"version": "v3.4.47",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "4d882dced7b995d5274293039370148e291808f2"
"reference": "da3d9da2ce0026771f5fe64cb332158f1bd2bc33"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/4d882dced7b995d5274293039370148e291808f2",
"reference": "4d882dced7b995d5274293039370148e291808f2",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/da3d9da2ce0026771f5fe64cb332158f1bd2bc33",
"reference": "da3d9da2ce0026771f5fe64cb332158f1bd2bc33",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
"php": "^5.5.9|>=7.0.8"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\CssSelector\\": ""
@ -472,14 +467,14 @@
"MIT"
],
"authors": [
{
"name": "Jean-François Simon",
"email": "jeanfrancois.simon@sensiolabs.com"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Jean-François Simon",
"email": "jeanfrancois.simon@sensiolabs.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
@ -488,9 +483,23 @@
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/css-selector/tree/master"
"source": "https://github.com/symfony/css-selector/tree/v3.4.47"
},
"time": "2017-05-01T15:01:29+00:00"
"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": "woocommerce/action-scheduler",
@ -656,6 +665,63 @@
}
],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
"version": "v3.0.2",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
"reference": "b76f9cb4c22ec08490eff91a2e0e5aa586ee04b3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/b76f9cb4c22ec08490eff91a2e0e5aa586ee04b3",
"reference": "b76f9cb4c22ec08490eff91a2e0e5aa586ee04b3",
"shasum": ""
},
"require": {
"php": ">=5.6",
"symfony/console": "^3.4 | ^5.2",
"symfony/process": "^3.4 | ^5.2",
"wikimedia/at-ease": "^1.2 | ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 | ^2.0",
"yoast/phpunit-polyfills": "1.0.2"
},
"bin": [
"bin/changelogger"
],
"type": "project",
"extra": {
"autotagger": true,
"branch-alias": {
"dev-master": "3.0.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\\Changelogger\\": "src",
"Automattic\\Jetpack\\Changelog\\": "lib"
}
},
"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.0.2"
},
"time": "2021-11-02T14:06:49+00:00"
},
{
"name": "bamarni/composer-bin-plugin",
"version": "1.4.1",
@ -1576,6 +1642,56 @@
"abandoned": true,
"time": "2018-08-09T05:50:03+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": "sebastian/code-unit-reverse-lookup",
"version": "1.0.2",
@ -1811,16 +1927,16 @@
},
{
"name": "sebastian/exporter",
"version": "3.1.3",
"version": "3.1.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "6b853149eab67d4da22291d36f5b0631c0fd856e"
"reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e",
"reference": "6b853149eab67d4da22291d36f5b0631c0fd856e",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db",
"reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db",
"shasum": ""
},
"require": {
@ -1829,7 +1945,7 @@
},
"require-dev": {
"ext-mbstring": "*",
"phpunit/phpunit": "^6.0"
"phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
@ -1876,7 +1992,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
"source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3"
"source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4"
},
"funding": [
{
@ -1884,7 +2000,7 @@
"type": "github"
}
],
"time": "2020-11-30T07:47:53+00:00"
"time": "2021-11-11T13:51:24+00:00"
},
{
"name": "sebastian/global-state",
@ -2209,6 +2325,158 @@
},
"time": "2016-10-03T07:35:21+00:00"
},
{
"name": "symfony/console",
"version": "v3.4.47",
"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/v3.4.47"
},
"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": "v3.4.47",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "ab42889de57fdfcfcc0759ab102e2fd4ea72dcae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/ab42889de57fdfcfcc0759ab102e2fd4ea72dcae",
"reference": "ab42889de57fdfcfcc0759ab102e2fd4ea72dcae",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8",
"psr/log": "~1.0"
},
"conflict": {
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
},
"require-dev": {
"symfony/http-kernel": "~2.8|~3.0|~4.0"
},
"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": "Symfony Debug Component",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/debug/tree/v3.4.47"
},
"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/polyfill-ctype",
"version": "v1.19.0",
@ -2288,6 +2556,147 @@
],
"time": "2020-10-23T09:01:57+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.19.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b5f7b932ee6fa802fc792eabd77c4c88084517ce",
"reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.19-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
},
"files": [
"bootstrap.php"
]
},
"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/v1.19.0"
},
"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-23T09:01:57+00:00"
},
{
"name": "symfony/process",
"version": "v3.4.47",
"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/v3.4.47"
},
"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": "theseer/tokenizer",
"version": "1.1.3",
@ -2385,6 +2794,61 @@
},
"time": "2020-07-08T17:02:28+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": {
"psr-4": {
"Wikimedia\\AtEase\\": "src/Wikimedia/AtEase/"
},
"files": [
"src/Wikimedia/Functions.php"
]
},
"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"
},
{
"name": "yoast/phpunit-polyfills",
"version": "1.0.2",
@ -2457,7 +2921,7 @@
},
"platform-dev": [],
"platform-overrides": {
"php": "7.0"
"php": "7.0.33"
},
"plugin-api-version": "2.0.0"
}

View File

@ -71,7 +71,7 @@ class WC_Unit_Tests_Bootstrap {
* Load PHPUnit Polyfills for the WP testing suite.
* @see https://github.com/WordPress/wordpress-develop/pull/1563/
*/
define( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH', __DIR__ . '/../vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php' );
define( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH', __DIR__ . '/../../vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php' );
// load the WP testing environment.
require_once $this->wp_tests_dir . '/includes/bootstrap.php';

View File

@ -82,7 +82,8 @@ class WC_Tests_API_Functions extends WC_Unit_Test_Case {
*/
public function test_wc_rest_upload_image_from_url_should_return_error_when_invalid_image_is_passed() {
// empty file.
if ( version_compare( get_bloginfo( 'version' ), '5.4-alpha', '>=' ) ) {
$wp_version = get_bloginfo( 'version' );
if ( version_compare( $wp_version, '5.4-alpha', '>=' ) ) {
$expected_error_message = 'Invalid image: File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini file or by post_max_size being defined as smaller than upload_max_filesize in php.ini.';
} else {
$expected_error_message = 'Invalid image: File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.';
@ -93,7 +94,7 @@ class WC_Tests_API_Functions extends WC_Unit_Test_Case {
$this->assertEquals( $expected_error_message, $result->get_error_message() );
// unsupported mime type.
$expected_error_message = 'Invalid image: Sorry, this file type is not permitted for security reasons.';
$expected_error_message = version_compare( $wp_version, '5.9-alpha', '>=' ) ? 'Invalid image: Sorry, you are not allowed to upload this file type.' : 'Invalid image: Sorry, this file type is not permitted for security reasons.';
$result = wc_rest_upload_image_from_url( 'http://somedomain.com/invalid-image-2.png' );
$this->assertWPError( $result );

View File

@ -159,8 +159,12 @@ importers:
packages/js/e2e-utils:
specifiers:
<<<<<<< HEAD
'@automattic/puppeteer-utils': github:Automattic/puppeteer-utils#0f3ec50
=======
'@typescript-eslint/eslint-plugin': ^5.3.0
'@typescript-eslint/parser': ^5.3.0
>>>>>>> trunk
'@wordpress/deprecated': ^2.10.0
'@wordpress/e2e-test-utils': ^4.16.1
config: 3.3.3
@ -168,6 +172,7 @@ importers:
faker: ^5.1.0
fishery: ^1.2.0
dependencies:
'@automattic/puppeteer-utils': github.com/Automattic/puppeteer-utils/0f3ec50
'@wordpress/deprecated': 2.12.3
'@wordpress/e2e-test-utils': 4.16.1_jest@27.2.4
config: 3.3.3

View File

@ -0,0 +1,274 @@
<?php
/**
* Base Jetpack Changelogger Formatter for WooCommerce
*/
use Automattic\Jetpack\Changelog\Changelog;
use Automattic\Jetpack\Changelog\KeepAChangelogParser;
use Automattic\Jetpack\Changelogger\FormatterPlugin;
use Automattic\Jetpack\Changelogger\PluginTrait;
/**
* Base Jetpack Changelogger Formatter for WooCommerce
*
* Class Formatter
*/
class Formatter extends KeepAChangelogParser implements FormatterPlugin {
use PluginTrait;
/**
* Bullet for changes.
*
* @var string
*/
public $bullet = '- ';
/**
* Prologue text.
*
* @var string
*/
public $prologue = "# Changelog \n\n";
/**
* Epilogue text.
*
* @var string
*/
public $epilogue = '';
/**
* Entry pattern regex.
*
* @var string
*/
public $entry_pattern = '/^##\s+([^\n=]+)\s+((?:(?!^##).)+)/ms';
/**
* Heading pattern regex.
*
* @var string
*/
public $heading_pattern = '/^## \[+(\[?[^] ]+\]?)\]\(.+\) - (.+?)\n/s';
/**
* Subheading pattern regex.
*
* @var string
*/
public $subentry_pattern = '/^###(.+)\n/m';
/**
* Get Release link given a version number.
*
* @throws InvalidArgumentException When directory parsing fails.
* @param string $version Release version.
*
* @return string Link to the version's release.
*/
public function getReleaseLink( $version ) {
$path_map = array(
'packages/js/components' => 'https://www.npmjs.com/package/@woocommerce/components/v/',
'plugins/woocommerce' => 'https://github.com/woocommerce/woocommerce/releases/tag/',
);
// Catpure anything past /woocommerce in the current working directory.
preg_match( '/\/woocommerce\/(.+)/', getcwd(), $path );
if ( ! count( $path ) ) {
throw new InvalidArgumentException( 'Invalid directory.' );
}
$release_url = $path_map[ $path[1] ];
if ( ! $release_url ) {
throw new InvalidArgumentException( 'Release URL not found.' );
}
return $release_url . $version;
}
/**
* Modified version of parse() from KeepAChangelogParser.
*
* @param string $changelog Changelog contents.
* @return Changelog
* @throws InvalidArgumentException If the changelog data cannot be parsed.
*/
public function parse( $changelog ) {
$ret = new Changelog();
// Fix newlines and expand tabs.
$changelog = strtr( $changelog, array( "\r\n" => "\n" ) );
$changelog = strtr( $changelog, array( "\r" => "\n" ) );
while ( strpos( $changelog, "\t" ) !== false ) {
$changelog = preg_replace_callback(
'/^([^\t\n]*)\t/m',
function ( $m ) {
return $m[1] . str_repeat( ' ', 4 - ( mb_strlen( $m[1] ) % 4 ) );
},
$changelog
);
}
// Entries make up the rest of the document.
$entries = array();
$entry_pattern = $this->entry_pattern;
preg_match_all( $entry_pattern, $changelog, $matches );
foreach ( $matches[0] as $section ) {
// Remove the epilogue, if it exists.
$section = str_replace( $this->epilogue, '', $section );
$heading_pattern = $this->heading_pattern;
$subentry_pattern = $this->subentry_pattern;
// Parse the heading and create a ChangelogEntry for it.
preg_match( $heading_pattern, $section, $heading );
// Check if the heading may be a sub-heading.
preg_match( $subentry_pattern, $section, $subheading );
$is_subentry = count( $subheading ) > 0;
if ( ! count( $heading ) && ! count( $subheading ) ) {
throw new InvalidArgumentException( 'Invalid heading' );
}
$version = '';
$timestamp = new DateTime( 'now', new DateTimeZone( 'UTC' ) );
$entry_timestamp = new DateTime( 'now', new DateTimeZone( 'UTC' ) );
if ( count( $heading ) ) {
$version = $heading[1];
$timestamp = $heading[2];
try {
$timestamp = new DateTime( $timestamp, new DateTimeZone( 'UTC' ) );
} catch ( \Exception $ex ) {
throw new InvalidArgumentException( "Heading has an invalid timestamp: $heading", 0, $ex );
}
if ( strtotime( $heading[2], 0 ) !== strtotime( $heading[2], 1000000000 ) ) {
throw new InvalidArgumentException( "Heading has a relative timestamp: $heading" );
}
$entry_timestamp = $timestamp;
$content = trim( preg_replace( $heading_pattern, '', $section ) );
} elseif ( $is_subentry ) {
// It must be a subheading.
$version = $subheading[0]; // For now.
$content = trim( preg_replace( $subentry_pattern, '', $section ) );
}
$entry = $this->newChangelogEntry(
$version,
array(
'timestamp' => $timestamp,
)
);
$entries[] = $entry;
if ( '' === $content ) {
// Huh, no changes.
continue;
}
// Now parse all the subheadings and changes.
while ( '' !== $content ) {
$changes = array();
$rows = explode( "\n", $content );
foreach ( $rows as $row ) {
$row = trim( $row );
$row = preg_replace( '/' . $this->bullet . '/', '', $row, 1 );
$row_segments = explode( ' - ', $row );
array_push(
$changes,
array(
'subheading' => $is_subentry ? '' : trim( $row_segments[0] ),
'content' => $is_subentry ? trim( $row ) : trim( $row_segments[1] ),
)
);
}
foreach ( $changes as $change ) {
$entry->appendChange(
$this->newChangeEntry(
array(
'subheading' => $change['subheading'],
'content' => $change['content'],
'timestamp' => $entry_timestamp,
)
)
);
}
$content = '';
}
}
$ret->setEntries( $entries );
$ret->setPrologue( $this->prologue );
$ret->setEpilogue( $this->epilogue );
return $ret;
}
/**
* Write a Changelog object to a string.
*
* @param Changelog $changelog Changelog object.
* @return string
*/
public function format( Changelog $changelog ) {
$ret = '';
$date_format = 'Y-m-d';
$bullet = $this->bullet;
$indent = str_repeat( ' ', strlen( $bullet ) );
$prologue = trim( $changelog->getPrologue() );
if ( '' !== $prologue ) {
$ret .= "$prologue\n\n";
}
foreach ( $changelog->getEntries() as $entry ) {
$version = $entry->getVersion();
$is_subentry = preg_match( $this->subentry_pattern, $version, $subentry );
$timestamp = $entry->getTimestamp();
error_log(print_r($version, true));
$release_link = $this->getReleaseLink( $version );
if ( $is_subentry ) {
$ret .= '###' . $subentry[1] . " \n\n";
} else {
$ret .= '## [' . $version . '](' . $release_link . ') - ' . $timestamp->format( $date_format ) . " \n\n";
}
$prologue = trim( $entry->getPrologue() );
if ( '' !== $prologue ) {
$ret .= "$prologue\n\n";
}
foreach ( $entry->getChangesBySubheading() as $heading => $changes ) {
foreach ( $changes as $change ) {
$breaking_change = 'major' === $change->getSignificance() ? ' [ **BREAKING CHANGE** ]' : '';
$text = trim( $change->getContent() );
if ( '' !== $text ) {
$preamble = $is_subentry ? '' : $bullet . $heading . $breaking_change . ' - ';
$ret .= $preamble . str_replace( "\n", "\n$indent", $text ) . "\n";
}
}
}
$ret = trim( $ret ) . "\n\n";
}
$epilogue = trim( $changelog->getEpilogue() );
if ( '' !== $epilogue ) {
$ret .= "$epilogue\n";
}
$ret = trim( $ret ) . "\n";
return $ret;
}
}

View File

@ -0,0 +1,27 @@
<?php
/**
* Jetpack Changelogger Formatter for WooCommerce packages
*/
require_once 'Formatter.php';
/**
* Jetpack Changelogger Formatter for WooCommerce Packages
*
* Class Formatter
*/
class PackageFormatter extends Formatter {
/**
* Prologue text.
*
* @var string
*/
public $prologue = "# Changelog \n\nThis project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).";
/**
* Epilogue text.
*
* @var string
*/
public $epilogue = "---\n\n[See legacy changelogs for previous versions](https://github.com/woocommerce/woocommerce-admin/blob/main/packages/components/CHANGELOG.md).";
}

View File

@ -0,0 +1,27 @@
<?php
/**
* Jetpack Changelogger Formatter for WooCommerce plugins
*/
require_once 'Formatter.php';
/**
* Jetpack Changelogger Formatter for WooCommerce Plugins
*
* Class Formatter
*/
class PluginFormatter extends Formatter {
/**
* Epilogue text.
*
* @var string
*/
public $epilogue = "---\n\n[See changelogs for previous versions](https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/changelog.txt).";
/**
* Entry pattern regex.
*
* @var string
*/
public $entry_pattern = '/^##?#\s+([^\n=]+)\s+((?:(?!^##).)+)/ms';
}