Skip to content

Switch monorepo to npm core package#3773

Merged
flopez7 merged 22 commits intodevelopfrom
feat/core/npm
Feb 10, 2026
Merged

Switch monorepo to npm core package#3773
flopez7 merged 22 commits intodevelopfrom
feat/core/npm

Conversation

@flopez7
Copy link
Contributor

@flopez7 flopez7 commented Feb 4, 2026

c## Issue tracking
#3772

Context behind the change

This PR updates the monorepo so most packages consume @human-protocol/core from npm (instead of resolving it from the local workspace) to avoid rebuilding core on every CI/job. This removes a major build-time and keeps the repo history intact, while still allowing local core development when needed.

Main changes:

  • Replaced workspace-based core resolution with npm resolution by updating consumers to use @human-protocol/core: "npm:^5.0.1".
  • Extracted core build invocations from workflows/scripts that were implicitly rebuilding core, so they now rely on the published npm package artifacts by default.
  • Split release/deploy responsibilities: created a dedicated workflow for contract deployments/releases (decoupled from the old cd-packages.yaml flow), so publishing and deployment steps can run earlier and independently.
  • Created a separate Changesets configuration for the core package release flow to support running core publishing before changes land in develop.

Changesets notes
To enable independent contract deployments, core needed its own Changesets flow. That introduced friction with Changesets dependency validation:

  • Keeping all dependents with a normal range like ^5.0.1 caused Changesets errors when the root Changesets config ignored @human-protocol/core but non-ignored packages (SDK) depend on it.
  • Also tried excluding core from Yarn workspaces to prevent local resolution; however, to make Changesets fully “independent” in that mode, core effectively needs to live in a separate repo (Changesets’ model and validation assumes a single, coherent workspace graph).
  • Final approach: keep SDK depending on @human-protocol/core via npm:^5.0.1 and the rest of the packages using ^5.0.1. This produces a warning during yarn changeset / yarn changeset version, and when running changeset version dependency ranges get updated for most packages but not for the SDK package (because of how Changesets applies dependency updates/validation in this split setup).

How has this been tested?

Deployed all services and verified dependency resolution behavior: consumers resolve @human-protocol/core from npm (not local) under the default Yarn config.
Generated some changesets for testing purpose.
Built all docker images.

Release plan

  • Modify all packages deployment on render to use the new focused commands
    -Core publishing is handled via the core-specific Changesets flow/workflow and should run before merging to develop when a core release is required
  • Contract deployments now run via the dedicated deploy workflow (decoupled from the old combined pipeline), so deployments can be triggered independently of general package publishing.
  • If local contract changes are required for development, switch back to workspace resolution and run the core-local scripts as needed.
  • Set up trusted publishing for this action

Potential risks; What to monitor; Rollback plan

Check services build time to make sure it is decreased considerably.
Check that all actions works fine.

@flopez7 flopez7 self-assigned this Feb 4, 2026
@vercel
Copy link

vercel bot commented Feb 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
human-app Ready Ready Preview, Comment Feb 10, 2026 2:48pm
human-dashboard-frontend Ready Ready Preview, Comment Feb 10, 2026 2:48pm
staking-dashboard Ready Ready Preview, Comment Feb 10, 2026 2:48pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
faucet-frontend Ignored Ignored Preview Feb 10, 2026 2:48pm
faucet-server Ignored Ignored Preview Feb 10, 2026 2:48pm

Request Review

@vercel vercel bot temporarily deployed to Preview – human-dashboard-frontend February 4, 2026 12:51 Inactive
@vercel vercel bot temporarily deployed to Preview – human-app February 4, 2026 12:51 Inactive
@vercel vercel bot temporarily deployed to Preview – staking-dashboard February 4, 2026 12:51 Inactive
@vercel vercel bot temporarily deployed to Preview – human-app February 5, 2026 13:17 Inactive
@vercel vercel bot temporarily deployed to Preview – staking-dashboard February 5, 2026 13:17 Inactive
@vercel vercel bot temporarily deployed to Preview – human-dashboard-frontend February 5, 2026 13:17 Inactive
…M configurations for Job Launcher and Exchange Oracle
@vercel vercel bot temporarily deployed to Preview – staking-dashboard February 5, 2026 14:03 Inactive
@vercel vercel bot temporarily deployed to Preview – human-dashboard-frontend February 5, 2026 14:03 Inactive
@vercel vercel bot temporarily deployed to Preview – human-app February 5, 2026 14:03 Inactive
@vercel vercel bot temporarily deployed to Preview – staking-dashboard February 6, 2026 16:51 Inactive
@vercel vercel bot temporarily deployed to Preview – human-dashboard-frontend February 6, 2026 16:51 Inactive
@vercel vercel bot temporarily deployed to Preview – human-app February 6, 2026 16:51 Inactive
@flopez7 flopez7 requested a review from dnechay February 6, 2026 16:57
Copy link
Collaborator

@dnechay dnechay left a comment

Choose a reason for hiding this comment

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

LGTM, one minor comment

dnechay
dnechay previously approved these changes Feb 9, 2026
@flopez7 flopez7 mentioned this pull request Feb 10, 2026
30 tasks
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