Skip to content

unsatisfied peer-dependency on typescript in v13.2.0 of @commitlint/cli #2779

Closed
@travi

Description

@travi

Expected Behavior

running npm ls with @commitlint/cli installed should exit zero, meaning that there are no unsatisfied peer dependencies in the dependency tree.

Current Behavior

npm ls reports an unsatisfied peer dependency on typescript:

npm ERR! peer dep missing: typescript@>=2.7, required by ts-node@9.1.1

npm ls ts-node shows that the requirement is pulled in by @endemolshinegroup/cosmiconfig-typescript-loader:

  └─┬ @commitlint/cli@13.2.0
    └─┬ @commitlint/load@13.2.0
      └─┬ @endemolshinegroup/cosmiconfig-typescript-loader@3.0.2
        └── ts-node@9.1.1 

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

either make @endemolshinegroup/cosmiconfig-typescript-loader an optional peer dependency or define typescript as a direct dependency of the cli package in order to satisfy the peer requirement.

Steps to Reproduce (for bugs)

  1. npm install @commitlint/cli -D
  2. npm ls

Context

i use commitlint in many projects that are not typescript projects, so i do not want to define typescript as a direct dependency in those projects to satisfy a peer requirement of commitlint.

Your Environment

Executable Version
commitlint --version 13.2.0
git --version 2.27.0
node --version 14.17.5
npm --version 6.14.14

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions