club set-version
club set-version updates package versions across a Dart workspace without publishing anything.
club set-version 0.2.0The command recursively discovers packages below the current directory and opens a multi-select list. Select every package that should receive the new top-level version.
For each selected package, the command also scans every discovered package for matching hosted dependencies. References in dependencies, dev_dependencies, and dependency_overrides are updated to a caret constraint for the new version.
Example
Given these packages:
name: aversion: 0.1.0name: bversion: 0.1.0dependencies: a: ^0.1.0name: cversion: 0.1.0dependencies: a: hosted: https://myclub.example.com version: ^0.1.0 b: hosted: https://myclub.example.com version: ^0.1.0Run the command and select a, b, and c:
club set-version 0.2.0The resulting package versions become 0.2.0, and the hosted internal constraints become ^0.2.0. Existing hosted URLs and dependency declaration shapes are preserved.
Dependency rules
The command updates these hosted forms:
dependencies: a: ^0.1.0 b: hosted: https://myclub.example.com version: ^0.1.0It skips path, Git, and SDK dependencies:
dependencies: local_a: path: ../a git_b: git: https://example.com/b.git flutter: sdk: flutterOnly selected packages receive a new top-level version. Unselected packages are still scanned so their hosted references to selected packages remain resolvable.
Options
| Option | Description |
|---|---|
-C, --directory <dir> | Discover packages below a different directory. |
Both pubspec.yaml and pubspec.yml manifests are supported. A workspace umbrella manifest is not offered as a package.
The version must be valid pub semantic version syntax, such as 1.2.3, 1.2.3-beta.1, or 1.2.3+build5. Do not prefix it with v.