{"id":21474922,"url":"https://github.com/wayfair/one-version","last_synced_at":"2025-06-20T03:06:05.436Z","repository":{"id":40386096,"uuid":"486988298","full_name":"wayfair/one-version","owner":"wayfair","description":"Implementation of Google’s One Version Rule for JS monorepos","archived":false,"fork":false,"pushed_at":"2025-05-19T20:53:59.000Z","size":24147,"stargazers_count":24,"open_issues_count":5,"forks_count":4,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-27T10:01:21.310Z","etag":null,"topics":["dependencies","hacktoberfest","javascript","js","monorepo","node","pnpm","pnpm-workspaces","yarn","yarn-workspaces"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@wayfair/one-version","language":"JavaScript","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/wayfair.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-29T13:46:41.000Z","updated_at":"2024-09-06T02:15:55.000Z","dependencies_parsed_at":"2023-02-10T12:45:46.337Z","dependency_job_id":"df5c1a5f-ee77-4808-a232-8d0e56581464","html_url":"https://github.com/wayfair/one-version","commit_stats":{"total_commits":30,"total_committers":8,"mean_commits":3.75,"dds":0.7,"last_synced_commit":"af5559a7566d85eb3ae2b84973c7c7937313791a"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":"wayfair-incubator/oss-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayfair%2Fone-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayfair%2Fone-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayfair%2Fone-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayfair%2Fone-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wayfair","download_url":"https://codeload.github.com/wayfair/one-version/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wayfair%2Fone-version/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258032328,"owners_count":22639628,"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":["dependencies","hacktoberfest","javascript","js","monorepo","node","pnpm","pnpm-workspaces","yarn","yarn-workspaces"],"created_at":"2024-11-23T10:34:33.944Z","updated_at":"2025-06-20T03:06:00.420Z","avatar_url":"https://github.com/wayfair.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n[![Release](https://img.shields.io/github/v/release/wayfair/one-version?display_name=tag)](CHANGELOG.md)\n[![license: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](CODE_OF_CONDUCT.md)\n[![Maintainer](https://img.shields.io/badge/Maintainer-Wayfair-7F187F)](https://wayfair.github.io)\n\n\u003c/div\u003e\n\n\u003ch2 align=\"center\"\u003e@wayfair/one-version\u003c/h2\u003e\n\u003cdiv align=\"center\" \u003e\n\u003ci\u003eOne Version to rule them all, One Version to find them,\n\nOne Version to bring them all, and in the darkness bind them.\u003csup\u003e1\u003c/sup\u003e\n\u003c/i\u003e\n\n\u003c/div\u003e\n\n\u003ch3 align=\"center\"\u003eOpinionated Monorepo Dependency Management CLI\u003c/h3\u003e\n\n**🚨 Enforcement**: Require all workspaces in a monorepo to conform to the [One-Version rule](#one-version-rule).\n\n**📦 Supports multiple package managers**: Support for `yarn` classic, `yarn` berry, and `pnpm` workspaces.\n\n**💥 Coordinated upgrades**: Coming Soon!\n\n---\n\n## Table Of Contents\n\n- [One-Version Rule](#one-version-rule)\n- [Getting Started](#getting-started)\n- [Configuration](#configuration)\n- [Contributing](#contributing)\n- [License](#license)\n\n## One-Version Rule\n\nThis package implements a version of Google's `One-Version Rule`:\n\n\u003e For every dependency in [a] repository, there must be only one version of that dependency to choose.\u003csup\u003e2\u003c/sup\u003e\n\nPlease refer to the [implementation notes](ONE-VERSION.md) for our specific evaluation criteria.\n\nThere is some overlap between this tool and [experimental yarn constraints](https://yarnpkg.com/features/constraints), without requiring use of a particular package manager.\n\n## Getting Started\n\nInstall `@wayfair/one-version` at the workspace root using yarn:\n\n```bash\nyarn add --dev -w @wayfair/one-version\n```\n\nOr pnpm:\n\n```bash\npnpm add -save-dev -w @wayfair/one-version\n```\n\nAdd the following section to your package.json:\n\n```json\n{\n  \"scripts\": {\n    \"one-version:check\": \"one-version check\"\n  }\n}\n\n```\n\nRun `yarn one-version:check` or `pnpm run one-version:check`.\n\nIf the repo is compliant, the tool will print this message:\n\n```text\n✨ One Version Rule Success - found no version conflicts!\n```  \n\nIf the repo is not compliant, you will see a version of this message:\n\n```text\n🚫 One Version Rule Failure - found multiple versions of the following dependencies:\n\nprettier\n  2.1.2\n    dev: @wayfair/app-a, @wayfair/app-b\n  ^2.3.2\n    dev: @wayfair/app-c\n  2.2.1\n    dev: @wayfair/lib-a\n```\n\n## Configuration\n\nThe behavior of `@wayfair/one-version` can be configured by a `one-version.config.json` at the root of the repository.\n\n### Supported Options\n\n#### overrides (optional, object)\n\nOverrides lets workspaces opt out of the one-version rule. This may be useful while performing major upgrades.\n\n### Examples\n\n```json\n{\n  \"overrides\": {\n    \"dependency\": {\n      \"versionSpecifier\": [\"workspaceA\", \"workspaceB\"]\n    }\n  }\n}\n```\n\nFor example, the below config will allow `app-A` and `lib-L` to specify `react@^16.9`, even if the rest of the repo specifies `react@^17`.\n\n```json\n{\n  \"overrides\": {\n    \"react\": {\n      \"^16.9\": [\"app-A\", \"lib-L\"]\n    }\n  }\n}\n```\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated** 💜. For contributing guidelines, please see [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## License\n\nDistributed under the `MIT` License. See `LICENSE` for more information.\n\n---\n\n`1`: J.R.R. Tolkien, 1954. Mostly.\n\n`2`: [Software Engineering At Google](https://abseil.io/resources/swe_at_google.2.pdf) - Winters, Manshreck and Wright, 2020, p. 341\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwayfair%2Fone-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwayfair%2Fone-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwayfair%2Fone-version/lists"}