conventional-changelog / commitlint

📓 Lint commit messages
https://commitlint.js.org
MIT License
16.3k stars 882 forks source link

fix: @commitlint/config-nx-scopes does not support nx@19.0.0 #4067

Closed DavidVollmers closed 1 month ago

DavidVollmers commented 1 month ago

Steps to Reproduce

1. Upgrade nx workspace to latest version using `nx migrate latest`
2. Run `npm install`

Current Behavior

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @commitlint/config-nx-scopes@19.3.0
npm ERR! Found: nx@19.0.0
npm ERR! node_modules/nx
npm ERR!   dev nx@"19.0.0" from the root project
npm ERR!   nx@"19.0.0" from @nrwl/tao@19.0.0
npm ERR!   node_modules/@nrwl/tao
npm ERR!     @nrwl/tao@"19.0.0" from nx@19.0.0
npm ERR!   2 more (@nx/devkit, @nx/workspace)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional nx@"^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" from @commitlint/config-nx-scopes@19.3.0
npm ERR! node_modules/@commitlint/config-nx-scopes
npm ERR!   dev @commitlint/config-nx-scopes@"^19.3.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: nx@18.3.4
npm ERR! node_modules/nx
npm ERR!   peerOptional nx@"^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" from @commitlint/config-nx-scopes@19.3.0
npm ERR!   node_modules/@commitlint/config-nx-scopes
npm ERR!     dev @commitlint/config-nx-scopes@"^19.3.0" from the root project

Expected Behavior

The @commitlint/config-nx-scopes package version 19.3.0 should support the latest nx version.

Affected packages

Possible Solution

No response

Context

No response

commitlint --version

@commitlint/cli@19.3.0

git --version

git version 2.33.1.windows.1

node --version

v20.9.0

DavidVollmers commented 1 month ago

I would probably take this on soon. My only question is what is the desired strategy here? Do we just update the dependency to ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 or would it be smarter to set it to something like >=14.0.0? I think the latter one makes more sense for future updates of nx since it is really unlikely that the package will break.

escapedcat commented 1 month ago

Let me try to tag @supernaut , he took care of these before.

This is the PR created by depfu btw: #4072

DavidVollmers commented 1 month ago

This is solved with v19.3.1.