{"id":27329489,"url":"https://github.com/zgeoff/yarks","last_synced_at":"2026-02-14T09:07:55.119Z","repository":{"id":57169714,"uuid":"196144103","full_name":"zgeoff/yarks","owner":"zgeoff","description":"CLI that automates the process of releasing NPM packages using Yarn v2","archived":false,"fork":false,"pushed_at":"2019-10-10T08:09:45.000Z","size":42782,"stargazers_count":10,"open_issues_count":33,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-29T10:17:48.258Z","etag":null,"topics":["berry","changelog-generator","npm-publish","semantic-versioning","workspaces","yarn"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zgeoff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-10T06:21:41.000Z","updated_at":"2023-03-08T22:22:36.000Z","dependencies_parsed_at":"2022-09-11T02:31:25.649Z","dependency_job_id":null,"html_url":"https://github.com/zgeoff/yarks","commit_stats":null,"previous_names":["zgeoff/yarks"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/zgeoff/yarks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgeoff%2Fyarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgeoff%2Fyarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgeoff%2Fyarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgeoff%2Fyarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zgeoff","download_url":"https://codeload.github.com/zgeoff/yarks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgeoff%2Fyarks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29441189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T07:24:13.446Z","status":"ssl_error","status_checked_at":"2026-02-14T07:23:58.969Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["berry","changelog-generator","npm-publish","semantic-versioning","workspaces","yarn"],"created_at":"2025-04-12T12:51:12.379Z","updated_at":"2026-02-14T09:07:55.104Z","avatar_url":"https://github.com/zgeoff.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :package: yarks\n\n\u003e automated package version management and publishing workflow for Yarn v2\n\u003e (Berry) projects\n\n`yarks` aims to fill the gap left by\n[`semantic-release`](https://github.com/semantic-release/semantic-release) when\nusing [Yarn v2 (Berry)](https://yarnpkg.github.io/berry/), automating a \"common\"\npackage release workflow that is compatible with both single package\nrepositories and monorepos that are powered by Yarn's\n[workspaces](https://yarnpkg.github.io/berry/features/workspaces).\n\n## :zap: Quick Start\n\nTo quickly see how `yarks` would release your current project:\n\n```shell\nyarn dlx @yarks/cli release-workspaces\n```\n\nFor ongoing usage, it's recommended you add `yarks` to your dependencies and run\nit from there:\n\n```shell\nyarn add @yarks/cli --dev\nyarn release-workspaces\n```\n\nWhen releasing, `yarks` expects the following environment variables to be set:\n\n```shell\nexport NPM_TOKEN=\"your NPM token for publishing\"\nexport GITHUB_TOKEN=\"your GitHub token with push access to your project's repo\"\nexport GIT_AUTHOR_NAME=\"the name used to author the release commits\"\nexport GIT_AUTHOR_EMAIL=\"the email used to author the release commits\"\n```\n\nBy default, `yarks` will only release packages when ran inside a CI environment.\nTo release locally, this behaviour can be mimiced by setting your `CI`\nenvironment variable to `true`:\n\n```shell\nexport CI=true\nyarn release-workspaces\n```\n\n## :question: Why yarks?\n\n`yarks` automates your release workflow:\n\n- Processes your commits using\n  [`conventional-changelog`](https://github.com/conventional-changelog/conventional-changelog)\n- Writes release notes to your workspaces' `CHANGELOG.md`\n- Bumps your workspaces' versions following the\n  [semantic versioning](https://semver.org/) specification\n- Publishes your workspace package updates to the NPM registry\n- Commits your new version and pushes it back to your git repository\n\n### :thinking: Why not `semantic-release`?\n\nWhile `semantic-release` _can_ be used with any package manager in any\nrepository configuration, there are\n[caveats](https://github.com/semantic-release/semantic-release/issues/193) when\nused in conjunction with Yarn workspaces that require\n[brittle](https://github.com/Updater/semantic-release-monorepo)\n[hacks](https://github.com/qiwi/semantic-release-monorepo-hooks)\n[and](https://github.com/atlassian/lerna-semantic-release)\n[workarounds](https://github.com/dhoulb/multi-semantic-release), all of which\nare incompatible with Yarn v2. `yarks` is specifically built to address these\ncaveats and offer a robust solution that treats Yarn v2 \u0026 workspaces as\nfirst-class citizens.\n\n### :microscope: What problems does `yarks` solve?\n\nWhen working in a monorepo, a reliable release strategy requires centralized\ncoordination to ensure workspaces that depend on sibling workspaces are queued\nfor release as needed, and all workspaces are evaluated before final versions\nare applied and the release process begins.\n\nIf workspaces are simply processed and released sequentially, workspaces that\ndepend on sibling workspaces may not be released when they should be, or if they\n_are_ released, may depend on the incorrect versions of sibling workspaces,\npotentially introducing errors that would likely be missed by your tests.\n\n### :gem: What makes `yarks` different?\n\nRather than shoehorning Yarn workspaces into another `semantic-release`-based\nworkaround, `yarks` addresses the aforementioned issues, avoids any form of\nbrittle integration and uses it's own release strategy, and interfaces with Yarn\nitself. The initial goal is to create a _reliable_ tool that's been designed\nwith intention and tailored to the problem, rather providing another short-term\nworkaround.\n\n### :clipboard: Release Strategy\n\nThe process begins by collating workspace and git metadata to determine the\nrelease strategy:\n\n1. Create a list of workspaces including the root of the project, allowing usage\n   with single package repositories and workspace-based monorepos\n2. Filter out workspaces that are flagged as `private`\n3. For each workspace, find the latest git tag that match the pattern\n   `package-name@x.x.x` that's available, if any\n4. Parse the commits that modified each workspace since the last release (or the\n   first commit if there is no previous release) using\n   [`conventional-changelog`](https://github.com/conventional-changelog/conventional-changelog)\n   and determine what type of release is required, if any\n5. Check if each workspace's workspace dependencies have changed, and determine\n   additional releases as required\n6. For each release required, log the release type, new version, and the\n   relevant changes\n7. If on CI, increment workspace versions as needed\n\nWhen all workspaces have been processed, if we are executing in a CI\nenvironment, release each workspace sequentially:\n\n1. Ammend or write a `CHANGELOG.md` to the workspace\n2. Publish the workspace to the package registry\n3. Commit and tag the workspace, then push the changes to your remote repository\n4. Publish a GitHub release\n\n## :telescope: Project Goals\n\nAlthough `yarks` is currently a simplistic release automation tool, it's roadmap\nis positioned towards maturing into a lightweight and flexible Yarn workspaces\ntask runner. At a high level, the development milestones look like:\n\n1. **Release automation**: serves as a drop in replacement for\n   `semantic-release` that accounts for monorepo nuances, with 'essentials' such\n   as changelog generation, semantic versioning, and package publishing\n2. **Plugin driven**: the initial release strategy is extracted to optional\n   plugins to be used via a streamlined core API and CLI, similar to\n   `semantic-release`'s current architecture\n3. **Generic task running**: expansion of the core API, CLI, and plugins to\n   facilitate generic task execution with access to workspace related context\n   and convenience APIs\n\n## :hammer_and_wrench: Contributing\n\n### :speech_balloon: Code of Conduct\n\n`yarks` has adopted a [Code of Conduct](./CODE_OF_CONDUCT.md) that we expect\nproject participants to adhere to. TODO\n\n### :book: Contributing Guide\n\nRead the [contributing guide](./CONTRIBUTING.md) to learn about the development\nprocess, how to propose bug fixes and improvements, and how to build and test\nyour changes to `yarks`\n\n## :scroll: License\n\nAll `yarks` related packages are [MIT licensed](./LICENSE).\n\n## :books: Prior Art\n\n- [`semantic-release`](https://github.com/semantic-release/semantic-release)\n- [`lerna-semantic-release`](https://github.com/atlassian/lerna-semantic-release)\n- [`semantic-release-monorepo`](https://github.com/Updater/semantic-release-monorepo)\n- [`semantic-release-monorepo-hooks`](https://github.com/qiwi/semantic-release-monorepo-hooks)\n- [`multi-semantic-release`](https://github.com/dhoulb/multi-semantic-release)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzgeoff%2Fyarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzgeoff%2Fyarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzgeoff%2Fyarks/lists"}