Update hints
If you want one or couple of following things to happen
- Certain packages have concrete update versions
- Concrete packages have concrete version increment
- Some packages, despite affected or not, to have new version and treated as affected.
Then how you can achieve that?
Two solutions available to this problem:
- First can be applied if
@pvm/plugin-conventional-changelog
used: you can edit commit message or add new to affect packages you want to update but it is not acceptable in all cases. For example when you want to republish all packages because of build process changes and when nothing directly used by packages changed. Next approach is more general and robust. - Second is to use so-called
update-hints
mechanism.
Hints are applied in pvm update
command call. If hints were in file than this file will be deleted in following commit.
But if release.tag_only
set to true
and versioning.source
is set to tag
, then there will be no commit and hints file will
leave until one not delete it manually. In this case hints can be placed in merge request description.
update-hints.toml
file
update-hints.toml
is a special file that is commited as usual and merged in merge request.
Below is full example of hints content
# Filename is taken from config.update.hints_file.
# This file will be deleted from repository in a release commit.
# Full example:
# define a release type for all packages
release-type = "major"
# release types for specific packages (overrides release type which calculated from commit messages)
[release-types]
major = [
'@pvm/plugin-*',
'test-a',
]
# release type could be a string also
minor = 'test-b'
patch = [ 'foo', 'bar' ]
# choose for which packages we should update dependants
[[update-dependants-for]]
match = [
'boxy-*',
'text-a',
]
# as-dep means take same release type which has a dependency of package
release-type = 'as-dep'
# you can choose different release types for different packages
# upper entries have highest priority
# if there are multiple packages matched for single match with release-type=as-dep, highest release-type will be selected
[[update-dependants-for]]
match = [ 'boxy-*' ]
release-type = 'as-dep'
[[update-dependants-for]]
match = [ 'test-a' ]
release-type = 'minor'
# also there is short form possible for same entry
# in this case release type will be taken from config.update.dependants_release_type
update-dependants-for = [
'boxy-*',
'test-a',
]
# include additional packages for updating
[force-release]
packages = [
'pkg-*',
'/src/foo/**',
]
release-notes = 'republish due to broken pipeline'
Merge request description update hints
info
At this moment only gitlab is supported
Merge request hints content is superset of file version with following additions
Extra field
kind = 'pvm-update-hints'
and wrap with toml
code block
```toml
```
Example of hints for merge request description with theese additions
...[Some description text]
```toml
kind = 'pvm-update-hints'
[release-types]
major = '*'
```