We are moving to a monorepo setup to simplify dependency management, build processes, and ensure common versions of shared tools (like TypeScript, Jest, React). The following repositories will be merged into a single monorepo:
Automates builds and publishing with Turborepo for efficient builds.
Supports conventional commits for automated versioning and changelog generation using Lerna.
Publishes packages to both npm and GitHub releases.
Provides a clean CI/CD pipeline using GitHub Actions.
Tasks
1. Monorepo Initialization
Create a new repository for the monorepo.
Set up npm workspaces to manage multiple packages inside the repo. Each package should be in its own folder under packages/ (e.g., packages/inspector, packages/logs-react, etc.).
Migrate the source code of each of the repos listed above into the appropriate package folder.
2. Turborepo Setup
Install and configure Turborepo to handle the build process for all packages.
Ensure that Turborepo correctly handles the dependencies between packages (e.g., package-a depending on package-b).
Set up Turborepo to only rebuild packages that have changed, optimizing the build process.
3. Lerna Setup for Versioning and Changelogs
Install and configure Lerna for automated versioning and changelog generation.
Set up Lerna to follow the conventional commits spec for determining version bumps (major, minor, patch).
Configure Lerna to create changelogs and bump versions when releasing.
4. Automating npm & GitHub Releases
Set up Lerna to publish packages to npm.
Configure Lerna to create GitHub releases with associated changelogs for each version bump.
Add necessary GitHub secrets (e.g., NPM_TOKEN, GITHUB_TOKEN) to authenticate publishing.
5. GitHub Actions for CI/CD
Create a GitHub Actions workflow to automate the following steps when code is pushed to the main branch:
Install dependencies using npm ci.
Run Turborepo to build the changed packages.
Run tests for the affected packages.
Run Lerna to handle versioning and changelogs.
Publish packages to npm.
Create a GitHub release with the changelog.
6. Testing the Monorepo
Test the full workflow: build, versioning, changelog creation, publishing to npm and GitHub releases.
Ensure that each package is correctly built and published independently, and that the dependency graph is respected during builds.
Acceptance Criteria
A fully functional monorepo containing the four listed repositories.
Turborepo set up to optimize builds across all packages.
Lerna handling conventional commits, version bumps, and changelog generation.
Successful publishing of all packages to npm and GitHub releases using GitHub Actions.
Please use this issue to track progress and ask questions. Let's make sure we streamline the workflow while maintaining clean, maintainable code.
Monorepo Setup for Open-RPC Repositories
We are moving to a monorepo setup to simplify dependency management, build processes, and ensure common versions of shared tools (like TypeScript, Jest, React). The following repositories will be merged into a single monorepo:
Goal
The objective is to set up a monorepo that:
Tasks
1. Monorepo Initialization
npm workspaces
to manage multiple packages inside the repo. Each package should be in its own folder underpackages/
(e.g.,packages/inspector
,packages/logs-react
, etc.).2. Turborepo Setup
package-a
depending onpackage-b
).3. Lerna Setup for Versioning and Changelogs
4. Automating npm & GitHub Releases
NPM_TOKEN
,GITHUB_TOKEN
) to authenticate publishing.5. GitHub Actions for CI/CD
main
branch:npm ci
.6. Testing the Monorepo
Acceptance Criteria
Please use this issue to track progress and ask questions. Let's make sure we streamline the workflow while maintaining clean, maintainable code.