{"id":15598206,"url":"https://github.com/boneskull/sync-monorepo-packages","last_synced_at":"2025-09-13T18:33:13.880Z","repository":{"id":35202991,"uuid":"216670390","full_name":"boneskull/sync-monorepo-packages","owner":"boneskull","description":"Synchronizes one or more fields between package.json files in a monorepo","archived":false,"fork":false,"pushed_at":"2024-10-29T17:33:44.000Z","size":1222,"stargazers_count":12,"open_issues_count":14,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-29T22:37:19.674Z","etag":null,"topics":["copy","lerna","manifest","metadata","monorepo","monorepo-packages","npm","package-json","package-management","packages","sync","synchronize","workflow"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boneskull.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-21T21:40:51.000Z","updated_at":"2023-11-05T10:44:57.000Z","dependencies_parsed_at":"2023-11-07T08:30:08.658Z","dependency_job_id":"3cc59aff-a314-4cc0-a18d-0e0d7052f940","html_url":"https://github.com/boneskull/sync-monorepo-packages","commit_stats":{"total_commits":412,"total_committers":4,"mean_commits":103.0,"dds":0.3228155339805825,"last_synced_commit":"7032e56ee22bc3d023ba2b7dd6cec69aa44edcd7"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":"boneskull/boneskull-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fsync-monorepo-packages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fsync-monorepo-packages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fsync-monorepo-packages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fsync-monorepo-packages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boneskull","download_url":"https://codeload.github.com/boneskull/sync-monorepo-packages/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232902875,"owners_count":18594356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["copy","lerna","manifest","metadata","monorepo","monorepo-packages","npm","package-json","package-management","packages","sync","synchronize","workflow"],"created_at":"2024-10-03T01:30:16.960Z","updated_at":"2025-01-07T16:08:11.644Z","avatar_url":"https://github.com/boneskull.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sync-monorepo-packages\n\n\u003e Synchronizes `package.json` fields and arbitrary files in a monorepo\n\n## Features\n\n- Auto-discovery of packages via `package.json` workspaces and/or `lerna.json`\n- Optional manual control of destination packages\n- Helpful defaults\n- Detailed \"dry run\" mode\n- Summary of operations\n- Sync arbitrary files (e.g. `README.md`)\n\n## Install\n\n**Requires Node.js `^14.17.0 || ^16.13.0 || \u003e=18.0.0`**\n\n```shell\nnpm install sync-monorepo-packages --save-dev\n```\n\n_or_\n\n```shell\n$ npx sync-monorepo-packages --help\n```\n\n## Usage\n\nHere, I have pasted the output of `--help` because I am lazy:\n\n```plain\nsync-monorepo-packages [file..]\n\nSynchronize files and metadata across packages in a monorepo\n\nPositionals:\n  file  One or more source files to sync                                [string]\n\nOptions:\n      --help             Show help                                     [boolean]\n      --version          Show version number                           [boolean]\n  -D, --dry-run          Do not sync; print what would have changed (implies\n                         --verbose)                                    [boolean]\n  -f, --field, --fields  Fields in source package.json to sync [array] [default:\n         [\"keywords\",\"author\",\"repository\",\"license\",\"engines\",\"publishConfig\"]]\n      --force            Overwrite destination file(s)                 [boolean]\n  -p, --packages         Dirs/globs containing destination packages\n                           [array] [default: (use workspaces and/or lerna.json)]\n      --package-json     Sync package.json             [boolean] [default: true]\n  -s, --source           Path to source package.json\n                                      [string] [default: (closest package.json)]\n  -v, --verbose          Print change details                          [boolean]\n      --summary          Print summary                 [boolean] [default: true]\n  -l, --lerna            Path to lerna.json, if any\n                                 [string] [default: (lerna.json in current dir)]\n\nExamples:\n  sync-monorepo-packages --field keywords   Sync \"keywords\" and \"author\" from\n  --field author -s ./foo/package.json      ./foo/package.json to packages found\n                                            in lerna.json\n  sync-monorepo-packages --packages ./foo   Using default fields, show what\n  --dry-run --no-summary                    would have synced from package.json\n                                            in current dir to packages in ./foo;\n                                            hide summary\n  sync-monorepo-packages --no-package-json  Sync ./README.md to each package\n  ./README.md                               found in lerna.json. Do not sync\n                                            anything in package.json\n\nFound a bug? Report it at https://github.com/boneskull/sync-monorepo-packages\n```\n\n## Notes\n\n- If there are other fields which would make sense to copy as a default, please suggest!\n- Use at your own risk! `--dry-run` is your friend\n- When copying files, directories may be created relative to the dirpath of `lerna.json` or `package.json`. For example, if you want to sync `foo/bar.md` to each package, `packages/*/foo/bar.md` will be the result. This may not work properly with explicitly-specified package directories! Use from project root to be sure.\n- There is an API that you can use. Go for it!\n\n## License\n\nCopyright © 2019 Christopher Hiller. Licensed Apache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboneskull%2Fsync-monorepo-packages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboneskull%2Fsync-monorepo-packages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboneskull%2Fsync-monorepo-packages/lists"}