Monodeploy

View GitHub Project

Configuring Monodeploy

For a full list of CLI arguments, run:

yarn monodeploy --help

To fine-tune monodeploy, create a monodeploy.config.js file and invoke monodeploy via:

yarn monodeploy --config-file monodeploy.config.js

Configuration File

If you omit a property, a reasonable default will be used. Note that setting a property to null is not always the same as omitting the property (or setting it to undefined).

module.exports = {
autoCommit: true,
changelogFilename: 'CHANGELOG.md',
}

Schema

NameDescription
access
infer | public | restricted

Default: public

This overrides the access defined in the publishConfig of individual workspaces. Set this to 'infer' to respect individual workspace configurations.

Caution: The default may be too open and will be changed in a future major release.

autoCommit
boolean

Default: false

Whether to automatically create a release commit, for use with persistVersions.

autoCommitMessage
string

Default: "chore: release [skip ci]"

The commit message to use when autoCommit is enabled.

changelogFilename
string

Default: No Default

The filename to write changelogs to, assuming a conventional changelog config has been set. Use '<packageDir>' to reference the cwd of an individual workspace.

changesetFilename
string

Default: No Default

The filename to write the changeset to. This is a metadata file which after a monodeploy run, will contain change history useful for external scripts. Set to '-' to write to stdout.

changesetIgnorePatterns
string[]

Default: []

An array of micromatch globs which will be used to filter out modified files. You can use this to skip modifications to 'test files' as part of the 'how this package changed' determination.

commitIgnorePatterns
string | RegExp[]

Default: []

An array of regular expressions which will be used to filter out commits from the explicit package bump detection. The patterns are matched against commits of the form: <sha> <newline> <body>

conventionalChangelogConfig
string | { name: string, key: string }

Default: Partial internal implementation (not recommended)

A conventional changelog config package name. This is required for changelog generation. This config determines the changelog format, as well as the version strategy determiner.

cwd
string

Default: cwd

The working directory to run all operations from. Defaults to the current working directory.

dryRun
boolean

Default: false

If enabled, any operation performing a destructive action on an external system is skipped over. This includes publishing to NPM, committing to git, and execution of lifecycle scripts. Use dry run to preview publish changes, and to validate your configuration.

forceWriteChangeFiles
boolean

Default: false

By default, the changeset and changelog files are not written in dry run mode, as they constitute a change to an external system. Enable force write to write these change files, which can be useful for generating publish previews.

git.baseBranch
string

Default: last tagged commit

The base git ref to using as the starting point of package change discovery. If not set, this will default to the last tagged commit. You usually do not want to set this.

git.commitSha
string

Default: HEAD

The git ref which marks the "end point" of package change discovery. This defaults to HEAD. You usually do not want to set this.

git.push
boolean

Default: false

Whether to push to the git remote. This works in conjunction with the git.tag and autoCommit options, thus allowing you to create the tags and release commit automatically while deferring the actual push.

git.remote
string

Default: origin

The git remote name to push tags and the release commit to. Defaults to origin.

git.tag
boolean

Default: true

Whether to create git tags to track the releases. It is useful to disable this when publishing to a test registry, where you do not want to modify the main git branch.

jobs
number

Default: 0 (No Limit)

The maximum number of packages whose lifecycle scripts can be run in parallel. Similar to concurrency in Lerna.

maxConcurrentReads
number

Default: 0 (Internal Implementation Detail)

The maximum number of package metadata to read from the NPM registry simultaneously. If no default is set, or set to 0, Monodeploy will use its discretion.

maxConcurrentWrites
number

Default: 0 (Internal Implementation Detail)

The maximum number of packages to publish to the NPM registry simultaneously. We have seen issues in the past with too many concurrent writes for private registries. If no default is set, or set to 0, Monodeploy will use its discretion.

noRegistry
boolean

Default: false

By default the latest package versions upon which the version strategy is applied, is taken from the NPM registry. If noRegistry mode is enabled, the latest version is instead taken from the package.json files. This is incompatible with prerelease mode.

persistVersions
boolean

Default: false

Whether to persist package.json modifications, i.e. updating the dependency versions and the version field of each published workspace. Most publishing tools act as if this is enabled. It can be useful to disable version persistence if you do not want your CI environment to write back to your Git repository. Useful for runners like Jenkins.

plugins
string[]

Default: []

An array of Monodeploy plugins. See the plugin section of the documentation for more information.

prerelease
boolean

Default: false

Whether to run Monodeploy in Prerelease mode. In prerelease mode, versions are not published to the latest npm dist tag. This is meant for release candidates, and beta versions. Version strategy behaviour is also impacted by this mode.

prereleaseId
string

Default: "rc"

The identifier to use in the prerelease tag. Defaults to 'rc' as in '1.0.0-rc.1'.

prereleaseNPMTag
string

Default: "next"

The npm dist-tag to publish to in prerelease mode. Defaults to 'next'.

registryUrl
string

Default: Yarn Configuration

The NPM registry URL for fetching package information, and publishing packages outside of dry run. Note that this overrides any publishConfig.registryUrl or Yarn RC configuration.

topological
boolean

Default: false

Whether to run the lifecycle scripts of the packages to publish in topological order, based on dependencies and peerDependencies. This excludes devDependencies from the graph.

topologicalDev
boolean

Default: false

Similar to topological, however also consider devDependencies.