Question: Are packageFiles
in .versionrc not bumped automatically? #533
Description
I'd like to ask you about the expected behavior.
Background
Now I have an manifest.json
file under dist
directory.
<root>
- dist/
- manifest.json
- package.json
- .versionrc.js
I'd like to sync versions in both package.json
and dist/manifest.json
, so I added dist/manifest.json
to packageFiles
in .versionrc.js
.
module.exports = {
packageFiles: [
{
filename: "dist/manifest.json",
type: "json"
}
],
};
Problem
I ran standard-version
(with --dry-run
option), but it seems to bump up only package.json
and package-lock.json
.
$ npx standard-version --dry-run
✔ bumping version in package.json from 1.0.0 to 1.0.1
✔ bumping version in package-lock.json from 1.0.0 to 1.0.1
✔ created CHANGELOG.md
✔ outputting changes to CHANGELOG.md
Question
Is that the expected behavior?
In README,
packageFiles
– User-defined files where versions can be read from and be "bumped".
I couldn't quite understand what "and be "bumped"" meant.
And default packageFiles
are bumped because they are merged into bumpFiles
.
Workaround
I can bump up by moving dist/manifest.json
to bumpFiles
.
But I had to contain package.json
too (because it overwrote the default values).
module.exports = {
bumpFiles: [
{
filename: "package.json",
type: "json"
},
{
filename: "dist/manifest.json",
type: "json"
}
]
};