conventional-changelog/commitlint

fix: dependencies tree for typing needs fine-tunning

Closed

#4,107 opened on Jul 28, 2024

 (2 comments) (0 reactions) (0 assignees)TypeScript (896 forks)batch import
bughelp wanted

Repository metrics

Stars
 (15,497 stars)
PR merge metrics
 (Avg merge 12h 56m) (52 merged PRs in 30d)

Description

Steps to Reproduce

  1. In a new typescript project install the following:

typescript@latest @commitlint/cli@19.3.0 conventional-commits-parser@6.0.0

  1. import conventional-commits-parser and notice how the types are missing

Current Behavior

When Installing @commitlint/cli@19.3.0 @commitlint/types@19.0.3 is also installed

https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/cli/package.json#L55C6-L55C23

Which breaks typing when conventional-commits-parser@6.0.0 is installed.

typescript will complain about commit parser having no exported member 'CommitParser' import { CommitParser } from "conventional-commits-parser";

https://github.com/conventional-changelog/conventional-changelog/blob/d3b8aaa16337993bbad4d91db1ffac5a7568756b/packages/conventional-commits-parser/src/CommitParser.ts#L42

Expected Behavior

Installing @commitlint/cli & conventional-commits-parser should result in the correct typings

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

No response

Context

No response

commitlint --version

@commitlint/cli@19.3.0

git --version

2.41.0

node --version

22.4.0

Contributor guide