Skip to content

Conversation

@Bernankez
Copy link

Description

This PR contains two fixes.
The first is that the document here says that the config name is bumpp.config.ts, but the name is actually bump.config.ts. Maybe it's better to support both of the names? This will fix #6.
And because of adding the --no-commit and --no-tag options in v9.2.0, this will set the commit and tag from cli args to true instead of undefined according to https://github.com/cacjs/cac#negated-options. And this will overrides the config from config file. I made some fixes so it can now read the right args from cli. This will fix #13 and #19.

Linked Issues

#6 #13 #19

Additional context

@DrJume
Copy link

DrJume commented Nov 30, 2023

LGTM 🙏

src/config.ts Outdated
Comment on lines 20 to 23
const childrenNames = readdirSync(cwd)
const name = childrenNames.some(name => name.includes('bumpp')) ? 'bumpp' : 'bump'
const { config } = await loadConfig<VersionBumpOptions>({
name: 'bump',
name,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a good idea to rely on readdirSync, as the config can come from different sources. Instead we could run c12 twice and merge the config.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I missed that point.

@antfu antfu merged commit d9660fe into antfu-collective:main Mar 4, 2024
cwd = process.cwd(),
) {
const { config: bumppConfig } = await loadConfig<VersionBumpOptions>({
name: 'bumpp',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a second thought, I think it's better to only read from bump to avoid confusion, as we already fix the docs for quite a while now.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After upgrade to v9.2.0 bump.config.ts not work bumpp.config.ts

3 participants