-
Notifications
You must be signed in to change notification settings - Fork 909
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
v19 gives @commitlint/config-conventional
with yarn pnp
#3936
Comments
Can you please provide a minimal but runnable online reproduction? We've not tested yarn P'n'P previously, AFAIK. |
Facing the same issue: Just do: npm i -g @commitlint/cli @commitlint/config-conventional
commitlint --from=$COMMIT_FROM --to=$COMMIT_TO in the { "extends": ["@commitlint/config-conventional"] }
The current workaround is to install the package |
So you're saying global install mode, I don't know if it should be allowed. |
@chrepl I have @commitlint/config-conventional installed locally. |
We are seeing the same issues in our repositories as it currently breaks all of our Github action pipelines related to commitlint. Reproduction example (for example in a
My
|
Is there a reason why this shouldn't be allowed? I use commitlint in many repositories, so a global installation makes sense to me. |
@JounQin it is indeed installed globally in the CI pipeline. Using So for example: .npmrc
native using 'resolve-global' package: resolveGlobal('@commitlint/config-conventional') // works fine, could found the package using commitlint-cli raised an error at that line. This worked fine before v19, now this currently breaks all of our GitLab pipelines. @simPod sorry, I spoke for myself. |
|
Global installations don't work since the release of version v19.0.0: conventional-changelog/commitlint#3936
Global installations don't work since the release of version v19.0.0: conventional-changelog/commitlint#3936
Global installations don't work since the release of version v19.0.0: conventional-changelog/commitlint#3936
|
|
Please check if this helps: https://github.com/conventional-changelog/commitlint/releases/tag/v19.0.1 |
@escapedcat I still see the same issue unfortunately. I'll be able to prepare example repo the next week, I'm leaving tomorrow and probably will do no work. |
I can reproduce it now: https://github.com/JounQin/test/tree/repro/commitlint Root cause: wooorm/import-meta-resolve#23 We need some yarn P'n'P expert here. cc @arcanis @merceyz @paul-soporan @larixer See also https://yarnpkg.com/getting-started/qa#does-yarn-support-esm Workaround PR: #3941 The remaining question is, do we need to support Yarn P'n'P officially. It's a Yarn P'n'P issue rather than commitlint's actually. cc @escapedcat |
* fix: fallback to `require.resolve` for Yarn P'n'P close #3936 * refactor: use `resolve-from` package
Good question. Thanks for your fix. I wonder how other pure ESM projects handle this. Recently lot's of projects switched. Do they all break p'n'p projects? |
Yarn PnP is compatible with ESM. In this case it's a third-party package you use (import-meta-resolve) that doesn't support ESM loaders (wooorm/import-meta-resolve#10 (comment)). |
Thanks for clarifying @arcanis ! |
Expected Behavior
No errors. Works on v18.
Current Behavior
No response
Affected packages
Possible Solution
No response
Steps to Reproduce
"@commitlint/cli": "^19.0.0",
"@commitlint/config-conventional": "^19.0.0",
Context
No response
commitlint --version
@commitlint/cli ^19.0.0, @commitlint/config-conventional ^19.0.0
git --version
2.41.0
node --version
v20
The text was updated successfully, but these errors were encountered: