{"id":13846863,"url":"https://github.com/qiwi/multi-semantic-release","last_synced_at":"2025-04-05T20:06:00.847Z","repository":{"id":37895400,"uuid":"175965979","full_name":"qiwi/multi-semantic-release","owner":"qiwi","description":"Proof of concept that wraps semantic-release to work with monorepos.","archived":false,"fork":false,"pushed_at":"2024-07-28T10:51:50.000Z","size":2555,"stargazers_count":87,"open_issues_count":22,"forks_count":37,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T18:07:45.065Z","etag":null,"topics":["cicd","semrel"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"dhoulb/multi-semantic-release","license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qiwi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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-03-16T11:55:31.000Z","updated_at":"2024-12-16T09:57:27.000Z","dependencies_parsed_at":"2024-06-18T15:29:46.365Z","dependency_job_id":"d643271f-e011-42d3-a457-75d760eda0d4","html_url":"https://github.com/qiwi/multi-semantic-release","commit_stats":{"total_commits":275,"total_committers":15,"mean_commits":"18.333333333333332","dds":0.6872727272727273,"last_synced_commit":"d06182758d5727bc2ad96d82f549a3735a4f0aa9"},"previous_names":[],"tags_count":97,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiwi%2Fmulti-semantic-release","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiwi%2Fmulti-semantic-release/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiwi%2Fmulti-semantic-release/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiwi%2Fmulti-semantic-release/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qiwi","download_url":"https://codeload.github.com/qiwi/multi-semantic-release/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393568,"owners_count":20931812,"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":["cicd","semrel"],"created_at":"2024-08-04T18:00:49.239Z","updated_at":"2025-04-05T20:06:00.826Z","avatar_url":"https://github.com/qiwi.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# @qiwi/multi-semantic-release\nhacky [semantic-release](https://github.com/semantic-release/semantic-release) for monorepos\n\n[![Travis CI](https://travis-ci.com/qiwi/multi-semantic-release.svg?branch=master)](https://travis-ci.com/qiwi/multi-semantic-release)\n[![Maintainability](https://api.codeclimate.com/v1/badges/c6ee027803a794f1d67d/maintainability)](https://codeclimate.com/github/qiwi/multi-semantic-release/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/c6ee027803a794f1d67d/test_coverage)](https://codeclimate.com/github/qiwi/multi-semantic-release/test_coverage)\n[![npm (scoped)](https://img.shields.io/npm/v/@qiwi/multi-semantic-release)](https://www.npmjs.com/package/@qiwi/multi-semantic-release)\n\nThis fork of [dhoub/multi-semantic-release](https://github.com/dhoulb/multi-semantic-release) replaces [`setImmediate` loops](https://github.com/dhoulb/multi-semantic-release/blob/561a8e66133d422d88008c32c479d1148876aba4/lib/wait.js#L13)\nand [`execa.sync` hooks](https://github.com/dhoulb/multi-semantic-release/blob/561a8e66133d422d88008c32c479d1148876aba4/lib/execaHook.js#L5) with event-driven flow and finally makes possible to run the most release operations in parallel.  \n🎉 🎉 🎉\n\n\n## Status\nWe're still using this lib as a part of our release infra, but we're gradually migrating to [bulk-release](https://github.com/semrel-extra/zx-bulk-release).\nThis means that we do not have many resources to develop this implementation actively, but we will continue to do it on a leftover basis.\n\n## Install\n\n```sh\nyarn add @qiwi/multi-semantic-release --dev\n```\n\n## Usage\n\n```sh\nmulti-semantic-release\n```\n\n## Configuring Multi-Semantic-Release\n\nmulti-semantic-release can be configured a number of ways:\n\n* A `.multi-releaserc` file, written in YAML or JSON, with optional extensions: `.yaml`/ `.yml`/ `.json`/ `.js`\n* A `multi-release.config.js` file that exports an object\n* A `multi-release` key in the workspace root package.json\n\nAlternatively some options may be set via CLI flags.\n\n**Note:** CLI arguments take precedence over options configured in the configuration file.\n\n### Options\n\n| Option            | Type              | CLI Flag               | Description                                                                                                                                                                                                                                             |\n|-------------------|-------------------|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| dryRun            | `boolean`         | `--dry-run`            | Dry run mode.                                                                                                                                                                                                                                           |\n| logLevel          | `String`          | `--log-level`          | Sets the internal logger verbosity level: `error, warn, info, debug, trace`. Defaults to `info`.                                                                                                                                                        |\n| debug             | `boolean`         | `--debug`              | Output debugging information. Shortcut for `--logLevel=debug`.                                                                                                                                                                                          |\n| silent            | `boolean`         | `--silent`             | Turns off any log outputs.                                                                                                                                                                                                                              |\n| extends           | `String \\| Array` | N/A                    | List of modules or file paths containing a shareable configuration. If multiple shareable configurations are set, they will be imported in the order defined with each configuration option taking precedence over the options defined in the previous. |\n| sequentialInit    | `boolean`         | `--sequential-init`    | Avoid hypothetical concurrent initialization collisions.                                                                                                                                                                                                |\n| sequentialPrepare | `boolean`         | `--sequential-prepare` | Avoid hypothetical concurrent preparation collisions. **True by default.**                                                                                                                                                                              |\n| firstParent       | `boolean`         | `--first-parent`       | Apply commit filtering to current branch only.                                                                                                                                                                                                          |\n| ignorePrivate     | `boolean`         | `--ignore-private`     | Exclude private packages. **True by default.**                                                                                                                                                                                                          |\n| ignorePackages    | `String \\| Array` | `--ignore-packages`    | Packages list to be ignored on bumping process (appended to the ones that already exist at package.json workspaces). If using the CLI flag, supply a comma seperated list of strings.                                                                   |\n| tagFormat         | `String`          | `--tag-format`         | Format to use when creating tag names. Should include \"name\" and \"version\" vars. Default: `\"${name}@${version}\"` which generates \"package-name@1.0.0\"                                                                                                   |\n| deps              | `Object`          | N/A                    | Dependency handling, see below for possible values.                                                                                                                                                                                                     |\n\n### `deps` Options\n\n| Option                | Type                                 | CLI Flag                       | Description                                                                                                                                                                                                                                                                                                                                             |\n|-----------------------|--------------------------------------|--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| bump                  | `override \\| satisfy \\| inherit`     | `--deps.bump`                  | Define deps version updating rule. Allowed: override, satisfy, inherit. **`override` by default.**                                                                                                                                                                                                                                                      |\n| release               | `patch \\| minor \\| major \\| inherit` | `--deps.release`               | Define release type for dependent package if any of its deps changes. Supported values: patch, minor, major, inherit. **`patch` by default**                                                                                                                                                                                                            |\n| prefix                | `'^' \\| '~' \\| ''`                   | `--deps.prefix`                | Optional prefix to be attached to the next version if `bump` is set to `override`. **`''` by default**.                                                                                                                                                                                                                                                 |\n| pullTagsForPrerelease | `boolean`                            | `--deps.pullTagsForPrerelease` | Optional flag to use release tags for evaluating prerelease version bumping.  Normally, this option will lead to dumping dependencies to a version past what was just released and tagged by semantic release.  Only set this option to true if you previously had a workflow that compensated for the previous bug behavior. **`'false'` by default**. |\n\n\n### Examples\n\n* Via multi-release key in the project's package.json file:\n\n```json\n{\n\t\"multi-release\": {\n\t\t\"ignorePackages\": [\n\t\t\t\"!packages/b/**\",\n\t\t\t\"!packages/c/**\"\n\t\t],\n\t\t\"deps\": {\n\t\t\t\"bump\": \"inherit\"\n\t\t}\n\t}\n}\n```\n\n* Via `.multi-releaserc` file:\n\n```json\n{\n\t\"ignorePackages\": [\n\t\t\"!packages/b/**\",\n\t\t\"!packages/c/**\"\n\t],\n\t\"deps\": {\n\t\t\"bump\": \"inherit\"\n\t}\n}\n```\n\n* Via CLI:\n\n```sh\n$ multi-semantic-release --ignore-packages=packages/a/**,packages/b/** --deps.bump=inherit\n```\n\n## Configuring Semantic-Release\n**MSR** requires **semrel** config to be added [in any supported format](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration) for each package or/and declared in repo root (`globalConfig` is extremely useful if all the modules have the same strategy of release).  \nNOTE config resolver joins `globalConfig` and `packageConfig` during execution.\n```javascript\n// Load the package-specific options.\nconst { options: pkgOptions } = await getConfig(dir);\n\n// The 'final options' are the global options merged with package-specific options.\n// We merge this ourselves because package-specific options can override global options.\nconst finalOptions = Object.assign({}, globalOptions, pkgOptions);\n```\n\nMake sure to have a `workspaces` attribute inside your `package.json` project file. In there, you can set a list of packages that you might want to process in the msr process, as well as ignore others. For example, let's say your project has 4 packages (i.e. a, b, c and d) and you want to process only a and d (ignore b and c). You can set the following structure in your `package.json` file:\n\n```json\n{\n\t\"name\": \"msr-test-yarn\",\n\t\"author\": \"Dave Houlbrooke \u003cdave@shax.com\",\n\t\"version\": \"0.0.0-semantically-released\",\n\t\"private\": true,\n\t\"license\": \"0BSD\",\n\t\"engines\": {\n\t\t\"node\": \"\u003e=8.3\"\n\t},\n\t\"workspaces\": [\n      \"packages/*\",\n      \"!packages/b/**\",\n      \"!packages/c/**\"\n\t],\n\t\"release\": {\n\t\t\"plugins\": [\n\t\t\t\"@semantic-release/commit-analyzer\",\n\t\t\t\"@semantic-release/release-notes-generator\"\n\t\t],\n\t\t\"noCi\": true\n\t}\n}\n```\n\nYou can also ignore it with the CLI:\n\n```bash\n$ multi-semantic-release --ignore-packages=packages/b/**,packages/c/**\n```\n\nYou can also combine the CLI ignore options with the `!` operator at each package inside `workspaces` attribute. Even though you can use the CLI to ignore options, you can't use it to set which packages to be released – i.e. you still need to set the `workspaces` attribute inside the `package.json`.\n\n## Verified usage examples\nWe use this tool to release our JS platform code inhouse (GitHub Enterprise + JB TeamCity) and for our OSS (GitHub + Travis CI). Guaranteed working configurations available in projects.\n* [qiwi/substrate](https://github.com/qiwi/substrate)\n* [qiwi/json-rpc](https://github.com/qiwi/json-rpc)\n* [qiwi/lint-config-qiwi](https://github.com/qiwi/lint-config-qiwi)\n\n## License\n[0BSD](./LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqiwi%2Fmulti-semantic-release","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqiwi%2Fmulti-semantic-release","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqiwi%2Fmulti-semantic-release/lists"}