{"id":20809567,"url":"https://github.com/leothorp/yarn-exclude","last_synced_at":"2026-05-04T17:32:24.797Z","repository":{"id":38390212,"uuid":"340836501","full_name":"leothorp/yarn-exclude","owner":"leothorp","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-05T01:06:58.000Z","size":160,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-19T00:34:31.474Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leothorp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-21T06:44:55.000Z","updated_at":"2023-03-10T08:03:06.000Z","dependencies_parsed_at":"2022-08-25T05:10:34.094Z","dependency_job_id":null,"html_url":"https://github.com/leothorp/yarn-exclude","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leothorp%2Fyarn-exclude","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leothorp%2Fyarn-exclude/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leothorp%2Fyarn-exclude/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leothorp%2Fyarn-exclude/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leothorp","download_url":"https://codeload.github.com/leothorp/yarn-exclude/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243154902,"owners_count":20245012,"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":[],"created_at":"2024-11-17T20:14:27.441Z","updated_at":"2026-05-04T17:32:19.776Z","avatar_url":"https://github.com/leothorp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yarn-exclude\n\n## \\*\\* Note: This package isn't actively maintained- I wouldn't recommend using it for anything other than experimentation. \\*\\*\n\nTool for excluding specific workspaces when installing project packages in a yarn 1 monorepo.\n\n### Installation\n\n```\n  npm i -g yarn-exclude\n```\n\nor to just start using without the global install:\n\n```\n  npx yarn-exclude --exclude package-name\n```\n\n### Overview\n\nThis library provides a way to exclude packages in a yarn monorepo when running `yarn install`, only installing dependencies for the desired workspaces. The main intended use case is for easily deploying a single workspace to a CI environment.\n\nThis is accomplished by temporarily modifying package.json to only contain the non-excluded workspaces before running `yarn install` (essentially simulating what would happen if the excluded packages were never present in the first place).\n\n### Usage\n\nIf we have the following `workspaces` config:\n\n```\n  \"workspaces\": {\n    \"packages\": [\n      \"packages/one\",\n      \"packages/two\",\n      \"packages/three\"\n    ],\n    \"nohoist\": [\"react\"]\n  },\n```\n\nAnd we run:\n\n```\n//bypass interactive prompt for CI\nNPM_CONFIG_YES=true npx yarn-exclude --exclude one,two\n```\n\nThe result is equivalent to having a `workspaces` config of:\n\n```\n  \"workspaces\": {\n    \"packages\": [\n      \"packages/three\"\n    ],\n    \"nohoist\": [\"react\"]\n  },\n```\n\nand running `yarn install`.\n\nGlob and array notation for `workspaces` will also work.\n\n```\n  \"workspaces\": [\n      \"packages/*\"\n  },\n```\n\n### CLI Options\n\n`-e --exclude \u003cexcluded packages\u003e` Comma separated list of excluded package  \ndirnames. (Required)\n\n`--cwd \u003cdirectory\u003e` workspace root directory. (Default:  \ncurrent working directory)\n\n`--modify` Leave yarn.lock and package.json modifications in place after the operation completes. May be useful in some CI environments.\n\n`-V, --version` output the version number\n\n`-h, --help` display help for command options\n\n### Caveats\n*   Passing additional CLI options to the underlying `yarn install` is not currently supported.\n*   `yarn-exclude` will not check if the excluded workspace is actually depended upon or not by any of the included ones; you'll have to make sure of that yourself before running this.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleothorp%2Fyarn-exclude","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleothorp%2Fyarn-exclude","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleothorp%2Fyarn-exclude/lists"}