The Woo Blocks Merge to the Monorepo is complete (along with Monorepo Tool Enhancements)

Over the weekend, WooCommerce Blocks was merged into the WooCommerce Monorepo. This brings with it a more streamlined development process and enhances collaboration across our community. As previously announced, this means WooCommerce Blocks development will take place in the WooCommerce Core monorepo instead of a separate repository (which is now archived). This also means there will no longer be a separate feature plugin release for WooCommerce Blocks.

Contributing to WooCommerce Blocks

PHP code contributions can be made in the /plugins/woocommerce/src folder and JavaScript contributions in the /plugins/woocommerce-blocks folder.

Over the last week, the WooCommerce team has worked to merge many community-created pull requests for WooCommerce Blocks. The authors of any pull requests that remain unmerged will have received a comment from a member of the WooCommerce team outlining next steps.

WooCommerce Blocks changes will now be shipped as part of WooCommerce releases on a monthly cadence, rather than every two weeks. If youโ€™d like to take a peek at whatโ€™s coming next, check out the Beta Tester Plugin for WooCommerce

There have been tooling changes in the monorepo which will be outlined later, but for WooCommerce Blocks development, here is a list of mapped commands from what you used previously, and what you should use now:

  • pnpm --filter='@woocommerce/plugin-woocommerce' build will build WooCommerce Core.
  • pnpm --filter='@woocommerce/block-library' build will build WooCommerce Blocksโ€™ client.
  • pnpm --filter='@woocommerce/block-library' test:js will run WooCommerce Blocksโ€™ JavaScript test suite.
  • lint and lint:fix commands in the same format are also available.

You can learn more about these commands in the WooCommerce Core README.

Woo merchants and store managers will not be affected by this change.ย 

Tooling Changes

We heard from various community members that they encountered challenges when working with the monorepo. Based on this feedback, weโ€™ve implemented some changes to the monorepoโ€™s tooling:

  • Turborepo has been replaced with Wireit – we anticipate that this change will provide faster and more reliable caching, both when working locally and with CI tools. In our testing, this has had a major impact, including decreasing the amount of time a major CI step takes to run from over five minutes in some cases to approximately one minute.
  • Weโ€™ve standardized our NPM scripts – we heard feedback that it wasnโ€™t always clear what our NPM scripts did, as they were inconsistently named throughout the monorepo. As part of this update, weโ€™re standardizing the scripts used, creating a more predictable experience for developers. Learn more about this change.

As a result of these changes, some commands have changed. Specifically:

  • Commands which reference plugin packages will now use the full @woocommerce/plugin-{slug} names. For example, pnpm --filter=woocommerce build is now pnpm --filter=@woocommerce/plugin-woocommerce build.
  • The packages woocommerce/client/legacy and woocommerce/client/admin have new names – @woocommerce/classic-assets and @woocommerce/admin-library respectively – which should be referenced from within commands.

You can find a full list of packages in the woocommerce/plugins folder of the monorepo.

Please note that this does not impact path-based filters such as pnpm --filter=./plugins/woocommerce build, nor does it affect pnpm {script} commands run from within project directories.

Where to find more information

Weโ€™re here to support developers during this transition. Over the coming weeks, weโ€™ll be providing support in the #monorepo channel on the Woo Community Slack. Weโ€™d love to hear your feedback about this new tooling, as well as answer any questions you may have.


Keep yourself in the loop!

Sign up for the WooCommerce developer newsletter:
This field is hidden when viewing the form
This field is hidden when viewing the form
This field is hidden when viewing the form


Leave a Reply

Your email address will not be published. Required fields are marked *