feat: add update-deps command for cross-repo dependency sync#5
Merged
pyramation merged 1 commit intomainfrom Mar 17, 2026
Merged
feat: add update-deps command for cross-repo dependency sync#5pyramation merged 1 commit intomainfrom
pyramation merged 1 commit intomainfrom
Conversation
New command: makage update-deps --from <source-workspace> --in <target-repo> Dynamically discovers all packages in the source pnpm workspace, then cross-references them against the target repo's package.json files to find: - matched packages (source workspace packages used in target) - outdated packages (version drift detected) Outputs structured JSON to stdout with: - sourcePackages: all workspace packages (name, version, path) - matchedPackages: deps found in target (name, currentVersion, availableVersion, depType, consumer, outdated) - outdatedPackages: subset with version drift - has_dep_changes: boolean signal This replaces grep-based hacks in CI with a deterministic, version-aware dependency check. Works locally and in CI.
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
makage update-depscommand that compares workspace packages from a source repo against dependencies in a target repo, outputting structured JSON to stdout.What it does:
pnpm-workspace.yamlin--fromrepo, discovers all workspace package names + versionspackage.jsonfiles in--inrepo (supports monorepos)JSON output includes:
sourcePackages— all discovered workspace packages (name, version, path)matchedPackages— source packages found as deps in the target (with currentVersion, availableVersion, depType, consumer, outdated flag)outdatedPackages— subset where version drift was detectedhas_dep_changes— boolean signal for CIThis is intended to replace the
grep pnpm-lock.yamlhack in the constructive-hub CI workflow for cross-repo dep syncing. Logs go to stderr; structured JSON goes to stdout so CI can pipe/parse it.Review & Testing Checklist for Human
isOutdated()strips^~>=<prefixes and does a numeric 3-part comparison. It does NOT handle pre-release versions (1.0.0-beta.1), complex ranges (>=1.0.0 <2.0.0), or||operators. Verify this is acceptable for the version specs actually used across constructive repos, or decide if a propersemverlibrary dependency is warranted.update-depsreports outdated packages but does not actually runpnpm update. The CI workflow is expected to use the JSON output to decide what to update separately. Confirm this matches your intent.npm i -gfrom dist) and runmakage update-deps --from /path/to/constructive --in /path/to/constructive-db— verify the output includes naked-name packages likegraphile-search,pgsql-test, etc. that the old grep-based approach missed.packages/*→packages/*/package.json) only matches one level deep, same as the existingupdate-workspacecommand. If any workspace usespackages/**for nested packages, those would be missed.Notes
updateWorkspace.tscommandLink to Devin session: https://app.devin.ai/sessions/08781f0838fd4c929bb5ab08052b2b5a
Requested by: @pyramation