A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
Go to file
Christopher Allford 556cf46523
Added Monorepo CI Command (#43345)
* Added Config Object Types

* Added CI Config Parsing

* Added Package Loader

This is a convenience method for loading the package JSON file with support for caching the
files that have already been imported.

* Removed Unnecessary Package Values

* Specified Node Dependencies

* Added Test Environment Config Parsing

* Changed Internal Config Representation

For convenience it makes more sense to have a single
type of Job interface that we can process. This avoids
having to complicate checks when we output them.

* Added Workspace Dependency Graph

Using `pnpm list` we are able to build a graph of
all of the workspace projects and their dependencies.
This can be used to handle change cascades across
a project's dependencies.

* Added Changed File Detection

We can use `git` to figure out what files have changed
and associate them with the respective projects.
This will let us identify what jobs to run based on
the changes that have happened to a project.

* Added Test Environment Config Parsing Tests

* Added CI Config To Project Graph

In the interest of making it easier to process the jobs
we will store the CI config in the graph nodes.

* Changed Project Graph Build Output

Our usage of the graph depends a lot on how we
are choosing to use it. Instead of returning all of
the nodes we will return the root.

* Added Change-Based Job Creation

We can now marry the config, file changes, and project graph
to output jobs. This supports checking the changes
as well as cascade keys for test jobs.

* Added Job Test Env Parsing

The ideal time to parse all of the config values for the
job's test environment is when creating the job.

* Added Command Index

With everything in place we can now add the command.
In addition to that, I've fixed a few bugs that appeared
when testing out the command locally. Since
we aren't changing the CI config in this PR
we can't easily test the actual command.

* Fixed Typo
2024-01-09 15:15:08 -04:00
.github add linting configuration for docs folder (#43376) 2024-01-09 10:09:59 -04:00
.husky Remove the post-checkout hook it was causing too much friction. (#37024) 2023-03-03 12:43:18 +13:00
bin Migrate Puppeteer test action from Blocks repo (#42733) 2023-12-13 16:01:34 -08:00
changelog Create changelog/39948-patch-4 2023-09-27 10:01:56 +01:00
docs Adding menu_title to user-experience docs (#43429) 2024-01-09 12:54:13 -05:00
packages [Product Block Editor]: Add new image components (#43383) 2024-01-09 11:49:49 -03:00
plugins Update stable tag to 8.4.0 (#43425) 2024-01-09 16:51:08 +01:00
tools Added Monorepo CI Command (#43345) 2024-01-09 15:15:08 -04:00
.codecov.yml Turn on code-cov for PR checking of unit test coverage (#36548) 2023-02-09 22:08:36 +13:00
.editorconfig JS formatting files 2021-10-19 10:35:46 +13:00
.eslintignore JS formatting files 2021-10-19 10:35:46 +13:00
.eslintrc.js Designate root level eslint config 2021-12-13 08:13:40 -08:00
.gitattributes Enforce LF Line Endings (#37843) 2023-04-19 08:26:19 -07:00
.gitignore Performance: Add a tool and a CI workflow to compare performance between PR and trunk and track metrics on trunk 2023-12-14 10:48:15 +01:00
.markdownlint.json Add reusable blocks documentation for remaining blocks (#40521) 2023-10-03 12:49:46 +00:00
.markdownlintignore undo changes to test fixtures 2023-11-10 15:49:08 +01:00
.npmrc Upgrade to pnpm 7 (#34661) 2022-09-16 09:21:42 +12:00
.nvmrc Update package and node version 2021-12-15 07:08:37 -08:00
.pnpmfile.cjs Optimized `wireit` Fingerprinting File Inputs (#42684) 2023-12-11 16:21:35 -08:00
.prettierrc.js JS formatting files 2021-10-19 10:35:46 +13:00
.stylelintrc Deprecate stylelint-config-wordpress with current package 2021-12-14 09:14:54 -08:00
.syncpackrc Updated PNPM to ^8.12.1 (#42860) 2023-12-18 20:31:49 +13:00
CODEOWNERS Add codeowners file (#35765) 2022-11-29 13:18:45 -08:00
CODE_OF_CONDUCT.md appease the linter 2023-11-06 14:20:05 +01:00
DEVELOPMENT.md Removed Unnecessary `run` From `pnpm` 2023-12-09 14:36:22 -08:00
README.md Removed Unnecessary `run` From `pnpm` 2023-12-09 14:36:22 -08:00
SECURITY.md replace developer.woocommerce.com with developer.woo.com 2023-11-10 16:09:27 +01:00
changelog.txt Update changelog.txt from release 8.4.0 (#42732) 2023-12-18 16:07:04 +00:00
package.json Fix "rm: .git/hooks: No such file or directory" error in `pnpm install` when the directory is missing (#43142) 2024-01-08 14:13:42 -04:00
phpcs.xml add exclusion for short array syntax 2023-12-14 10:07:41 -04:00
pnpm-lock.yaml Add HOC to hide inventory collapsible block when nothing is inside it (#43228) 2024-01-05 15:01:12 -03:00
pnpm-workspace.yaml Performance: Add a tool and a CI workflow to compare performance between PR and trunk and track metrics on trunk 2023-12-14 10:48:15 +01:00
renovate.json Converted Spaces To Tabs In JSON 2022-05-10 13:31:01 -07:00
tsconfig.base.json Removed TypeScript Incremental Build Support (#37374) 2023-03-23 11:25:42 -07:00

README.md

WooCommerce Monorepo

WooCommerce

Welcome to the WooCommerce Monorepo on GitHub. Here you can find all of the plugins, packages, and tools used in the development of the core WooCommerce plugin as well as WooCommerce extensions. You can browse the source, look at open issues, contribute code, and keep tracking of ongoing development.

We recommend all developers to follow the WooCommerce development blog to stay up to date about everything happening in the project. You can also follow @DevelopWC on Twitter for the latest development updates.

Getting Started

To get up and running within the WooCommerce Monorepo, you will need to make sure that you have installed all of the prerequisites.

Prerequisites

  • NVM: While you can always install Node through other means, we recommend using NVM to ensure you're aligned with the version used by our development teams. Our repository contains an .nvmrc file which helps ensure you are using the correct version of Node.
  • PNPM: Our repository utilizes PNPM to manage project dependencies and run various scripts involved in building and testing projects.
  • PHP 7.4+: WooCommerce Core currently features a minimum PHP version of 7.4. It is also needed to run Composer and various project build scripts. See troubleshooting for troubleshooting problems installing PHP.
  • Composer: We use Composer to manage all of the dependencies for PHP packages and plugins.

Once you've installed all of the prerequisites, you can run the following commands to get everything working.

# Ensure that you're using the correct version of Node
nvm use
# Install the PHP and Composer dependencies for all of the plugins, packages, and tools
pnpm install
# Build all of the plugins, packages, and tools in the monorepo
pnpm build

At this point you are now ready to begin developing and testing. All of the build outputs are cached running pnpm build again will only build the plugins, packages, and tools that have changed since the last time you ran the command.

Check out our development guide if you would like a more comprehensive look at working in our repository.

Repository Structure

  • Plugins: Our repository contains plugins that relate to or otherwise aid in the development of WooCommerce.
    • WooCommerce Core: The core WooCommerce plugin is available in the plugins directory.
  • Packages: Contained within the packages directory are all of the PHP and JavaScript provided for the community. Some of these are internal dependencies and are marked with an internal- prefix.
  • Tools: We also have a growing number of tools within our repository. Many of these are intended to be utilities and scripts for use in the monorepo, but, this directory may also contain external tools.

Reporting Security Issues

To disclose a security issue to our team, please submit a report via HackerOne here.

Support

This repository is not suitable for support. Please don't use our issue tracker for support requests, but for core WooCommerce issues only. Support can take place through the appropriate channels:

NOTE: Unfortunately, we are unable to honor support requests in issues on this repository; as a result, any requests submitted in this manner will be closed.

Community

For peer to peer support, real-time announcements, and office hours, please join our slack community!

Contributing to WooCommerce

If you have a patch or have stumbled upon an issue with WooCommerce core, you can contribute this back to the code. Please read our contributor guidelines for more information on how you can do this.