Update to pnpm 9.1 (#47385)
* Update to pnpm 9.1 and fix a mini css bug
* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/ai, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai
* temporarily disable swallowing build output to diagnose issue with perf workflow
* Ignore some type issues that commonly resurface when deps slightly change
* Fix persistent type issues that have recurred many times
* Add more ignores
* Fix lint issue
* Revert change to swallow build error
* Improve access of the config that needs updated build dir.
---------
Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 13:57:39 +00:00
|
|
|
const path = require( 'path' );
|
2024-04-22 17:34:28 +00:00
|
|
|
|
Update to pnpm 9.1 (#47385)
* Update to pnpm 9.1 and fix a mini css bug
* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/ai, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai
* temporarily disable swallowing build output to diagnose issue with perf workflow
* Ignore some type issues that commonly resurface when deps slightly change
* Fix persistent type issues that have recurred many times
* Add more ignores
* Fix lint issue
* Revert change to swallow build error
* Improve access of the config that needs updated build dir.
---------
Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 13:57:39 +00:00
|
|
|
const getPnpmPackage = ( sourceDir ) => {
|
|
|
|
const packageJson = require( path.join( sourceDir, 'package.json' ) );
|
|
|
|
let pnpm_package = 'pnpm';
|
|
|
|
|
|
|
|
if ( packageJson.engines.pnpm ) {
|
|
|
|
pnpm_package = `pnpm@${ packageJson.engines.pnpm }`;
|
|
|
|
}
|
|
|
|
|
|
|
|
return pnpm_package;
|
|
|
|
};
|
2024-04-22 17:34:28 +00:00
|
|
|
|
2023-12-12 09:33:34 +00:00
|
|
|
const config = {
|
|
|
|
gitRepositoryURL: 'https://github.com/woocommerce/woocommerce.git',
|
|
|
|
pluginPath: '/plugins/woocommerce',
|
|
|
|
testsPath: '/plugins/woocommerce/tests/metrics/specs',
|
Update to pnpm 9.1 (#47385)
* Update to pnpm 9.1 and fix a mini css bug
* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/ai, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai
* temporarily disable swallowing build output to diagnose issue with perf workflow
* Ignore some type issues that commonly resurface when deps slightly change
* Fix persistent type issues that have recurred many times
* Add more ignores
* Fix lint issue
* Revert change to swallow build error
* Improve access of the config that needs updated build dir.
---------
Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 13:57:39 +00:00
|
|
|
getSetupTestRunner: ( sourceDir ) => {
|
|
|
|
const pnpm_package = getPnpmPackage( sourceDir );
|
|
|
|
|
|
|
|
return `npm install -g ${ pnpm_package } && pnpm install --filter="@woocommerce/plugin-woocommerce" &> /dev/null && cd plugins/woocommerce && pnpm exec playwright install chromium`;
|
|
|
|
},
|
|
|
|
getSetupCommand: ( sourceDir ) => {
|
|
|
|
const pnpm_package = getPnpmPackage( sourceDir );
|
|
|
|
|
|
|
|
return `npm install -g ${ pnpm_package } && pnpm install &> /dev/null && pnpm build &> /dev/null`;
|
|
|
|
},
|
|
|
|
getTestCommand: ( sourceDir ) => {
|
|
|
|
const pnpm_package = getPnpmPackage( sourceDir );
|
|
|
|
return `npm install -g ${ pnpm_package } && cd plugins/woocommerce && pnpm test:metrics`;
|
|
|
|
},
|
2023-12-12 09:33:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = config;
|