Docgen Example
Option | Type | Description |
---|---|---|
--dry-run | boolean | Run without actually making modifications or destructive operations |
--verbosity, -v | count , default: 2 | Set the verbosity of the script output. Increase verbosity with -vvv , -vvvv , or -vvvvv . Reduce verbosity with -v or --quiet |
--version | boolean | Show the oneRepo CLI version. |
Advanced options
Option | Type | Description |
---|---|---|
--help, -h | boolean | Show this help screen |
--quiet, -q | boolean | Silence all output from the logger. Effectively sets verbosity to 0. |
--show-advanced | boolean | Pair with --help to show advanced options. |
--skip-engine-check | boolean | Skip the engines check, which ensures the current Node.js version is within the expected range. |
one build
Section titled one buildBuild public Workspaces using esbuild.
Option | Type | Description |
---|---|---|
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . |
--all, -a | boolean | Run across all Workspaces |
--staged | boolean | Use files on the git stage to calculate affected files or Workspaces. When unset or --no-staged , changes will be calculated from the entire branch, since its fork point. |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description |
---|---|---|
--from-ref | string | Git ref to start looking for affected files or Workspaces |
--through-ref | string | Git ref to start looking for affected files or Workspaces |
Build all Workspaces.
Build the graph
Workspace only.
Build the graph
, cli
, and logger
Workspaces.
one change
Section titled one changeAliases: one changes
, one changesets
Manage changes and changesets for publishable Workspaces.
one change add
Section titled one change addAliases: one change
Add changesets for modified Workspaces.
This command will prompt for appropriate Workspace(s), prompt for the release type, and request a descriptive change entry. Once all information has been entered, a change entry file will be created in the appropriate Workspace(s). Be sure to commit these files â they will be used later when you are ready to version and publish Workspaces to the registry for use outside of the Monorepo.
Option | Type | Description |
---|---|---|
--add | boolean , default: true | Add the modified package.json files to the git stage for committing. |
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . |
--all, -a | boolean | Run across all Workspaces |
--type | "major" , "minor" , "patch" | Provide a semantic version bump type. If not given, a prompt will guide you through selecting the appropriate type. |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description |
---|---|---|
--filenames | "hash" , "human" , default: "human" | Filename generation strategy for change files. If 'human' , ensure you have the human-id package installed. |
--from-ref | string | Git ref to start looking for affected files or Workspaces |
--prompts | "guided" , "semver" , default: "guided" | Change the prompt question & answer style when adding change entries. |
--staged | boolean | Use files on the git stage to calculate affected files or Workspaces. When unset or --no-staged , changes will be calculated from the entire branch, since its fork point. |
--through-ref | string | Git ref to start looking for affected files or Workspaces |
one change migrate
Section titled one change migrateMigrate from Changesets to oneRepo changes.
Advanced options
Option | Type | Description |
---|---|---|
--filenames | "hash" , "human" , default: "human" | Filename generation strategy for change files. If 'human' , ensure you have the human-id package installed. |
one change publish
Section titled one change publishAliases: one change release
Publish all Workspaces with versions not available in the registry.
This command is safe to run any time. By default, only Workspaces that have previously gone through the one change version
process will end up being published. Use --all
for all Workspaces or --workspaces <workspace-name>
to specify individual Workspaces to try publishing.
For each Workspace, the registry will be queried first to ensure the current version in the Workspace does not yet exist in the registry. If a version does exist, the Workspace will be skipped.
The pre-publish
and post-publish
task lifecycles will be run during this command for each Workspace published. These Task lifecycles are roughly equivalent to the prepack
and postpack
provided by npm, Yarn, and pnpm.
Option | Type | Description |
---|---|---|
--all, -a | boolean | Run across all Workspaces |
--otp | boolean | Set to true if your publishes require an OTP for NPM. |
--skip-auth | boolean | Skip auth checks. This may be necessary for some internal registries using PATs or tokens. |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description |
---|---|---|
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . |
--allow-dirty | boolean | Bypass checks to ensure there are no un-committed changes. |
--from-ref | string | Git ref to start looking for affected files or Workspaces |
--staged | boolean | Use files on the git stage to calculate affected files or Workspaces. When unset or --no-staged , changes will be calculated from the entire branch, since its fork point. |
--through-ref | string | Git ref to start looking for affected files or Workspaces |
Publish the api
Workspace and its dependencies, if necessary.
Attempt to publish all non-private Workspaces.
one change show
Section titled one change showPreview the next versions and changelogs for Workspaces.
Option | Type | Description |
---|---|---|
--all, -a | boolean | Run across all Workspaces |
--format | "json" , "plain" , default: "plain" | Choose how the results will be returned. |
--workspaces, -w | array | List of Workspace names to run against |
one change snapshot
Section titled one change snapshotAliases: one change snap
Publish a snapshot pre-release.
Periodically you may want to publish a snapshot release â something that needs testing from the registry, but should not update the current version nor be made widely available. For these cases, use --snapshot
and versions will be published in the format 0.0.0-{tag}-{hash}
, where {hash}
is a short version of the current git sha. By appending a prerelease to version 0.0.0
, discoverability is greatly reduced.
Option | Type | Description |
---|---|---|
--all, -a | boolean | Run across all Workspaces |
--allow-dirty | boolean | Bypass checks to ensure there are no un-committed changes. |
--otp | boolean | Prompt for one-time password before publishing to the registry |
--reset | boolean , default: true | Reset package.json changes before exiting. Use --no-reset to disable. |
--tag | string , default: "prerelease" | Distribution tag to apply when publishing the pre-release. |
--workspaces, -w | array | List of Workspace names to run against |
one change verify
Section titled one change verifyAliases: one change required
Ensure there are change entries for every modified public Workspace.
Add this to your pre-commit or pre-merge task lifecycles to ensure that changes to public & publishabled Workspaces are always accompanied with change entries.
one change version
Section titled one change versionUpdate version numbers for publishable Workspaces
Option | Type | Description |
---|---|---|
--all, -a | boolean | Run across all Workspaces |
--allow-dirty | boolean | Bypass checks to ensure there are no un-committed changes. |
--prerelease, --pre, --pre-release | string | Create a pre-release using the specified identifier. |
--workspaces, -w | array | List of Workspace names to run against |
Create a prerelease for the next version the form of 1.2.3-alpha.0
.
one codeowners
Section titled one codeownersAliases: one owners
Manage codeowners
one codeowners show
Section titled one codeowners showShow the code owners for files and Workspaces.
Option | Type | Description |
---|---|---|
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . |
--all, -a | boolean | Run across all Workspaces |
--files, -f | array | Determine Workspaces from specific files |
--format | "plain" , "json" , default: "plain" | Choose how the results will be returned. |
--list | boolean | Just list the owners without the files |
--staged | boolean | Use files on the git stage to calculate affected files or Workspaces. When unset or --no-staged , changes will be calculated from the entire branch, since its fork point. |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description | Required |
---|---|---|---|
--from-ref | string | Git ref to start looking for affected files or Workspaces | |
--provider | "github" , "gitlab" , "gitea" , "bitbucket" | Codeowner provider determines where the CODEOWNERS file(s) will be written. | â |
--through-ref | string | Git ref to start looking for affected files or Workspaces |
Show the codeowners for currently modified files.
List the unique set of codeowners given an input workspace-name
.
one codeowners sync
Section titled one codeowners syncSync code owners from Workspace configurations to the repositoryâs CODEOWNERS file.
This command will sync each Workspaceâs codeowners
to the repositoryâs configured vcs.provider
compatible code owners file.
- github:
.github/CODEOWNERS
- gitlab:
.gitlab/CODEOWNERS
- gitea:
.gitea/CODEOWNERS
- bitbucket:
CODEOWNERS
Option | Type | Description |
---|---|---|
--add | boolean | Add the updated CODEOWNERS file to the git stage. |
Advanced options
Option | Type | Description | Required |
---|---|---|---|
--provider | "github" , "gitlab" , "gitea" , "bitbucket" | Codeowner provider determines where the CODEOWNERS file(s) will be written. | â |
one codeowners verify
Section titled one codeowners verifyVerify the CODEOWNERS file is up to date and unmodified.
Advanced options
Option | Type | Description | Required |
---|---|---|---|
--provider | "github" , "gitlab" , "gitea" , "bitbucket" | Codeowner provider determines where the CODEOWNERS file(s) will be written. | â |
one dependencies
Section titled one dependenciesAliases: one dependency
, one deps
, one dep
Safely manage Workspace dependencies across your repository.
one dependencies add
Section titled one dependencies addAdd dependencies to Workspaces.
If a version is not provided with the command-line input, this command will look for currently installed versions of the requested dependencies throughout all Workspaces within the Workspace Graph. If only one version is found, it will be used, regardless of the --mode
provided.
If multiple versions of the requested dependencies are found in the Workspace Graph, a prompt will be presented to choose the appropriate version.
Otherwise, the latest version will be requested from the registry.
Option | Type | Description |
---|---|---|
--all, -a | boolean | Run across all Workspaces |
--dedupe | boolean , default: true | Deduplicate dependencies across the repository after install is complete. |
--dev, -d | array | Add dependencies for development purposes only. |
--mode | "strict" , "loose" , "off" , default: "loose" | Version selection mode. Use strict to use strict version numbers, loose to use caret (^ ) ranges, and off for nothing specific. |
--prod, -p | array | Add dependencies for production purposes. |
--workspaces, -w | array | One or more Workspaces to add dependencies into |
Install the latest version of normalizr
from the registry, using a strict version number.
Install the latest version of normalizr
from the registry, using a caret (^
) version number range, enabling newer minor and patch releases to satisfy the dependency in the future.
Install react
as a production dependency and babel-core
as a development dependency in both workspace-a
and workspace-b
.
one dependencies remove
Section titled one dependencies removeRemove dependencies from Workspaces.
Option | Type | Description | Required |
---|---|---|---|
--all, -a | boolean | Run across all Workspaces | |
--dedupe | boolean , default: true | Deduplicate dependencies across the repository after install is complete. | |
--dependencies, -d | array | Dependency names that should be removed. | â |
--workspaces, -w | array | List of Workspace names to run against |
one dependencies verify
Section titled one dependencies verifyVerify dependencies across Workspaces.
Dependencies across Workspaces can be validated using one of the various modes:
off
: No validation will occur. Everything goes.loose
: Reused third-party dependencies will be required to have semantic version overlap across unique branches of the Graph.strict
: Versions of all dependencies across each discrete Workspace dependency tree must be strictly equal.
Option | Type | Description |
---|---|---|
--all, -a | boolean | Run across all Workspaces |
--mode | "strict" , "loose" , "off" , default: "loose" | Version selection mode. Use strict to use exact version matches, loose to accept within defined ranges (^ or ~ range), and off for no verification. |
--workspaces, -w | array | List of Workspace names to run against |
one docgen
Section titled one docgenGenerate documentation for the oneRepo cli.
Help documentation should always be easy to find. This command will help automate the creation of docs for this command-line interface. If you are reading this somewhere that is not your terminal, there is a very good chance that this command was already run for you!
Add this command to your one Repo tasks on pre-commit to ensure that your documentation is always up-to-date.
Option | Type | Description |
---|---|---|
--add | boolean | Add the output file to the git stage |
--format | "markdown" , "json" , default: "markdown" | Output format for documentation |
--heading-level | number | Heading level to start at for Markdown output |
--out-file | string , default: "./docs/src/content/docs/plugins/docgen/example.mdx" | File to write output to. If not provided, stdout will be used |
--out-workspace | string , default: "root" | Workspace name to write the âout-file to |
--safe-write | boolean , default: true | Write documentation to a portion of the file with start and end sentinels. |
Advanced options
Option | Type | Description |
---|---|---|
--command | string | Start at the given command, skip the root and any others |
--use-defaults | boolean | Use the oneRepo default configuration. Helpful for generating default documentation. |
one eslint
Section titled one eslintAliases: one lint
Run eslint across files and Workspaces.
Option | Type | Description |
---|---|---|
--add | boolean | Add modified files after write to the git stage. |
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . |
--all, -a | boolean | Run across all Workspaces |
--cache | boolean , default: true | Use cache if available |
--extensions | array , default: ["ts","tsx","js","jsx","cjs","mjs","astro"] | Make ESLint check files given these extensions. |
--files, -f | array | Determine Workspaces from specific files |
--fix | boolean , default: true | Apply auto-fixes if possible |
--pretty | boolean , default: true | Control ESLintâs --color flag. |
--staged | boolean | Use files on the git stage to calculate affected files or Workspaces. When unset or --no-staged , changes will be calculated from the entire branch, since its fork point. |
--warnings, --warn | boolean , default: true | Report warnings from ESLint. |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description |
---|---|---|
--from-ref | string | Git ref to start looking for affected files or Workspaces |
--github-annotate | boolean , default: true | Annotate files in GitHub with errors when failing lint checks in GitHub Actions |
--through-ref | string | Git ref to start looking for affected files or Workspaces |
one generate
Section titled one generateAliases: one gen
Generate files, folders, and Workspaces from templates.
To create new templates add a new folder to config/templates and create a .onegen.cjs
configuration file. Follow the instructions online for more: https://onerepo.tools/core/generate/
Option | Type | Description |
---|---|---|
--type, -t | string | Template type to generate. If not provided, a list will be provided to choose from. |
Advanced options
Option | Type | Description | Required |
---|---|---|---|
--template-dir, --templates-dir | string , default: "config/templates" | Path to the templates | â |
one graph
Section titled one graphRun core Graph commands
one graph show
Section titled one graph showShow this repositoryâs Workspace Graph using an online visualizer or output Graph representations to various formats.
This command can generate representations of your Workspace Graph for use in debugging, verifying, and documentation. By default, a URL will be given to visualize your Graph online.
Pass --open
to auto-open your default browser with the URL or use one of the --format
options to print out various other representations.
Option | Type | Description |
---|---|---|
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . |
--all, -a | boolean | Run across all Workspaces |
--format, -f | "mermaid" , "plain" , "json" | Output format for inspecting the Workspace Graph. |
--open | boolean | Auto-open the browser for the online visualizer. |
--staged | boolean | Use files on the git stage to calculate affected files or Workspaces. When unset or --no-staged , changes will be calculated from the entire branch, since its fork point. |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description |
---|---|---|
--from-ref | string | Git ref to start looking for affected files or Workspaces |
--through-ref | string | Git ref to start looking for affected files or Workspaces |
--url | string , default: "https://onerepo.tools/visualize/" | Override the URL used to visualize the Graph. The Graph data will be attached the the g query parameter as a JSON string of the DAG, compressed using zLib deflate. |
Print a URL to the online visualizer for the current affected Workspace Graph.
Open the online visualizer for your full Workspace Graph.
Generate a Mermaid graph to a file, isolating just the given <workspaces...>
and those that are dependent on it.
one graph verify
Section titled one graph verifyVerify the integrity of the repoâs dependency Graph and files in each Workspace.
This command will first validate dependencies across Workspace Graph trees using the given --mode
as well as Workspace configuration file integrity using the repoâs defined JSON schema validators.
Dependencies across Workspaces can be validated using one of the various modes:
off
: No validation will occur. Everything goes.loose
: Reused third-party dependencies will be required to have semantic version overlap across unique branches of the Graph.strict
: Versions of all dependencies across each discrete Workspace dependency tree must be strictly equal.
Option | Type | Description |
---|---|---|
--mode | "strict" , "loose" , "off" , default: "loose" | Dependency overlap validation method. |
Advanced options
Option | Type | Description |
---|---|---|
--custom-schema | string , default: "config/graph-schema.ts" | Path to a custom JSON schema definition |
one hooks
Section titled one hooksManage git repository hooks
one hooks create
Section titled one hooks createCreate git hooks
Option | Type | Description |
---|---|---|
--add | boolean , default: true | Add the hooks to the git stage for committing. |
--hook | "applypatch-msg" , "pre-applypatch" , "post-applypatch" , "pre-commit" , "pre-merge-commit" , "prepare-commit-msg" , "commit-msg" , "post-commit" , "pre-rebase" , "post-checkout" , "post-merge" , "pre-receive" , "update" , "post-receive" , "post-update" , "pre-auto-gc" , "post-rewrite" , "pre-push" , "proc-receive" , "push-to-checkout" , default: ["pre-commit","post-checkout","post-merge","post-rewrite"] | The git hook to create. Omit this option to auto-create recommended hooks. |
--overwrite | boolean | Overwrite existing hooks |
Advanced options
Option | Type | Description | Required |
---|---|---|---|
--hooks-path | string | Tracked path to use for git hooks. This option is defaulted via the oneRepo root config. | â |
one hooks init
Section titled one hooks initAliases: one hooks sync
Initialize and sync git hook settings for this repository.
Advanced options
Option | Type | Description | Required |
---|---|---|---|
--hooks-path | string | Tracked path to use for git hooks. | â |
one install
Section titled one installInstall the oneRepo CLI into your environment.
Option | Type | Description |
---|---|---|
--force | boolean | Force installation regardless of pre-existing command. |
--location | string | Install location for the binary. Default location is chosen as default option for usr/bin dependent on the OS type. |
--version | string , default: "1.2.0" | Version of oneRepo to install. Defaults to the current version. |
one jest
Section titled one jestAliases: one test
Run tests using Jest.
This test commad will automatically attempt to run only the test files related to the changes in your working state. If you have un-committed changes, only those related to files that are in a modified state will be run. If there are no un-committed changes, test files related to those modified since your git merge-base will be run. By passing specific filepaths as extra passthrough arguments an argument separator (two dasshes --
), you can further restrict the tests to those files and paths.
Additionally, any other Jest CLI options can be passed as passthrough arguments as well after an argument separator (two dashes --
)
Option | Type | Description |
---|---|---|
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . |
--all, -a | boolean | Run across all Workspaces |
--inspect | boolean | Break for the the Node inspector to debug tests. |
--pretty | boolean , default: true | Control Jestâs --colors flag. |
--staged | boolean | Use files on the git stage to calculate affected files or Workspaces. When unset or --no-staged , changes will be calculated from the entire branch, since its fork point. |
--watch | boolean | Shortcut for jest --watch mode. |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description |
---|---|---|
--config | string , default: "./jest.config.js" | Path to the jest.config file, relative to the repo root. |
--from-ref | string | Git ref to start looking for affected files or Workspaces |
--passWithNoTests | boolean , default: true | Allows the test suite to pass when no files are found. See plugin configuration to disable. |
--through-ref | string | Git ref to start looking for affected files or Workspaces |
Run only tests related to modified files.
Runs jest in âwatch mode against the currently affected files.
Run Jest in watch mode against a particular file.
Pass any other Jest CLI options after the argument separator.
one prettier
Section titled one prettierAliases: one format
Format files with prettier
Option | Type | Description |
---|---|---|
--add | boolean | Add modified files after write |
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . |
--all, -a | boolean | Run across all Workspaces |
--check | boolean | Check for changes. |
--files, -f | array | Determine Workspaces from specific files |
--staged | boolean | Use files on the git stage to calculate affected files or Workspaces. When unset or --no-staged , changes will be calculated from the entire branch, since its fork point. |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description |
---|---|---|
--cache | boolean , default: true | Use Prettierâs built-in cache to determin whether files need formatting or not. |
--from-ref | string | Git ref to start looking for affected files or Workspaces |
--github-annotate | boolean , default: true | Annotate files in GitHub with errors when failing format checks in GitHub Actions. |
--through-ref | string | Git ref to start looking for affected files or Workspaces |
one tasks
Section titled one tasksRun tasks against repo-defined lifecycles. This command will limit the tasks across the affected Workspace set based on the current state of the repository.
You can fine-tune the determination of affected Workspaces by providing a --from-ref
and/or through-ref
. For more information, get help with --help --show-advanced
.
Option | Type | Description | Required |
---|---|---|---|
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . | |
--all, -a | boolean | Run across all Workspaces | |
--ignore-unstaged | boolean | Force staged-changes mode on or off. If true , task determination and runners will ignore unstaged changes. | |
--lifecycle, -c | "pre-commit" , "post-commit" , "post-checkout" , "pre-merge" , "post-merge" , "pre-push" , "build" , "pre-deploy" , "pre-publish" , "post-publish" | Task lifecycle to run. All tasks for the given lifecycle will be run as merged parallel tasks, followed by the merged set of serial tasks. | â |
--list | boolean | List found tasks. Implies dry run and will not actually run any tasks. | |
--shard | string | Shard the lifecycle across multiple instances. Format as <shard-number>/<total-shards> | |
--staged | boolean | Backup unstaged files and use only those on the git stage to calculate affected files or Workspaces. Will re-apply the unstaged files upon exit. | |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description |
---|---|---|
--from-ref | string | Git ref to start looking for affected files or Workspaces |
--ignore | array , default: ["**/README.md","**/CHANGELOG.md"] | List of filepath strings or globs to ignore when matching tasks to files. |
--through-ref | string | Git ref to start looking for affected files or Workspaces |
Shard all tasks for the pre-merge
lifecycle into 5 groups and runs the first shard.
Shard all tasks for the pre-merge
lifecycle into 5 groups and runs the third shard.
one tsc
Section titled one tscAliases: one typescript
, one typecheck
Sync TS project references
Checks for the existence of tsconfig.json
file and batches running tsc --noEmit
in each Workspace.
Option | Type | Description |
---|---|---|
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . |
--all, -a | boolean | Run across all Workspaces |
--pretty | boolean , default: true | Control TypeScriptâs --pretty flag. |
--staged | boolean | Use files on the git stage to calculate affected files or Workspaces. When unset or --no-staged , changes will be calculated from the entire branch, since its fork point. |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description |
---|---|---|
--from-ref | string | Git ref to start looking for affected files or Workspaces |
--through-ref | string | Git ref to start looking for affected files or Workspaces |
--tsconfig | string , default: "tsconfig.json" | The filename of the tsconfig to find in each Workspace. |
--use-project-references, --project-references, --project-refs | boolean , default: true | Automatically sync and use typescript project references |
one vitest
Section titled one vitestAliases: one test
Run unit tests using Vitest
This test commad will automatically attempt to run only the test files related to the changes in your git branch. By passing specific filepaths as extra passthrough arguments after two dashes (--
), you can further restrict the tests to those specific files only.
Additionally, any other Vitest CLI options can be used as passthrough arguments as well after an argument separator (two dashes --
).
Option | Type | Description |
---|---|---|
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . |
--all, -a | boolean | Run across all Workspaces |
--inspect | boolean | Break for the the Node inspector to debug tests. |
--staged | boolean | Use files on the git stage to calculate affected files or Workspaces. When unset or --no-staged , changes will be calculated from the entire branch, since its fork point. |
--watch | boolean | Shortcut for vitest --watch mode. |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description |
---|---|---|
--config | string , default: "./vitest.config.ts" | Path to the vitest.config file, relative to the repo root. |
--from-ref | string | Git ref to start looking for affected files or Workspaces |
--through-ref | string | Git ref to start looking for affected files or Workspaces |
Run only tests related to modified files.
Run vitest in âwatch mode.
Run vitest in watch mode with a particular file.
Run all tests in a given Workspace.
one workspace
Section titled one workspaceAliases: one ws
Run commands within individual Workspaces.
This enables running both custom commands as defined via the commands.directory
configuration option within each Workspace as well as commands.passthrough
aliases.
Arguments for passthrough commands meant for the underlying command must be sent after --
.
Positional | Type | Description |
---|---|---|
command | string | Command to run. |
workspace-name | string | The name or alias of a Workspace. |
one workspace docs
Section titled one workspace docsAliases: one workspace @onerepo/docs
Runs commands in the â@onerepo/docsâ Workspace.
one workspace docs astro
Section titled one workspace docs astroRun Astro directly.
one workspace docs build
Section titled one workspace docs buildBuild the documentation site for production.
one workspace docs changelogs
Section titled one workspace docs changelogsAliases: one workspace docs pull-changelogs
Update changelogs from source files
Option | Type | Description |
---|---|---|
--add | boolean | Add files to the git index |
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . |
--all, -a | boolean | Run across all Workspaces |
--files, -f | array | Determine Workspaces from specific files |
--staged | boolean | Use files on the git stage to calculate affected files or Workspaces. When unset or --no-staged , changes will be calculated from the entire branch, since its fork point. |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description |
---|---|---|
--from-ref | string | Git ref to start looking for affected files or Workspaces |
--through-ref | string | Git ref to start looking for affected files or Workspaces |
one workspace docs check
Section titled one workspace docs checkCheck Astro pages for errors.
one workspace docs collect-content
Section titled one workspace docs collect-contentGenerate docs for the oneRepo monorepo
Option | Type | Description |
---|---|---|
--add | boolean | Add files to the git index |
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . |
--all, -a | boolean | Run across all Workspaces |
--files, -f | array | Determine Workspaces from specific files |
--staged | boolean | Use files on the git stage to calculate affected files or Workspaces. When unset or --no-staged , changes will be calculated from the entire branch, since its fork point. |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description |
---|---|---|
--from-ref | string | Git ref to start looking for affected files or Workspaces |
--through-ref | string | Git ref to start looking for affected files or Workspaces |
one workspace docs start
Section titled one workspace docs startStart the Astro dev server.
one workspace docs typedoc
Section titled one workspace docs typedocGenerate typedoc markdown files for the toolchain.
Option | Type | Description |
---|---|---|
--add | boolean | Add files to the git index |
one workspace github-action
Section titled one workspace github-actionAliases: one workspace @onerepo/github-action
Runs commands in the â@onerepo/github-actionâ Workspace.
one workspace github-action build
Section titled one workspace github-action buildBuild public Workspaces using esbuild.
Option | Type | Description |
---|---|---|
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . |
--all, -a | boolean | Run across all Workspaces |
--staged | boolean | Use files on the git stage to calculate affected files or Workspaces. When unset or --no-staged , changes will be calculated from the entire branch, since its fork point. |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description |
---|---|---|
--from-ref | string | Git ref to start looking for affected files or Workspaces |
--through-ref | string | Git ref to start looking for affected files or Workspaces |
Build all Workspaces.
Build the graph
Workspace only.
Build the graph
, cli
, and logger
Workspaces.
one eslint
Section titled one eslintAliases: one lint
Run eslint across files and workspaces
Option | Type | Description |
---|---|---|
--add | boolean | Add modified files after write to the git stage. |
--affected | boolean | Select all affected Workspaces. If no other inputs are chosen, this will default to true . |
--all, -a | boolean | Run across all workspaces |
--cache | boolean , default: true | Use cache if available |
--extensions | array , default: ["ts","tsx","js","jsx","cjs","mjs","astro"] | |
--files, -f | array | Determine Workspaces from specific files |
--fix | boolean , default: true | Apply auto-fixes if possible |
--pretty | boolean , default: true | Control ESLintâs --color flag. |
--quiet | boolean | Report errors only |
--staged | boolean | Use files on the git stage to calculate affected files or Workspaces. When unset or --no-staged , changes will be calculated from the entire branch, since its fork point. |
--workspaces, -w | array | List of Workspace names to run against |
Advanced options
Option | Type | Description |
---|---|---|
--from-ref | string | Git ref to start looking for affected files or workspaces |
--github-annotate | boolean , default: true | Annotate files in GitHub with errors when failing lint checks in GitHub Actions |
--show-advanced | boolean | Pair with --help to show advanced options. |
--through-ref | string | Git ref to start looking for affected files or workspaces |