-
Notifications
You must be signed in to change notification settings - Fork 913
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: breaking API change in one of commitlint cli's dependencies: read-pkg #887
Comments
Yeah. This broke all of our CI jobs today. Happy new year, I guess? |
Hmm, that's weird, the only breaking change from |
@byCedric I was under the impression that did not work either. Or is it any different now? |
Good catch, but that's related to using the configuration from your project. It's sort of similar, but not causing this error. It's related to an issue in a nested dependency where it looks in the wrong global npm/yarn folder for your config. This error seems to originate from the |
@byCedric Hey, good stuff! And thanks so much for the fix. Are you planning a patch release by any chance? |
I'm sorry we broke your CI 😄 Yes, I'm running the release as we speak. I'll comment again with the version if I'm done 😄 |
@byCedric Don't mention it. You've been preventing worse things from happening for several months for us now. So the balance is still uneven. |
You should be able to run |
Sweet victory. Terrific job @byCedric. Next coffee is on me. |
I notice that commitlint cli in versions 8.3.0 and onwards, you're using read-pkg version 5.2.0.
Please be aware that there is a significant API change in that module starting at version 4.0.0. The read-pkg API was changed to accept an options objection where one of it's keys,
cwd
, specifies the directory of the package.json to read. If not specified, it will default to the current directory that commitlint is run from. This is buggy since I believe you actually want to read the package.json where commitlint is installed.Expected Behavior
commitlint >= 8.3.0 reads package.json from install area
Current Behavior
commitlint >= 8.3.0 reads package.json from current workding directory:
Affected packages
Possible Solution
downgrade read-pkg to 3.0.0
update the CLI to correctly use the new read-pkg API
The text was updated successfully, but these errors were encountered: