-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allows configuration of standard-version and submodules using package.json or a provided --config file #278
Conversation
Along with the |
7b3cbaa
to
db70dc6
Compare
@jbottigliero sorry for dropping this on the floor forever, this project is definitely in need of a couple more maintainers. If you'd still like to work on seeing this over the finish line, you can find me here: http://devtoolscommunity.herokuapp.com/ It's a good place to prod me, and make sure that we're moving features forward. |
e6033a5
to
4734c70
Compare
@jbottigliero reading through your pull request a bit, I'm a strong 👍 on this functionality. I believe we might be able to use yargs directly for some of the feature set though, see: https://github.com/yargs/yargs/blob/master/docs/api.md#configobject https://github.com/yargs/yargs/blob/master/docs/api.md#pkgconfkey-cwd and finally, https://github.com/yargs/yargs/blob/master/docs/advanced.md#building-configurable-cli-apps My goal with |
@jbottigliero please feel free to message me here to help coordinate landing this. |
@bcoe – I've updated the PR to utilize I'm still opting for a custom I've also added a few tests for preset configuration cases. These should cover the new I'll catch up with you on chat, but here is what I'm thinking:
|
@jbottigliero I'm happy with this compromise 👍 Looks like the tests failing are just a linting issue. |
The tests should now pass, but I've run into a bit of a predicament around the best way to pass options to The "problem" is that In my latest update, I'm passing along the options as both options and context to act as a sort of override... It seems like the "right" answer might be to explicitly pass {
"standard-version": {
"modules": {
"conventional-changelog": {
"preset": "@some/preset"
},
"conventional-changelog-core": {
"host": "gitlab"
}
}
}
} Additionally, I'd guess that edit not passing on Node 6 due to the spread operator, I'll swap this for |
@jbottigliero what's preventing us from the right solution right now, do we need to change the API surface in some of the dependent libraries? I don't think we should be shy about making any changes that you need in conventional-commits, we have the commit bit. |
@bcoe – I think it's really just my understanding/expectation of how the configurations are actually being merged in I've updated the PR to pass along |
…ackage.json or a provided --config file see conventional-changelog#169, conventional-changelog#154
…json is not present
…e reference (package.json) is not augmented.
…al tests for various configuration cases
- The `changelog` lifecyle now passes along `conventional-changelog` configuration as `options` and `conventional-changelog-core` configuration as `context`. - Updates the passing of configurations to lifecycles to be consistent (the entire `modules` object). - Adds tests to cover `conventional-changelog-core` options, `--tagPrefix` and a few permutations.
fef7f82
to
1221f9a
Compare
…ied (improves coverage)
@jbottigliero thanks for updating, I'll make an effort to start looking at some of the outstanding issues on |
@jbottigliero this is the conversation specifically on my mind: I would like it to be easier to configure CHANGELOG generation and bump criteria, furthermore I'd like to move towards using a convention based on conventionalcommits.org. |
@jbottigliero mind if I use this as a bases for adding in the new configurable |
@bcoe – I should be able to make this switch! |
@jbottigliero let me flag you on a PR with some thoughts I have, now that you've done work to standardize our config format, my preference would be that we load configuration from an https://github.com/bcoe/c8/blob/master/lib/parse-args.js#L86 |
@jbottigliero only closed this momentarily, will have a new PR open in a sec we can collaborate on -- I have some thoughts about how we might use the spec you're writing. |
@jbottigliero don't suppose I could convince you to join this slack: http://devtoolscommunity.herokuapp.com/ so that we can coordinate work in real time? |
Any update on this feature? |
feat: allows configuration of standard-version and submodules using package.json or a provided --config fileackage.json or a provided --config file
see #169, #154
--
I threw together this POC based on comment I came across while looking into the next steps for basic customization in the
conventional-changelog
ecosystem.Our team is currently using
standard-version
and we have been adhering to theangular
preset for some time... we'd like to be able to swap this preset for our own, but continue to usestandard-version
.I started this PR only supporting the
standard-version
key inpackage.json
, but quickly saw the need for additional allowed types (whatBump
inconventional-recommended-bump
). This resulted in the addition of the--config
flag.Again, this is just a POC and I've only updated
bump
– would love to hear the current stance on this type of update!Examples:
package.json
: Basicstandard-version
Configuration$ node bin/cli.js --dry-run ✔ bumping version in package.json from 5.0.0 to 6.0.0 ✔ created 01-CHANGELOG.md ✔ outputting changes to 01-CHANGELOG.md --- ...
package.json
:standard-version
"Module" Configuration--config
: Custom Configuration*$ node bin/cli.js --dry-run --config=test.config.js hello, world: allows configuration of standard-version and submodules using package.json or a provided --config file ✔ bumping version in package.json from 5.0.0 to null ✔ created CHANGELOG-1542829185913.md ✔ outputting changes to CHANGELOG-1542829185913.md --- ...