{"id":13560728,"url":"https://github.com/sxzz/monoman","last_synced_at":"2025-11-10T09:01:48.107Z","repository":{"id":65942907,"uuid":"603038466","full_name":"sxzz/monoman","owner":"sxzz","description":"Manage monorepo common files.","archived":false,"fork":false,"pushed_at":"2025-04-27T13:42:06.000Z","size":623,"stargazers_count":16,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-27T14:32:42.794Z","etag":null,"topics":["cli","monorepo"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sxzz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["sxzz"]}},"created_at":"2023-02-17T13:46:50.000Z","updated_at":"2025-04-09T10:24:13.000Z","dependencies_parsed_at":"2024-03-20T19:55:41.317Z","dependency_job_id":"fa7d78bd-798a-4b6c-8aea-2d086178ec06","html_url":"https://github.com/sxzz/monoman","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"0eb9f8bbb4419ac1da1f20daf99eb67269ad2e2c"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sxzz%2Fmonoman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sxzz%2Fmonoman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sxzz%2Fmonoman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sxzz%2Fmonoman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sxzz","download_url":"https://codeload.github.com/sxzz/monoman/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251156733,"owners_count":21544803,"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":["cli","monorepo"],"created_at":"2024-08-01T13:00:49.019Z","updated_at":"2025-11-10T09:01:48.101Z","avatar_url":"https://github.com/sxzz.png","language":"TypeScript","readme":"# monoman\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Unit Test][unit-test-src]][unit-test-href]\n\nManage monorepo common files.\n\n## Install\n\n```bash\nnpm i monoman\n```\n\n## Usage\n\n```\npnpm monoman [-c | --check | -w | --write]\n```\n\n```ts\n// monoman.config.[ts,js]\nimport { defineConfig } from 'monoman'\n\nexport default defineConfig([\n  {\n    // Globs to match files\n    include: ['**/package.json'],\n    exclude: ['exclude/package.json'],\n    type: 'json',\n    contents(data: Record\u003cstring, string\u003e) {\n      data.name = 'monoman'\n      return data\n    },\n  },\n  {\n    include: ['**/package.json'],\n    exclude: ['exclude/package.json'],\n    type: 'text',\n    contents(text) {\n      return `${text} hello monoman!`\n    },\n  },\n  {\n    include = 'pnpm-lock.yaml',\n    exclude: ['exclude/pnpm-lock.yaml'],\n    type: 'yaml',\n    contents(data: Record\u003cstring, string\u003e) {\n      data.lockfileVersion = '9.0'\n      return data\n    },\n  },\n])\n```\n\nSee an [example](https://github.com/vue-macros/vue-macros/blob/main/monoman.config.ts) for more details.\n\n## Presets\n\n### `noDuplicatedDeps`\n\nMake all dependencies in all `package.json` unique.\n\n```ts\nfunction noDuplicatedDeps({\n  include = 'packages/*/package.json',\n  exclude,\n  distinguishType = false,\n  types = ['dependencies', 'devDependencies'],\n  ignoreProtocols = ['file', 'link', 'workspace'],\n}: {\n  include?: Arrayable\u003cstring\u003e\n  exclude?: Arrayable\u003cstring\u003e\n  distinguishType?: boolean\n  types?: string[]\n  ignoreProtocols?: string[]\n} = {})\n```\n\n### `noDuplicatedPnpmLockfile`\n\n```ts\nfunction noDuplicatedPnpmLockfile({\n  include = 'pnpm-lock.yaml',\n  exclude,\n  deps = [],\n}: {\n  /** Include files */\n  include?: Arrayable\u003cstring\u003e\n  /** Exclude files */\n  exclude?: Arrayable\u003cstring\u003e\n  /** Deps to check */\n  deps?: Arrayable\u003cstring\u003e\n} = {})\n```\n\n## Sponsors\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg\"\u003e\n    \u003cimg src='https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg'/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## License\n\n[MIT](./LICENSE) License © 2023-PRESENT [Kevin Deng](https://github.com/sxzz)\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/monoman.svg\n[npm-version-href]: https://npmjs.com/package/monoman\n[npm-downloads-src]: https://img.shields.io/npm/dm/monoman\n[npm-downloads-href]: https://www.npmcharts.com/compare/monoman?interval=30\n[unit-test-src]: https://github.com/sxzz/monoman/actions/workflows/unit-test.yml/badge.svg\n[unit-test-href]: https://github.com/sxzz/monoman/actions/workflows/unit-test.yml\n","funding_links":["https://github.com/sponsors/sxzz"],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsxzz%2Fmonoman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsxzz%2Fmonoman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsxzz%2Fmonoman/lists"}