{"_id":"@dotfold/semantic-release-monorepo","_rev":"2-3c46181aca324bd59f05c18935043427","name":"@dotfold/semantic-release-monorepo","dist-tags":{"latest":"6.1.1"},"versions":{"6.1.0":{"name":"@dotfold/semantic-release-monorepo","version":"6.1.0","description":"Plugins for `semantic-release` allowing it to be used with a monorepo.","main":"src/index.js","files":["src"],"scripts":{"format":"prettier --write --single-quote --trailing-comma es5","format:all":"yarn format \"./**/*.js\"","precommit":"lint-staged","test":"jest"},"license":"MIT","peerDependencies":{"semantic-release":"13.4.1 - 15.x.x"},"dependencies":{"debug":"^3.1.0","execa":"^0.8.0","p-limit":"^1.2.0","pkg-up":"^2.0.0","ramda":"^0.25.0","read-pkg":"^3.0.0","semantic-release-plugin-decorators":"^1.2.1"},"devDependencies":{"husky":"^0.14.3","jest":"^21.2.1","lint-staged":"^6.0.0","prettier":"^1.9.2","semantic-release":"^15.0.0","semantic-release-github-pr":"^5.0.5"},"lint-staged":{"*.js":["yarn format","git add"]},"gitHead":"941c9e87e024c287c6aa10c4c54656d3b4a25c33","_id":"@dotfold/semantic-release-monorepo@6.1.0","_npmVersion":"6.0.1","_nodeVersion":"8.3.0","_npmUser":{"name":"dotfold","email":"james@dotfold.io"},"dist":{"integrity":"sha512-1JtNGnfg6b8ZRwPMvXzQWSFsdOdlvVXfEt2k5TYHk0iVDXOBkAvJ79uwwVZ6+i5zKqck2xvR7AtVSrRib5qYsQ==","shasum":"69f59856f2f7f8c2b0bc05e6d1a34aff967b3014","tarball":"https://registry.npmjs.org/@dotfold/semantic-release-monorepo/-/semantic-release-monorepo-6.1.0.tgz","fileCount":12,"unpackedSize":16042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgJE4CRA9TVsSAnZWagAAY1gP/3NCvUoWHaPiiHloXiYZ\n0W+1eZZrAAkeKRVyEJ5wYl7m2i9NIAof54gbcXFccVoek2VRZFQHsNgGovFy\nGbQdGTLsIloowrTzgoe29Vyf2rW34DIwJY+/IVMj2Sjvx7SGMh6a2q/4AMdk\nlk0jxHBGrMEsExJt3LGuYlOBCWHNJPmPbcmtn5HIZZtc7/V12ms8DHa8shY3\naG4CRamhlG59fVQYQ83Gkcd9xXnywC68KZQTqyvUTyYVWIN00IiuTl4b+O5G\n51JVmwhvvNGnmVlvZRoRX9dsqgAmWgPkjNI0xTCxSACJ7as/rwvi/f2TK3T+\nOUnagUMQg8OazuX+m7rRheR55I4lAjYZEPnuDaInT5SUBSg8ue9/wq6tw56q\nRd+87ZvpbilO0SYYcuCEtUzf2WBZK1sqqoGArqnjOSK4Kp8SOd776BxbtvNa\nhMW4S8jWjmKSiguwLTCc7gUj13okoo9pmJcl77fMfzwwcVBF3+OaBu+sPstw\nnhIL+LRcq4cWfwKWsjt9+XjvS3SfuU/jhoHcwfSLp5fAz/4Au/4EzKYJfHh3\nd77+S8QtVjH7zS61HIghUFlZAw5LouH6CjRgapOerq39tQcDwvQBmtJ+ezn3\nyWoFFsrS35gM8ERfRTe74SsxiZAZYXr0rWo+qGmowf0tdglRKgN7yQ68I/dn\nVBj9\r\n=o2Jj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpZB6+fXgThEXnMVSbjOhDuDBrZArIGWZnUGSHjWGx/gIhAItKJOvgpcbmIJxWklL8Y1kvRZufz9rVOABN3OW0ap/Q"}]},"maintainers":[{"name":"dotfold","email":"james@dotfold.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/semantic-release-monorepo_6.1.0_1535152439882_0.08956722904019054"},"_hasShrinkwrap":false},"6.1.1":{"name":"@dotfold/semantic-release-monorepo","version":"6.1.1","description":"Plugins for `semantic-release` allowing it to be used with a monorepo.","main":"src/index.js","files":["src"],"scripts":{"format":"prettier --write --single-quote --trailing-comma es5","format:all":"yarn format \"./**/*.js\"","precommit":"lint-staged","test":"jest"},"license":"MIT","peerDependencies":{"semantic-release":"13.4.1 - 15.x.x"},"dependencies":{"debug":"^3.1.0","execa":"^0.8.0","p-limit":"^1.2.0","pkg-up":"^2.0.0","ramda":"^0.25.0","read-pkg":"^3.0.0","semantic-release-plugin-decorators":"^1.2.1"},"devDependencies":{"husky":"^0.14.3","jest":"^21.2.1","lint-staged":"^6.0.0","prettier":"^1.9.2","semantic-release":"^15.0.0","semantic-release-github-pr":"^5.0.5"},"lint-staged":{"*.js":["yarn format","git add"]},"gitHead":"18925f3bcf5aa714b9bd7ef3640752e68c5bf6ac","_id":"@dotfold/semantic-release-monorepo@6.1.1","_npmVersion":"6.0.1","_nodeVersion":"8.3.0","_npmUser":{"name":"dotfold","email":"james@dotfold.io"},"dist":{"integrity":"sha512-ru4ynYaNIJFHPQFBHnHuUZKH29ufSPXc+tRogX1Ulk9+dwgPxaO94jzBfMcT/Di4zZnCuv546enfG2v7uxo1rA==","shasum":"04b5b9bc4ca769d62a82cea4221d9e39c03b148e","tarball":"https://registry.npmjs.org/@dotfold/semantic-release-monorepo/-/semantic-release-monorepo-6.1.1.tgz","fileCount":12,"unpackedSize":16043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgJjTCRA9TVsSAnZWagAAQxwQAJZIHZkjLa+ksuby5vEN\nanRpE2iNYWmWaVp/1xGs2oSN2zcpi70CqLwdUwLxTHZwPMXWMwc1oZUtsYDD\nLMnoVPAsrJhX/lrNloXIWrZKtee6gv2rqnwC5Yx2tod6fImhiRFzWU+iuMuA\ndXeKXYFk1u4ScIhHPrwXMk7985pYJLkaQZ84bE8SnnyLsheZUvvLA6lnGBq3\nMd6ALeNdSHYdCuyWM43maxy7mXGHEu5Yc992tDsRgTV1SWoNceODNWgRoEfr\nGXnFDvyJg5kdwL9U+UAN03GoPNs7SWcJiQGW4aZw/1+hMf+pagAB7+mGStE+\nntFuNZChOqnwIepRnyn9Lu+1j4F/cPSZ+xUGykKnOmq1ulnu6REltmkYX6rJ\n/Sn1psbAvtBwS3StUS4yD2fkNfhktACLTxyO/t9ooo+F3RGtctKupANAfv79\nZGKLWJTE6gnpjVVklkLeIK0jDpaLxOPvaqStrcfBNFUtx9/rw9E9hCEy7th/\n6wcBwt6MNox99xlxrlWYGFvtyLNUchcnOBmIiHa6vF2mV8/hCvh779mCAPlM\n5gB82eIetmvMLe+bElSTQ08AvPFoS+4iHmJmJCpSay8uto0gmoHSannlinpE\nPA9egRU8OI1JfzzhsBCr4LuOKPV33XYpNXvl60hSQEM8UJHe/fpQ8swoh39V\nRw0A\r\n=yFIv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6I+7RnvrrQ2Pakpr5QeDxMCgdrVA0hQuS0Gin0IQ4xQIhAL7ODrysjvfWAR3StDy4PIZhbm438vnl2GLsGZD7KxGG"}]},"maintainers":[{"name":"dotfold","email":"james@dotfold.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/semantic-release-monorepo_6.1.1_1535154386857_0.7415654702866683"},"_hasShrinkwrap":false}},"time":{"created":"2018-08-24T23:13:59.597Z","6.1.0":"2018-08-24T23:13:59.979Z","modified":"2022-04-05T05:28:35.920Z","6.1.1":"2018-08-24T23:46:26.969Z"},"maintainers":[{"name":"dotfold","email":"james@dotfold.io"}],"description":"Plugins for `semantic-release` allowing it to be used with a monorepo.","license":"MIT","readme":"# semantic-release-monorepo\n\n[![Build Status](https://travis-ci.org/Updater/semantic-release-monorepo.svg?branch=master)](https://travis-ci.org/Updater/semantic-release-monorepo) [![npm](https://img.shields.io/npm/v/semantic-release-monorepo.svg)](https://www.npmjs.com/package/semantic-release-monorepo) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\nApply [`semantic-release`'s](https://github.com/semantic-release/semantic-release) automatic publishing to a monorepo.\n\n## Why\n\nThe default configuration of `semantic-release` assumes a one-to-one relationship between a GitHub repository and an `npm` package.\n\nThis set of plugins allows using `semantic-release` with a single Github repository containing many `npm` packages.\n\n## How\n\nInstead of attributing all commits to a single package, commits are assigned to packages based on the files that a commit touched.\n\nIf a commit touched a file in or below a package's root, it will be considered for that package's next release. A single commit can belong to multiple packages.\n\nA push may release multiple package versions. In order to avoid version collisions, git tags are namespaced using the given package's name: `<package-name>-<version>`.\n\n## Install\n\n```bash\nnpm install -D semantic-release@next semantic-release-monorepo\n```\n\n## Usage\n\nRun `semantic-release-monorepo` for the package in the current working directory:\n\n```bash\nnpx semantic-release -e semantic-release-monorepo\n```\n\nIt helps to think about `semantic-release-monorepo` as a variation on `semantic-release`'s default behavior, using the latter's plugin system to adapt it to work with a monorepo.\n\n### With Lerna\n\nThe monorepo management tool [`lerna`](https://github.com/lerna/lerna) can be used to run `semantic-release-monorepo` across all packages in a monorepo:\n\n```bash\nlerna exec --concurrency 1 -- npx --no-install semantic-release -e semantic-release-monorepo\n```\n\nNote that this requires installing `semantic-release` and `semantic-release-monorepo` for each package.\n\nAlternatively, thanks to how [`npx's package resolution works`](https://github.com/zkat/npx#description), if the repository root is in `$PATH` (typically true on CI), `semantic-release` and `semantic-release-monorepo` can be installed once in the repo root instead of in each individual package, likely saving both time and disk space.\n\n## Configuration\n\nThe set of plugins in this package wrap other `semantic-release` plugins to modify their behavior. By default, the same plugin configuration as `semantic-release` is used, but any plugin configuration should be compatible.\n\n### Release config\n\nPlugins can be configured in the [release config](https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/configuration.md#configuration), with one important caveat:\n\nDue to limitations in how plugins may be composed ([discussion](https://github.com/semantic-release/semantic-release/issues/550)), `semantic-release-monorepo` must unfortunately \"hard-code\" the set of plugins it wraps: `analyze-commits` and `generateNotes`.\n\nUsers may still want to define a custom versions of the plugin set, or want to pass options to the default versions. To work around this problem, set the desired plugin configuration under the `monorepo` property instead.\n\n#### Example of use with non-default set of plugins\n\n`package.json`\n\n```json\n{\n  \"release\": {\n    \"monorepo\": {\n      \"analyzeCommits\": {\n        \"format\": \"atom\"\n      },\n      \"generateNotes\": \"myNotesGenerator\"\n    },\n    \"prepare\": [\"@semantic-release/npm\", \"@semantic-release/git\"],\n    \"verifyConditions\": [\"@semantic-release/git\"]\n  }\n}\n```\n\n### Performance\nNaturally, the more packages in a monorepo, the longer it takes `semantic-release` to run against all of them. If total runtime becomes a problem, consider the following optimization:\n\n#### Reduce expensive network calls (50%+ runtime reduction)\nBy default, `semantic-release`'s `verifyConditions` plugin configuration contains `@semantic-release/npm` and `@semantic-release/github`. These two plugins each make a network call to verify that credentials for the respective services are properly configured. When running in a monorepo, these verifications will be redundantly repeated for each and every package, greatly contributing to overall runtime. Optimally, we'd only want make these verification calls one time.\n\nBy moving these plugins to the `verifyRelease` configuration, they will only run if `semantic-release` determines a release is to be made for a given package (at a time when the given verifications are actually relevant). Likely, most times `semantic-release` is run over a monorepo, only a small subset of all packages trigger releases.\n\nNOTE: To allow for dynamic code, this example defines the release configuration in [`.releaserc.js`](https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/configuration.md#configuration) instead of inside of `package.json`.\n\n```js\nmodule.exports = {\n  verifyConditions: [],\n  verifyRelease: ['@semantic-release/npm', '@semantic-release/github']\n    .map(require)\n    .map(x => x.verifyConditions),\n};\n```\n\n### Advanced\n\nThe set of `semantic-release-monorepo` plugins wrap the default `semantic-release` workflow, augmenting it to work with a monorepo.\n\n#### analyzeCommits\n\n* Filters the repo commits to only include those that touched files in the given monorepo package.\n\n#### generateNotes\n\n* Filters the repo commits to only include those that touched files in the given monorepo package.\n\n* Maps the `version` field of `nextRelease` to use the [monorepo git tag format](#how). The wrapped (default) `generateNotes` implementation uses `version` as the header for the release notes. Since all release notes end up in the same Github repository, using just the version as a header introduces ambiguity.\n\n#### tagFormat\n\nPre-configures the [`tagFormat` option](https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/configuration.md#tagformat) to use the [monorepo git tag format](#how).\n\nIf you are using Lerna, you can customize the format using the following command:\n\n```\n\"semantic-release\": \"lerna exec --concurrency 1 -- semantic-release -e semantic-release-monorepo --tag-format='${LERNA_PACKAGE_NAME}-v\\\\${version}'\"\n```\n\nWhere `'${LERNA_PACKAGE_NAME}-v\\\\${version}'` is the string you want to customize.  \nBy default it will be `<PACKAGE_NAME>-v<VERSION>` (e.g. `foobar-v1.2.3`).\n","readmeFilename":"README.md"}