woocommerce/plugins/woocommerce/package.json

806 lines
23 KiB
JSON

{
"name": "@woocommerce/plugin-woocommerce",
"private": true,
"title": "WooCommerce",
"version": "9.5.0",
"homepage": "https://woocommerce.com/",
"repository": {
"type": "git",
"url": "https://github.com/woocommerce/woocommerce.git"
},
"license": "GPL-3.0+",
"scripts": {
"build": "pnpm --if-present --workspace-concurrency=Infinity --stream --filter=\"$npm_package_name...\" '/^build:project:.*$/'",
"build:admin": "pnpm --if-present --workspace-concurrency=Infinity --stream --filter=\"@woocommerce/admin-library...\" --filter=\"$npm_package_name\" '/^build:project:.*$/'",
"build:blocks": "pnpm --if-present --workspace-concurrency=Infinity --stream --filter=\"@woocommerce/block-library...\" --filter=\"$npm_package_name\" '/^build:project:.*$/'",
"build:classic-assets": "pnpm --if-present --workspace-concurrency=Infinity --stream --filter=\"@woocommerce/classic-assets...\" --filter=\"$npm_package_name\" '/^build:project:.*$/'",
"build:zip": "./bin/build-zip.sh",
"build:project": "pnpm --if-present '/^build:project:.*$/'",
"build:project:copy-assets:legacy": "wireit",
"build:project:copy-assets:admin": "wireit",
"build:project:copy-assets:blocks": "wireit",
"build:project:actualize-translation-domains": "wireit",
"changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
"docker:down": "pnpm exec wc-e2e docker:down",
"docker:ssh": "pnpm exec wc-e2e docker:ssh",
"docker:up": "pnpm exec wc-e2e docker:up",
"e2e": "pnpm exec wc-e2e test:e2e",
"e2e:debug": "pnpm exec wc-e2e test:e2e-debug",
"e2e:dev": "pnpm exec wc-e2e test:e2e-dev",
"env:destroy": "pnpm wp-env destroy",
"env:dev": "pnpm wp-env start --update",
"env:down": "pnpm wp-env stop",
"env:performance-init": "./tests/performance/bin/init-sample-products.sh",
"env:restart": "pnpm wp-env destroy && pnpm wp-env start --update",
"env:start": "pnpm wp-env start",
"env:start:blocks": "pnpm --filter='@woocommerce/block-library' env:start && pnpm playwright install chromium --with-deps",
"env:stop": "pnpm wp-env stop",
"env:test": "pnpm env:dev",
"env:perf": "pnpm env:dev && pnpm env:performance-init",
"preinstall": "npx only-allow pnpm",
"postinstall": "XDEBUG_MODE=off composer install --quiet",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:changes:branch": "pnpm '/^lint:changes:branch:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:php": "composer run-script phpcbf",
"lint:changes:branch:js": "bash ./bin/eslint-branch.sh",
"lint:changes:branch:php": "pnpm lint:php:changes:branch",
"lint:lang:js": "eslint . --ext=js,ts",
"lint:lang:php": "composer run-script phpcs",
"lint:php": "composer run-script phpcs",
"lint:php:changes": "composer run-script lint",
"lint:php:changes:branch": "composer run-script lint-branch",
"lint:php:changes:staged": "composer run-script lint-staged",
"lint:php:fix": "composer run-script phpcbf",
"make:collection": "pnpm exec wc-api-tests make:collection",
"makepot": "composer run-script makepot",
"test": "pnpm test:unit",
"test:api": "pnpm test:e2e:default --project=api --workers 4",
"test:e2e": "pnpm test:e2e:default --project=ui",
"test:e2e:default": "pnpm test:e2e:install && pnpm test:e2e:with-env default",
"test:e2e:install": "pnpm playwright install chromium",
"test:e2e:blocks": "pnpm --filter='@woocommerce/block-library' test:e2e",
"test:e2e:with-env": "pnpm test:e2e:install && bash ./tests/e2e-pw/run-tests-with-env.sh",
"test:env:start": "pnpm env:test",
"test:perf": "./tests/performance/bin/k6 run ./tests/performance/tests/gh-action-pr-requests.js",
"test:perf:ci-setup": "pnpm test:perf:install-k6 && pnpm env:perf",
"test:perf:install-k6": "bash ./tests/performance/bin/install-k6.sh",
"test:php": "./vendor/bin/phpunit -c ./phpunit.xml",
"test:php:watch": "./vendor/bin/phpunit-watcher watch",
"test:metrics": "USE_WP_ENV=1 pnpm playwright test --config=tests/metrics/playwright.config.js",
"test:metrics:ci": "../../.github/workflows/scripts/run-metrics.sh",
"test:php:env": "wp-env run --env-cwd='wp-content/plugins/woocommerce' tests-cli vendor/bin/phpunit -c phpunit.xml --verbose",
"test:php:env:watch": "wp-env run --env-cwd='wp-content/plugins/woocommerce' tests-cli vendor/bin/phpunit-watcher watch --verbose",
"test:unit": "pnpm test:php",
"test:unit:watch": "pnpm test:php:watch",
"test:unit:env": "pnpm test:php:env",
"test:unit:env:watch": "pnpm test:php:env:watch",
"update-wp-env": "php ./tests/e2e-pw/bin/update-wp-env.php",
"watch:build": "pnpm --if-present --workspace-concurrency=Infinity --filter=\"$npm_package_name...\" --parallel '/^watch:build:project:.*$/'",
"watch:build:admin": "pnpm --if-present --workspace-concurrency=Infinity --filter=\"@woocommerce/admin-library...\" --filter=\"$npm_package_name\" --parallel '/^watch:build:project:.*$/'",
"watch:build:blocks": "pnpm --if-present --workspace-concurrency=Infinity --filter=\"@woocommerce/block-library...\" --filter=\"$npm_package_name\" --parallel '/^watch:build:project:.*$/'",
"watch:build:classic-assets": "pnpm --if-present --workspace-concurrency=Infinity --filter=\"@woocommerce/classic-assets...\" --filter=\"$npm_package_name\" --parallel '/^watch:build:project:.*$/'",
"watch:build:project": "pnpm --if-present run '/^watch:build:project:.*$/'",
"watch:build:project:copy-assets": "wireit",
"wp-env": "wp-env"
},
"lint-staged": {
"*.php": [
"php -d display_errors=1 -l",
"composer run-script lint-staged"
],
"!(*min).js": [
"eslint --fix"
]
},
"config": {
"wp_org_slug": "woocommerce",
"build_step": "pnpm build:zip",
"ci": {
"lint": {
"command": "lint:changes:branch <baseRef>",
"changes": [
"composer.lock",
"**/*.php",
"**/*.js"
]
},
"tests": [
{
"name": "PHP: 8.0 WP: latest",
"testType": "unit:php",
"command": "test:php:env",
"shardingArguments": [
"--testsuite=wc-phpunit-legacy",
"--testsuite=wc-phpunit-main"
],
"changes": [
"client/admin/config/*.json",
"composer.json",
"composer.lock",
"**/*.php",
".wp-env.json",
"phpunit.xml"
],
"testEnv": {
"start": "env:test",
"config": {
"phpVersion": "8.0",
"wpVersion": "latest"
}
},
"events": [
"pull_request",
"push"
]
},
{
"name": "PHP WP: latest - 1",
"testType": "unit:php",
"command": "test:php:env",
"shardingArguments": [
"--testsuite=wc-phpunit-legacy",
"--testsuite=wc-phpunit-main"
],
"changes": [
"client/admin/config/*.json",
"composer.json",
"composer.lock",
"**/*.php",
".wp-env.json",
"phpunit.xml"
],
"testEnv": {
"start": "env:test",
"config": {
"wpVersion": "latest-1"
}
},
"events": [
"pull_request",
"push"
]
},
{
"name": "PHP WP: nightly",
"testType": "unit:php",
"command": "test:php:env",
"shardingArguments": [
"--testsuite=wc-phpunit-legacy",
"--testsuite=wc-phpunit-main"
],
"optional": true,
"changes": [
"client/admin/config/*.json",
"composer.json",
"composer.lock",
"**/*.php",
".wp-env.json",
"phpunit.xml"
],
"testEnv": {
"start": "env:test",
"config": {
"wpVersion": "nightly"
}
},
"events": [
"pull_request",
"push"
]
},
{
"name": "Core e2e tests",
"testType": "e2e",
"command": "test:e2e",
"shardingArguments": [
"--shard=1/6",
"--shard=2/6",
"--shard=3/6",
"--shard=4/6",
"--shard=5/6",
"--shard=6/6"
],
"changes": [
"client/admin/config/*.json",
"composer.json",
"composer.lock",
"includes/**/*.php",
"patterns/**/*.php",
"src/**/*.php",
"templates/**/*.php",
"tests/e2e-pw/**",
".wp-env.json",
"woocommerce.php",
"uninstall.php"
],
"testEnv": {
"start": "env:test"
},
"events": [
"pull_request",
"push",
"release-checks"
],
"report": {
"resultsBlobName": "core-e2e-report",
"resultsPath": "tests/e2e-pw/test-results",
"allure": true
}
},
{
"name": "Core e2e tests - Gutenberg stable",
"testType": "e2e",
"command": "test:e2e:with-env gutenberg-stable",
"shardingArguments": [
"--shard=1/5",
"--shard=2/5",
"--shard=3/5",
"--shard=4/5",
"--shard=5/5"
],
"changes": [],
"events": [
"daily-checks",
"release-checks"
],
"testEnv": {
"start": "env:test"
},
"report": {
"resultsBlobName": "gutenberg-stable-e2e-report",
"resultsPath": "tests/e2e-pw/test-results",
"allure": true
}
},
{
"name": "Core e2e tests - Gutenberg nightly",
"testType": "e2e",
"command": "test:e2e:with-env gutenberg-nightly",
"shardingArguments": [
"--shard=1/5",
"--shard=2/5",
"--shard=3/5",
"--shard=4/5",
"--shard=5/5"
],
"changes": [],
"events": [
"daily-checks",
"release-checks"
],
"testEnv": {
"start": "env:test"
},
"report": {
"resultsBlobName": "gutenberg-nightly-e2e-report",
"resultsPath": "tests/e2e-pw/test-results",
"allure": true
}
},
{
"name": "Core e2e tests - Woocommerce Payments",
"testType": "e2e",
"command": "test:e2e:with-env woocommerce-payments",
"shardingArguments": [],
"changes": [],
"events": [
"daily-checks",
"release-checks"
],
"testEnv": {
"start": "env:test"
},
"report": {
"resultsBlobName": "wcpayments-e2e-report",
"resultsPath": "tests/e2e-pw/test-results",
"allure": true
}
},
{
"name": "Core e2e tests - Woocommerce Paypal Payments",
"testType": "e2e",
"command": "test:e2e:with-env woocommerce-paypal-payments",
"shardingArguments": [],
"changes": [],
"events": [
"daily-checks",
"release-checks"
],
"testEnv": {
"start": "env:test"
},
"report": {
"resultsBlobName": "wc-paypal-payments-e2e-report",
"resultsPath": "tests/e2e-pw/test-results",
"allure": true
}
},
{
"name": "Core e2e tests - WooCommerce Shipping & Tax",
"testType": "e2e",
"command": "test:e2e:with-env woocommerce-services",
"shardingArguments": [],
"changes": [],
"events": [
"daily-checks",
"release-checks"
],
"testEnv": {
"start": "env:test"
},
"report": {
"resultsBlobName": "wc-services-e2e-report",
"resultsPath": "tests/e2e-pw/test-results",
"allure": true
}
},
{
"name": "Core e2e tests - HPOS disabled",
"testType": "e2e",
"command": "test:e2e:with-env default-hpos-disabled --project=ui",
"shardingArguments": [],
"events": [
"daily-checks",
"release-checks"
],
"changes": [],
"testEnv": {
"start": "env:test",
"config": {
"disableHpos": true
}
},
"report": {
"resultsBlobName": "core-e2e-reports-hpos-disabled",
"resultsPath": "tests/e2e-pw/test-results",
"allure": true
}
},
{
"name": "Core e2e tests - PHP 8.1",
"testType": "e2e",
"command": "test:e2e",
"shardingArguments": [
"--shard=1/5",
"--shard=2/5",
"--shard=3/5",
"--shard=4/5",
"--shard=5/5"
],
"changes": [],
"testEnv": {
"start": "env:test",
"config": {
"phpVersion": "8.1"
}
},
"events": [
"daily-checks",
"release-checks"
],
"report": {
"resultsBlobName": "core-e2e-report-php-8.1",
"resultsPath": "tests/e2e-pw/test-results",
"allure": true
}
},
{
"name": "Core e2e tests - WP latest-1",
"testType": "e2e",
"command": "test:e2e",
"shardingArguments": [
"--shard=1/5",
"--shard=2/5",
"--shard=3/5",
"--shard=4/5",
"--shard=5/5"
],
"changes": [],
"testEnv": {
"start": "env:test",
"config": {
"wpVersion": "latest-1"
}
},
"events": [
"daily-checks",
"release-checks"
],
"report": {
"resultsBlobName": "core-e2e-report-wp-latest-1",
"resultsPath": "tests/e2e-pw/test-results",
"allure": true
}
},
{
"name": "Core e2e tests - WP pre-release",
"testType": "e2e",
"command": "test:e2e",
"shardingArguments": [
"--shard=1/5",
"--shard=2/5",
"--shard=3/5",
"--shard=4/5",
"--shard=5/5"
],
"changes": [],
"testEnv": {
"start": "env:test",
"config": {
"wpVersion": "prerelease"
}
},
"events": [
"daily-checks",
"release-checks"
],
"report": {
"resultsBlobName": "core-e2e-report-wp-pre-release",
"resultsPath": "tests/e2e-pw/test-results",
"allure": true
}
},
{
"name": "Core API tests",
"testType": "api",
"command": "test:api",
"optional": false,
"changes": [
"client/admin/config/*.json",
"composer.json",
"composer.lock",
"includes/**/*.php",
"patterns/**/*.php",
"src/**/*.php",
"templates/**/*.php",
"tests/e2e-pw/tests/api-tests/**",
".wp-env.json",
"woocommerce.php",
"uninstall.php"
],
"testEnv": {
"start": "env:test"
},
"events": [
"pull_request",
"push"
],
"report": {
"resultsBlobName": "core-api-report",
"resultsPath": "tests/e2e-pw/test-results",
"allure": true
}
},
{
"name": "Core API tests - HPOS disabled",
"testType": "api",
"command": "test:e2e:with-env default-hpos-disabled --project=api",
"optional": false,
"changes": [
"client/admin/config/*.json",
"composer.json",
"composer.lock",
"includes/**/*.php",
"patterns/**/*.php",
"src/**/*.php",
"templates/**/*.php",
"tests/e2e-pw/bin/**",
".wp-env.json",
"woocommerce.php",
"uninstall.php"
],
"events": [
"push"
],
"testEnv": {
"start": "env:test",
"config": {
"disableHpos": true
}
},
"report": {
"resultsBlobName": "core-api-report-hpos-disabled",
"resultsPath": "tests/e2e-pw/test-results",
"allure": true
}
},
{
"name": "Core Performance tests (K6)",
"testType": "performance",
"command": "test:perf",
"optional": true,
"changes": [
"tests/performance/**"
],
"testEnv": {
"start": "test:perf:ci-setup"
},
"events": [
"push"
]
},
{
"name": "Metrics",
"testType": "performance",
"command": "test:metrics:ci",
"optional": true,
"changes": [
"client/admin/config/*.json",
"composer.json",
"composer.lock",
"includes/**/*.php",
"patterns/**/*.php",
"src/**/*.php",
"templates/**/*.php",
"templates/**/*.html",
"tests/metrics/**",
".wp-env.json"
],
"testEnv": {
"start": "env:test"
},
"events": [
"push"
],
"report": {
"resultsBlobName": "core-metrics-report",
"resultsPath": "../../tools/compare-perf/artifacts/"
}
},
{
"name": "Blocks e2e tests",
"testType": "e2e",
"command": "test:e2e:blocks",
"shardingArguments": [
"--shard=1/10",
"--shard=2/10",
"--shard=3/10",
"--shard=4/10",
"--shard=5/10",
"--shard=6/10",
"--shard=7/10",
"--shard=8/10",
"--shard=9/10",
"--shard=10/10"
],
"changes": [
"src/Blocks/**",
"templates/**",
"patterns/**"
],
"testEnv": {
"start": "env:start:blocks"
},
"events": [
"pull_request",
"push",
"release-checks",
"nightly-checks"
],
"report": {
"resultsBlobName": "blocks-e2e-report",
"resultsPath": "../woocommerce-blocks/tests/e2e/artifacts/test-results",
"allure": true
}
},
{
"name": "Blocks e2e tests - WP pre-release",
"testType": "e2e",
"command": "test:e2e:blocks",
"shardingArguments": [
"--shard=1/10",
"--shard=2/10",
"--shard=3/10",
"--shard=4/10",
"--shard=5/10",
"--shard=6/10",
"--shard=7/10",
"--shard=8/10",
"--shard=9/10",
"--shard=10/10"
],
"changes": [
"src/Blocks/**",
"templates/**",
"patterns/**"
],
"testEnv": {
"start": "env:start:blocks",
"config": {
"wpVersion": "prerelease"
}
},
"events": [
"daily-checks",
"release-checks"
],
"report": {
"resultsBlobName": "blocks-e2e-report-wp-pre-release",
"resultsPath": "../woocommerce-blocks/tests/e2e/artifacts/test-results",
"allure": true
}
},
{
"name": "Core e2e tests - default Pressable site",
"testType": "e2e",
"command": "test:e2e:with-env default-pressable",
"shardingArguments": [],
"changes": [],
"events": [
"release-checks",
"on-demand"
],
"report": {
"resultsBlobName": "default-pressable-core-e2e-and-api",
"resultsPath": "tests/e2e-pw/test-results",
"allure": true
}
},
{
"name": "Core e2e tests - default WPCOM site",
"testType": "e2e",
"command": "test:e2e:with-env default-wpcom",
"shardingArguments": [],
"changes": [],
"events": [
"release-checks",
"on-demand"
],
"report": {
"resultsBlobName": "default-wpcom-core-e2e-and-api",
"resultsPath": "tests/e2e-pw/test-results",
"allure": true
}
}
]
}
},
"devDependencies": {
"@babel/cli": "7.12.8",
"@babel/core": "7.12.9",
"@babel/preset-env": "7.12.7",
"@babel/register": "7.12.1",
"@playwright/test": "^1.46.1",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/experimental-utils": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@woocommerce/admin-e2e-tests": "workspace:*",
"@woocommerce/api": "workspace:*",
"@woocommerce/api-core-tests": "workspace:*",
"@woocommerce/e2e-core-tests": "workspace:*",
"@woocommerce/e2e-environment": "workspace:*",
"@woocommerce/e2e-utils": "workspace:*",
"@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/woocommerce-rest-api": "^1.0.1",
"@wordpress/babel-plugin-import-jsx-pragma": "1.1.3",
"@wordpress/babel-preset-default": "3.0.2",
"@wordpress/e2e-test-utils-playwright": "wp-6.6",
"@wordpress/env": "^10.1.0",
"@wordpress/stylelint-config": "^21.36.0",
"allure-commandline": "^2.25.0",
"allure-playwright": "^2.9.2",
"autoprefixer": "9.8.6",
"axios": "^0.24.0",
"babel-eslint": "10.1.0",
"buildkite-test-collector": "^1.7.1",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"config": "3.3.7",
"cross-env": "6.0.3",
"dotenv": "^10.0.0",
"eslint": "^8.55.0",
"eslint-config-wpcalypso": "5.0.0",
"eslint-plugin-jest": "23.20.0",
"eslint-plugin-playwright": "0.22.1",
"istanbul": "1.0.0-alpha.2",
"jest": "27.5.x",
"mocha": "7.2.0",
"nodemon": "^3.0.2",
"prettier": "npm:wp-prettier@^2.8.5",
"stylelint": "^14.16.1",
"typescript": "5.3.x",
"uuid": "^9.0.1",
"webpack": "5.70.0",
"webpack-cli": "3.3.12",
"wireit": "0.14.3",
"wp-textdomain": "1.0.1"
},
"engines": {
"node": "^20.11.1",
"pnpm": "9.1.3"
},
"browserslist": [
"> 0.1%",
"ie 8",
"ie 9"
],
"dependencies": {
"@woocommerce/admin-library": "workspace:*",
"@woocommerce/block-library": "workspace:*",
"@woocommerce/classic-assets": "workspace:*",
"@wordpress/browserslist-config": "wp-6.0"
},
"nodemonConfig": {
"delay": 2500,
"watch": [
"node_modules/@woocommerce/block-library/build",
"node_modules/@woocommerce/block-library/blocks.ini",
"node_modules/@woocommerce/classic-assets/build",
"node_modules/@woocommerce/admin-library/build"
],
"ext": "js,css,php,json",
"ignoreRoot": []
},
"wireit": {
"build:project:copy-assets:legacy": {
"command": "rsync -avhW --checksum --delete --quiet client/legacy/build/css/ assets/css && rsync -avhW --checksum --delete --quiet client/legacy/build/js/ assets/js",
"files": [
"client/legacy/build/**/*.*"
],
"output": [
"assets/css",
"assets/js"
]
},
"build:project:copy-assets:admin": {
"command": "rsync -avhW --checksum --delete --quiet client/admin/build/ assets/client/admin",
"files": [
"client/admin/build/**/*.*"
],
"output": [
"assets/client/admin"
]
},
"build:project:copy-assets:blocks": {
"command": "rsync -avhW --checksum --delete --quiet ../woocommerce-blocks/build/ assets/client/blocks && rsync -avhW --checksum --quiet ../woocommerce-blocks/blocks.ini blocks.ini",
"files": [
"../woocommerce-blocks/build/**/*.*"
],
"output": [
"assets/client/blocks"
]
},
"build:project:actualize-translation-domains": {
"command": "node ./bin/package-update-textdomain.js",
"files": [
"packages/**/*.php"
],
"output": []
},
"watch:build:project:copy-assets": {
"command": "nodemon --exec \"pnpm run\" build:project",
"service": true
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"node_modules/@woocommerce/e2e-core-tests/build",
"node_modules/@woocommerce/e2e-core-tests/build-module",
"node_modules/@woocommerce/e2e-core-tests/test-data",
"node_modules/@woocommerce/e2e-core-tests/core-tests-root.js",
"node_modules/@woocommerce/e2e-core-tests/installFiles",
"node_modules/@woocommerce/e2e-core-tests/CHANGELOG.md",
"node_modules/@woocommerce/api/dist/",
"node_modules/@woocommerce/admin-e2e-tests/build",
"node_modules/@woocommerce/classic-assets/build",
"node_modules/@woocommerce/block-library/build",
"node_modules/@woocommerce/block-library/blocks.ini",
"node_modules/@woocommerce/admin-library/build",
"package.json",
"!node_modules/@woocommerce/admin-e2e-tests/*.ts.map",
"!node_modules/@woocommerce/admin-e2e-tests/*.tsbuildinfo",
"!node_modules/@woocommerce/api/*.ts.map",
"!node_modules/@woocommerce/api/*.tsbuildinfo",
"!node_modules/@woocommerce/api/dist/**/__tests__/",
"!node_modules/@woocommerce/api/dist/**/__mocks__/",
"!node_modules/@woocommerce/api/dist/**/__snapshops__/",
"!node_modules/@woocommerce/api/dist/**/__test_data__/"
]
}
}
}