{"id":13532543,"url":"https://github.com/hfour/wsrun","last_synced_at":"2025-04-01T21:30:41.613Z","repository":{"id":28004506,"uuid":"111136511","full_name":"hfour/wsrun","owner":"hfour","description":"Command runner for Yarn workspaces. Dependency aware.","archived":false,"fork":false,"pushed_at":"2024-05-04T21:57:58.000Z","size":640,"stargazers_count":516,"open_issues_count":24,"forks_count":31,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-22T23:01:59.126Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/hfour.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-11-17T18:19:12.000Z","updated_at":"2025-02-27T22:13:23.000Z","dependencies_parsed_at":"2024-09-26T16:39:33.539Z","dependency_job_id":null,"html_url":"https://github.com/hfour/wsrun","commit_stats":{"total_commits":172,"total_committers":23,"mean_commits":7.478260869565218,"dds":"0.41279069767441856","last_synced_commit":"3c49f75d7aedb17f289e45440cec8659864b0e1f"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfour%2Fwsrun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfour%2Fwsrun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfour%2Fwsrun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfour%2Fwsrun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hfour","download_url":"https://codeload.github.com/hfour/wsrun/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246712914,"owners_count":20821817,"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-08-01T07:01:11.722Z","updated_at":"2025-04-01T21:30:41.273Z","avatar_url":"https://github.com/hfour.png","language":"TypeScript","readme":"# Workspace script runner\n\nRun npm scripts or custom commands in a yarn workspace\n\n### Usage:\n\n```\nwsrun [options] -c \u003ccommand\u003e [\u003carg1\u003e \u003carg2\u003e ...]\n\nMode (choose one):\n  --parallel, -a  Fully parallel mode (default)                                               [boolean]\n  --stages, -t    Run in stages: start with packages that have no deps                        [boolean]\n  --serial, -s    Same as \"stages\" but with no parallelism at the stage level                 [boolean]\n\nPackage Options:\n  --recursive, -r  Execute the same script on all of its dependencies, too                    [boolean]\n  --package, -p    Run only for packages matching this glob. Can be used multiple times.        [array]\n  --changedSince   Runs commands in packages that have changed since the provided source control\n                   branch.                                                                     [string]\n\nMisc Options:\n  --if                   Run main command only if this condition runs successfully\n  --ifDependency         Run main command only if packages dependencies passed the condition \n                         (not available in parallel mode)                                     [boolean]\n  --fast-exit, -e        If at least one script exits with code \u003e 0, abort                                                       [boolean]\n  --collect-logs, -l     Collect per-package output and print it at the end of each script    [boolean]\n  --no-prefix            Don't prefix output                                                  [boolean]\n  --rewrite-paths        Rewrite relative paths in the standard output, by prepending the \n                         \u003croot_folder\u003e/\u003cpackage_name\u003e.                                        [boolean]\n  --bin                  The program to pass the command to                                    [string] \n  --done-criteria        Consider a process \"done\" when an output line matches the specified RegExp\n  --exclude, -x          Skip running the command for that package                             [string]\n  --exclude-missing, -m  Skip packages which lack the specified command in the scripts section\n                         of their package.json                                                [boolean]\n  --report               Show an execution report once the command has finished in each \n                         package                                                              [boolean]\n\nOther Options:\n  --help             Show help                                                                [boolean]\n  --version          Show version number                                                      [boolean]\n  -c                 Denotes the end of the package list and the beginning of the command. \n                     Can be used instead of \"--\"                                              [boolean]\n  --revRecursive     Include all dependents of the filtered packages. Runs after resolving \n                     the other package options.                                               [boolean]\n  --prefix           Prefix output with package name                                          [boolean]\n  --concurrency, -y  Maximum number of commands to be executed at once                         [number]\n\n```\n\n### Examples:\n\n`yarn wsrun watch` will run `yarn watch` on every individual package, in parallel.\n\n`yarn wsrun --stages build` will build all packages, in stages, starting from those that don't depend on other packages.\n\n#### Specific packages:\n\n`yarn wsrun -p planc -r watch` will watch planc and all of its dependencies.\n\n`yarn wsrun -p planc -c watch` will watch planc only. Note that `-c` is passed here explicitly to\ndenote the beginning of the command. This is needed because `-p` can accept multiple packages. (`-c`\ncan also be substituted with `--` but that generates warnings in yarn)\n\n`yarn wsrun -p 'app-*-frontend' -r watch` will watch all packages matching the glob\n`'app-*-frontend'` and their dependencies. Globstar and extglobs are supported. Make sure to pass\nthe option quoted to prevent bash from trying to expand it!\n\n`yarn wsrun -p h4zip planc -c test` - run tests for both `h4zip` and `planc\n\n`yarn wsrun -p planc --exclude planc -r watch` will watch all of planc's dependencies but not planc\n\n`yarn wsrun -p h4zip -r --stages build` will build all deps of h4zip, in order, then build h4zip\n\n`yarn wsrun -p planc --stages --done-criteria='Compilation complete' -r watch` will watch planc deps,\nin order, continuing when command outputs a line containing \"Compilation complete\"\n\n`yarn wsrun --exclude-missing test` will run the test script only on packages that have it\n\n`yarn wsrun --changedSince --exclude-missing test` will run the test script only on packages that have c\nhanged since master branch and have `test` command\n\n#### Additional arguments to scripts\n\nIf you want to pass additional arguments to the command you can do that by adding them after the\ncommand:\n\n`yarn wsrun -r --stages build -p tsconfig.alternative.json` - build all packages in stages with\nand pass an alternative tsconfig to the build script\n\n#### Commands not in the scripts field\n\nWhen `--skip-missing` is not used, you can pass a command that doesn't exist in the scripts field:\n\n`yarn wsrun -r --stages tsc -p tsconfig.alternative.json` - run tsc for all packages with an alternative tsconfig\n\n#### Conditional execution\n\nConditional execution is supported with `--if` and `--ifDependency`\n\nExamples\n\n`yarn wsrun --stages --if build-needed build` - for each package it will first try `yarn wsrun build-needed` and only if the exit code is zero (success) it will run `yarn wsrun build`\n\n`yarn wsrun --stages --if build-needed --ifDependency build` - it will run `build` for each package in stages, if either the package's own condition command was success, or any of the dependencies had a successful condition.\n","funding_links":[],"categories":["仓库管理工具","TypeScript","📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhfour%2Fwsrun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhfour%2Fwsrun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhfour%2Fwsrun/lists"}