beachball
beachball copied to clipboard
`--type` is not documented
What
--type
CLI arg can be used with change
to set the type of the change, however this isn't documented on the online documentation or in the -h
output.
It is also confusing the difference between --type
and --dependent-change-type
when used with change
command.
Why
Was looking to set the type and message of a change file via CLI.
For the message it was nice and easy, simply -m
/--message
which is prominently documented in -h
.
However I had to read the source code to find --type
that can be passed in - that also works perfectly and was exactly what I needed.
Notes
Beachball version: 1.53.2
beachball -h
output:
beachball v1.53.2 - the sunniest version bumping tool
Prerequisites:
git and a remote named "origin"
Usage:
beachball [command] [options]
Commands:
change (default) - a tool to help create change files in the change/ folder
check - checks whether a change file is needed for this branch
changelog - based on change files, create changelogs and then unlinks the change files
bump - bumps versions as well as generating changelogs
publish - bumps, publishes to npm registry (optionally does dist-tags), and pushes changelogs back into master
sync - synchronizes published versions of packages from a registry, makes local package.json changes to match what is published
Options:
--registry, -r - registry, defaults to https://registry.npmjs.org
--tag, -t - for the publish command: dist-tag for npm publishes
- for the sync command: will use specified tag to set the version
--branch, -b - target branch from origin (default: master)
--message, -m - for the publish command: custom publish message for the checkin (default: applying package updates);
for the change command: description of the change
--no-push - skip pushing changes back to git remote origin
--no-publish - skip publishing to the npm registry
--no-bump - skip both bumping versions and pushing changes back to git remote origin when publishing;
--no-commit - for the change command: stage change files only without autocommitting them
--help, -?, -h - this very help message
--yes, -y - skips the prompts for publish
--package, -p - manually specify a package to create a change file; creates a change file regardless of diffs
--changehint - give your developers a customized hint message when they forget to add a change file
--since - for the bump command: allows to specify the range of change files used to bump packages by using git refs (branch name, commit SHA, etc);
for the publish command: bumps and publishes packages based on the specified range of the change files.
--keep-change-files - for the bump and publish commands: when specified, both bump and publish commands do not delete the change files on the disk.
--force - force the sync command to skip the version comparison and use the version in the registry as is.
--dependent-change-type - for the change command: override the default dependent-change-type that will end-up in the change file.
--disallow-deleted-change-files - for the check command: verifies that no change files were deleted between head and target branch.
--prerelease-prefix - for the bump and publish commands: specify a prerelease prefix for packages that will receive a prerelease bump.
Examples:
$ beachball
$ beachball check
$ beachball publish -r http://localhost:4873 -t beta -b beta
Looks like --type
is now specified in the online docs here: https://microsoft.github.io/beachball/cli/options.html#change-options
Still not in the -h
output though.