Skip to content
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

Change of config file for v4? #194

Closed
browniebroke opened this issue Jul 15, 2021 · 3 comments · Fixed by #197
Closed

Change of config file for v4? #194

browniebroke opened this issue Jul 15, 2021 · 3 comments · Fixed by #197

Comments

@browniebroke
Copy link

I received a bunch of PRs on my repos for the newly released v4 and they mostly fail the build. Looking at the recent changes, it looks like the config file should be rename from commitlint.config.js → commitlint.config.cjs, is that correct?

If so, I guess the configFile option should be updated accordingly, both its default value and in the README.

Am I missing something? Don't think there is a good way to keep the same file name by looking at commitlint.js docs.

@wagoid
Copy link
Owner

wagoid commented Jul 15, 2021

Hey @browniebroke! Yes you're right, sorry for not updating this as part of the breaking changes of v4. I'll Update the default value and the recommended value on README.

Am I missing something? Don't think there is a good way to keep the same file name by looking at commitlint.js docs.

Yeah, renaming seems to be the only option :/

@wagoid
Copy link
Owner

wagoid commented Jul 15, 2021

I've just merged this PR updating README and default config files: #195
Also updated the CHANGELOG of v4 to include this breaking change.

But I won't close this issue yet as I think this is breaking change is too big. I'll update the project to transpile the code, so I won't need to rely on Node.js default resolution logic anymore and we can switch back to allow .js extension like commitlint does.

wagoid added a commit that referenced this issue Jul 17, 2021
On v4, we used the default nodejs resolution logic to allow ES modules in dependencies.
This created a breaking change of forcing users of this action
to use the .cjs extension instead of .js in config files.

With this fix, we now bundle the action with rollup to allow ES modules
in dependencies, while keeping the support for .js config files.

Fixes #194
wagoid added a commit that referenced this issue Jul 17, 2021
On v4, we used the default nodejs resolution logic to allow ES modules in dependencies.
This created a breaking change of forcing users of this action
to use the .cjs extension instead of .js in config files.

With this fix, we now bundle the action with rollup to allow ES modules
in dependencies, while keeping the support for .js config files.

Fixes #194
wagoid added a commit that referenced this issue Jul 17, 2021
On v4, we used the default nodejs resolution logic to allow ES modules in dependencies.
This created a breaking change of forcing users of this action
to use the .cjs extension instead of .js in config files.

With this fix, we now bundle the action with rollup to allow ES modules
in dependencies, while keeping the support for .js config files.

Fixes #194
wagoid added a commit that referenced this issue Jul 17, 2021
On v4, we used the default nodejs resolution logic to allow ES modules in dependencies.
This created a breaking change of forcing users of this action
to use the .cjs extension instead of .js in config files.

With this fix, we now bundle the action with rollup to allow ES modules
in dependencies, while keeping the support for .js config files.

With this change, the default config file was returned back to .js instead of
.cjs.

Fixes #194
@wagoid
Copy link
Owner

wagoid commented Jul 17, 2021

Done! Fixed on v4.0.3

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 a pull request may close this issue.

2 participants