Bazel
Description
The bazel crawler looks recursively for every MODULE.bazel file from a root directory, and updates each bazel_dep() declaration it contains.
# MODULE.bazel
bazel_dep(name = "rules_go", version = "0.46.0")
bazel_dep(name = "gazelle", version = "0.35.0", dev_dependency = True)Both regular and dev_dependency declarations are updated.
This crawler is enabled by default, so it can be used either automatically by running updatecli diff from a directory containing the files to update, or by providing a manifest.
The automatic discovery behavior can be tuned by providing a YAML manifest with a bazel crawler in top-level directive autodiscovery as explained in the "Autodiscovery" page.
Generated manifests
Each dependency produces a bazelregistry source resolving the latest module version from the Bazel Central Registry, and a bazelmod target writing it back into MODULE.bazel.
Limitations
Only the module system is covered. Legacy
WORKSPACEfiles and theirhttp_archiveorgit_repositoryrules are not scanned.
Manifest
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| ignore | array | ignore specifies rule to ignore Bazel module updates. | |
| modules | object |
examples: | |
| path | string | path specifies a MODULE.bazel path pattern, the pattern requires to match all of name, not just a substring. | |
| only | array | only specify required rule to restrict Bazel module updates. | |
| modules | object |
examples: | |
| path | string | path specifies a MODULE.bazel path pattern, the pattern requires to match all of name, not just a substring. | |
| rootdir | string | rootdir defines the root directory used to recursively search for MODULE.bazel files | |
| versionfilter | object |
kind - semver
versionfilter of kind kind - regex
versionfilter of kind example: | |
| kind | string | specifies the version kind such as semver, regex, or latest | |
| pattern | string | specifies the version pattern according the version kind for semver, it is a semver constraint for regex, it is a regex pattern for time, it is a date format | |
| regex | string | specifies the regex pattern, used for regex/semver and regex/time. Output of the first capture group will be used. | |
| replaceall | object | replaceAll applies a regex replacement to version strings before filtering. This is useful for transforming versions (e.g., curl-8_15_0 to curl-8.15.0) before regex extraction. | |
| pattern | string | Pattern specifies the regex pattern to match for replacement | |
| replacement | string | Replacement specifies the replacement string (supports $1, $2, etc. for captured groups) | |
| strict | boolean | strict enforce strict versioning rule. Only used for semantic versioning at this time |
Example
autodiscovery:
crawlers:
bazel: {}