Repository navigation
feat(sync): support packages living in a monorepo - #5
Merged
Julien-R44 merged 3 commits intoOct 21, 2026
Merged
Conversation
Add an optional `directory` field. When set, sync reads `npm` and `description` from <directory>/package.json instead of the repository root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FriendsOfAdonis (5 packages), react-adonisjs, radonis and tuyau publish their package from a sub-folder. Without `directory`, sync rewrote their npm name to the workspace root (e.g. friends-of-adonis). tuyau now points to @tuyau/core: @tuyau/client is no longer in the repository and stopped at 0.2.10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Thanks mate |
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.
syncalways readsnpmanddescriptionfrom thepackage.jsonat the repository root. For a package living in a monorepo, that rootpackage.jsonbelongs to the workspace and not to the published package.8 packages in the registry live in a monorepo:
react-adonisjs,radonisandtuyau.They only show the right npm name today because they were migrated as-is and
syncnever ran on them. As soon as someone edits one, the Sync Check rewrites the name to the workspace root and fails. For example:npmin the filenpmwritten bysynconmainfoadonis-graphql@foadonis/graphqlfriends-of-adonisreact-adonisjs@matstack/react-adonisjs@matstack/react-adonisjs-monoreporadonis@microeinhundert/radonisradonis-monorepotuyau@tuyau/client@tuyau/monorepoChanges
1.
feat(sync): adds an optionaldirectoryfield, the folder of the package inside the repository. When it is set,syncreads<directory>/package.json. Nothing changes for packages without it.2.
fix: setsdirectoryon those 8 packages and re-runspnpm syncon them. The diff is whatsyncproduces:npmis unchanged, except fortuyau, which now points to@tuyau/core.@tuyau/clientis no longer in the repository and stopped at 0.2.10, while Tuyau v1 ships@tuyau/core.descriptionnow comes from each package's ownpackage.json.githubandmaintainersare added. The migrated files didn't have them.tuyauwebsite follows its redirect tohttps://docs.adonisjs.com/guides/frontend/api-client.I checked it locally:
pnpm syncagain on the 8 packages changes nothing, so the Sync Check passes;pnpm checkpasses.I need this to list the Agora libraries, which are all monorepos. That PR is stacked on this one.
🤖 Generated with Claude Code