Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monorepo plugin #630

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open

Monorepo plugin #630

wants to merge 26 commits into from

Conversation

apaleslimghost
Copy link
Member

@apaleslimghost apaleslimghost commented Apr 24, 2024

  • just exports a task. if you want to run commands in your workspace packages, run that task at the toplevel, and it will run the same command in the workspace

    example

    .toolkitrc.yml

    commands:
      test:local: WorkspaceCommand

    packages/something/.toolkitrc.yml

    commands:
      test:local: Cypress # only needed in this package

    npx dotcom-tool-kit test:local in the root runs test:local in packages/something, which runs Cypress

  • refactors some stuff in the core to expose some internals needed for the monorepo taskmake tool kit config loading agnostic of CWD #709

  • collects workspace package command errors into an AggregateError to make use of the new(ish) AggregateError handling better error formatting  #716

@apaleslimghost apaleslimghost force-pushed the monorepos-monorepos-monorepos branch from a617d77 to 456ce34 Compare May 9, 2024 08:58
Copy link
Contributor

@ivomurrell ivomurrell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm very happy that this is so simple! though the proof is in the cp-content-pipeline pudding...

plugins/monorepo/package.json Show resolved Hide resolved
@apaleslimghost apaleslimghost force-pushed the monorepos-monorepos-monorepos branch 2 times, most recently from b451dfb to 32c9c65 Compare July 25, 2024 11:30
@apaleslimghost apaleslimghost force-pushed the monorepos-monorepos-monorepos branch from 32c9c65 to 15d7b26 Compare July 25, 2024 13:41
@apaleslimghost apaleslimghost changed the base branch from next to create-plugin-fixes July 25, 2024 13:41
Base automatically changed from create-plugin-fixes to next July 25, 2024 13:42
@apaleslimghost apaleslimghost force-pushed the monorepos-monorepos-monorepos branch from 15d7b26 to 3c24d34 Compare July 25, 2024 13:47
@apaleslimghost apaleslimghost changed the base branch from next to task-context July 25, 2024 13:47
@apaleslimghost apaleslimghost force-pushed the monorepos-monorepos-monorepos branch 2 times, most recently from 0e0ae70 to 5a89031 Compare July 25, 2024 16:02
@apaleslimghost apaleslimghost changed the base branch from task-context to split-config-loading July 25, 2024 16:03
@apaleslimghost apaleslimghost force-pushed the monorepos-monorepos-monorepos branch from 5a89031 to 52b4fc2 Compare July 29, 2024 11:26
@apaleslimghost apaleslimghost marked this pull request as ready for review October 1, 2024 13:13
@apaleslimghost apaleslimghost requested a review from a team as a code owner October 1, 2024 13:13
@apaleslimghost apaleslimghost force-pushed the monorepos-monorepos-monorepos branch from 52b4fc2 to 4f9a816 Compare October 1, 2024 13:17
Base automatically changed from split-config-loading to main October 1, 2024 14:55
@apaleslimghost apaleslimghost force-pushed the monorepos-monorepos-monorepos branch from 4f9a816 to 68a31e5 Compare November 4, 2024 11:07
@apaleslimghost apaleslimghost force-pushed the monorepos-monorepos-monorepos branch from d2b5026 to 9a99482 Compare November 8, 2024 10:21
@apaleslimghost apaleslimghost changed the base branch from main to roots-manuva November 8, 2024 10:21
@apaleslimghost apaleslimghost force-pushed the monorepos-monorepos-monorepos branch from 9a99482 to 66e744c Compare November 8, 2024 10:23
… and log which packages

(instead of logging a bunch of "no task configured for test:local: skipping assignment...")
@apaleslimghost apaleslimghost force-pushed the monorepos-monorepos-monorepos branch from 2285d00 to 4d706d1 Compare December 16, 2024 17:27
@apaleslimghost apaleslimghost changed the base branch from main to pre-post-steps December 16, 2024 17:27
Copy link
Contributor

@meel-io meel-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it locally with a simple monorepo and worked perfectly 🎉 Easy to follow thanks to the nice comprehensive README

npm install --save-dev @dotcom-tool-kit/monorepo
```

Add the plugin to your [Tool Kit configuration](https://github.com/financial-times/dotcom-tool-kit/blob/main/readme.md#configuration):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: This link doesn't seem to show me the configuration section

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: plus one

Base automatically changed from pre-post-steps to main December 20, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants