title | description | sidebar | pagefind | tableOfContents | ||||
---|---|---|---|---|---|---|---|---|
Docgen Example |
Automatically generated documentation from the oneRepo CLI, straight to easy to read Markdown. |
|
false |
|
:::note The following content is auto-generated using the official documentation plugin directly from oneRepo's internal configuration itself. :::
{/* start-auto-generated-from-cli /} {/ @generated SignedSource<<08893ba03b34cdb9ab05787ac817a439>> */}
one <command> [options...]
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. |
Build public Workspaces using esbuild.
one build [options...]
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.
one build
Build the graph
Workspace only.
one build -w graph
Build the graph
, cli
, and logger
Workspaces.
one build -w graph cli logger
Aliases: one changes
, one changesets
Manage changes and changesets for publishable workspaces.
one change <command>
Aliases: one change
Add changesets for modified Workspaces.
one change add [options...]
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 |
Migrate from Changesets to oneRepo changes.
one change migrate
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. |
Aliases: one change release
Publish all Workspaces with versions not available in the registry.
one change publish [options...]
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.
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 no 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.
one change publish -w api
Attempt to publish all non-private Workspaces.
one change publish --all
Preview the next versions and changelogs for Workspaces.
one change show
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 |
Aliases: one change snap
Publish a snapshot pre-release.
one change snapshot
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 no 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 |
Aliases: one change required
Ensure there are change entries for every modified public Workspace.
one change verify
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.
Update version numbers for publishable workspaces
one change version
Option | Type | Description |
---|---|---|
--all, -a |
boolean |
Run across all workspaces |
--allow-dirty |
boolean |
Bypass checks to ensure no 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 change version --prerelease=alpha
Aliases: one owners
Manage codeowners
one codeowners <command>
Show the code owners for files and Workspaces.
one codeowners show [options]
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.
one codeowners show
List the unique set of codeowners given an input workspace-name
.
one codeowners show --list -w <workspace-name>
Sync code owners from Workspace configurations to the repository’s CODEOWNERS file.
one codeowners sync
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. | ✅ |
Verify the CODEOWNERS file is up to date and unmodified.
one codeowners verify
Advanced options
Option | Type | Description | Required |
---|---|---|---|
--provider |
"github" , "gitlab" , "gitea" , "bitbucket" |
Codeowner provider determines where the CODEOWNERS file(s) will be written. | ✅ |
Aliases: one dependency
, one deps
, one dep
Safely manage Workspace dependencies across your repository.
one dependencies <command> [options...]
Add dependencies to Workspaces.
one dependencies add -w <workspace-names...> --dev [devDependencies...] --prod [prodDependencies...] [options...]
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.
one dependencies add -w my-workspace -d normalizr --mode strict
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.
one dependencies add -w my-workspace -d normalizr --mode loose
Install react
as a production dependency and babel-core
as a development dependency in both workspace-a
and workspace-b
.
one dependencies add -w workspace-a workspace-b -d babel-core -p react
Remove dependencies from Workspaces.
one dependencies remove -w [workspaces...] -d [dependencies...] [options...]
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 |
Verify dependencies across workspaces.
one dependencies verify [options...]
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 |
Generate documentation for the oneRepo cli.
one docgen [options...]
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. |
Aliases: one lint
Run eslint across files and workspaces
one eslint [options...]
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. |
--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 |
--through-ref |
string |
Git ref to start looking for affected files or workspaces |
Aliases: one gen
Generate files, folders, and Workspaces from templates.
one generate [options...]
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 |
---|---|---|---|
--templates-dir |
string , default: "config/templates" |
Path to the templates | ✅ |
Run core Graph commands
one graph <command>
Show this repository’s Workspace Graph using an online visualizer or output Graph representations to various formats.
one graph show [options...]
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.
one graph show
Open the online visualizer for your full Workspace graph.
one graph show --all --open
Generate a Mermaid graph to a file, isolating just the given <workspaces...>
and those that are dependent on it.
one graph show --format=mermaid -w <workspaces...> > ./out.mermaid
Verify the integrity of the repo’s dependency Graph and files in each Workspace.
one graph verify
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 |
Manage git repository hooks
one hooks <command>
Create git hooks
one hooks create
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. | ✅ |
Aliases: one hooks sync
Initialize and sync git hook settings for this repository.
one hooks init
Advanced options
Option | Type | Description | Required |
---|---|---|---|
--hooks-path |
string |
Tracked path to use for git hooks. | ✅ |
Install the oneRepo CLI into your environment.
one install [options...]
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.0.0" |
Version of oneRepo to install. Defaults to the current version. |
Aliases: one test
Run tests using Jest.
one jest [options...] -- [passthrough]
one jest [options...]
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.
one jest ,test
Runs jest in --watch mode against the currently affected files.
one jest ,test --watch
Run Jest in watch mode against a particular file.
one jest ,test --watch -- path/to/test.ts
Pass any other Jest CLI options after the argument separator.
one jest ,test -- --runInBand --detectOpenHandles
Aliases: one format
Format files with prettier
one prettier [options...]
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 |
Run tasks against repo-defined lifecycles. This command will limit the tasks across the affected Workspace set based on the current state of the repository.
one tasks --lifecycle=<lifecycle> [options...]
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" , "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.
one tasks --lifecycle=pre-merge --shard=1/5
Shard all tasks for the pre-merge
lifecycle into 5 groups and runs the third shard.
one tasks --lifecycle=pre-merge --shard=3/5
Aliases: one typescript
, one typecheck
Sync TS project references
one tsc [options...]
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 |
Aliases: one test
Run unit tests using Vitest
one vitest ,test [options...] -- [passthrough]
one vitest [options...]
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.
one vitest ,test
Run vitest in --watch mode.
one vitest ,test --watch
Run vitest in watch mode with a particular file.
one vitest ,test --watch -- path/to/test.ts
Run all tests in a given Workspace.
one vitest ,test -w <workspaces...>
Aliases: one ws
Run commands within individual Workspaces.
one workspace <workspace-name> <commands...> [options...] -- [passthrough...]
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. |
Aliases: one workspace @onerepo/docs
Runs commands in the "@onerepo/docs" Workspace.
Run Astro directly.
Build the documentation site for production.
Aliases: 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 |
Check Astro pages for errors.
Generate 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 |
Start the Astro dev server.
Generate typedoc markdown files for the toolchain.
one workspace docs typedoc
Option | Type | Description |
---|---|---|
--add |
boolean |
Add files to the git index |
Aliases: one workspace @onerepo/github-action
Runs commands in the "@onerepo/github-action" Workspace.
Build public Workspaces using esbuild.
one workspace github-action build [options...]
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.
one workspace github-action build
Build the graph
Workspace only.
one workspace github-action build -w graph
Build the graph
, cli
, and logger
workspaces.
one workspace github-action build -w graph cli logger
{/* end-auto-generated-from-cli */}
{/* start-auto-generated-from-cli-eslint /} {/ @generated SignedSource<<2b199521d00842c4e062346aa19ca9f1>> */}
Aliases: one lint
Run eslint across files and workspaces
one eslint [options...]
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 |
{/* end-auto-generated-from-cli-eslint */}