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

[Bug report] When czg reads commitlint.config, the extends content cannot take effect #186

Closed
2 tasks done
shlroland opened this issue Sep 26, 2024 · 6 comments
Closed
2 tasks done
Assignees
Labels
bug Something isn't working next version Plan for next version

Comments

@shlroland
Copy link

shlroland commented Sep 26, 2024

βœ… Checklist

  • I am using the latest version
  • I have searched FAQ

πŸ“„ System Info

System:
    OS: macOS 14.6.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 188.33 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.17.0 - ~/Library/Caches/fnm_multishells/47421_1726756844280/bin/node
    Yarn: 1.22.22 - ~/Library/pnpm/yarn
    npm: 10.8.2 - ~/Library/Caches/fnm_multishells/47421_1726756844280/bin/npm
    pnpm: 9.10.0 - ~/Library/Caches/fnm_multishells/47421_1726756844280/bin/pnpm
    bun: 1.1.20 - ~/.bun/bin/bun
    Watchman: 0.0.0 - /opt/local/bin/watchman
  npmPackages:
    cz-git: ^1.7.0 => 1.9.4
    czg: ^1.9.4 => 1.9.4

πŸ”Ž Description

Concise Description

I configured a commitlint configuration file in the monorepo project. When I installed it in the root directory and used it in commitlint.config.js, the content of extends did not take effect.
like this

// commitlint.config.js
export default {
  extends: ['@shlroland/commitlint-config']
}

Expected behavior

When I switch back to commitizen + cz-git, at this time, extends can take effect.

Steps to reproduce

Screenshots or Screen Recording(if possible)

πŸ”— Reproduction link / repo:

No response

@shlroland shlroland added the bug Something isn't working label Sep 26, 2024
@Zhengqbbb
Copy link
Owner

Zhengqbbb commented Sep 26, 2024

Could u tell me what configuration is not effective? It works normally on my side.

.commitlintrc.cjs

/** @type {import('czg').UserConfig} */
module.exports = {
    extends: ['@shlroland/commitlint-config'],
}

CleanShot 2024-09-26 at 23 09 15@2x


Try it to see if the configuration is overwritten.

CZ_DEBUG=1 czg -a

@shlroland
Copy link
Author

shlroland commented Sep 26, 2024

CZ_DEBUG=1 czg -a
image

The debug information is also normal.

Reproduced repository link: https://github.com/shlroland/lint-config/tree/tmp

@Zhengqbbb
Copy link
Owner

Zhengqbbb commented Sep 26, 2024

Strange πŸ€”. When I use the pre-release version, it returns to normal. The fix for the pre-released version is likely due to an upgrade @commlint/resolve-extends. I will debug it tomorrow.

image

In the meantime, you can install 1.10.0-beta.1 for use, which will be released over the weekend.

pnpm i -D czg@next
npm i -g czg@next

czg -v

CleanShot 2024-09-27 at 00 55 26@2x

@Zhengqbbb
Copy link
Owner

Zhengqbbb commented Sep 26, 2024

Thank you very much for pointing out this issue.

It has been confirmed that the issue belongs to the upstream package @commitlint/resolve-extends@19.0.3 bug.


  1. I upgraded all @commitlint packages to the latest version 19.5.0, and released 1.10.0-beta.2, which works normally with extends.
  2. I downgraded @commitlint/resolve-extends to 19.0.3, and released 1.10.0-beta.3, which behaves abnormally.
image

I will release the fix version v1.10.0 over the weekend, upgrading all @commitlint packages to the latest v19.5.0.

I have released a next pre-release version 🌟(v1.10.0-beta.4)🌟 for testing.

Welcome to try it out! πŸ‘€ Let me know if there are still any issues. πŸŽ‰

pnpm i -D czg@next
npm i -g czg@next

czg -v #v1.10.0-beta.4
czg -a

@shlroland
Copy link
Author

Thank you for your timely reply and your hard work in fixing the problem overnight. I'll try it out.

@Zhengqbbb
Copy link
Owner

The latest version 🌟(v1.10.0)🌟 should be resolve this issue request , please have a try. πŸ’ͺ
πŸ‘€ Let me know if there are still any issues. πŸŽ‰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next version Plan for next version
Projects
None yet
Development

No branches or pull requests

2 participants