sverweij / dependency-cruiser

Validate and visualize dependencies. Your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.
https://npmjs.com/dependency-cruiser
MIT License
5.33k stars 251 forks source link

feat(cli): expands the info displayed in --info #959

Closed sverweij closed 2 weeks ago

sverweij commented 2 weeks ago

Description

Motivation and Context

Makes it easier to debug issues in the setup. E.g. seeing that dependency-cruiser finds typescript@4 is used instead of an expected typescript@5 already gives clues to

How Has This Been Tested?

Screenshots

After

    dependency-cruiser@16.4.2

    node version supported : ^18.17||>=20
    node version found     : v22.8.0
    os version found       : x64 darwin@21.6.0

    If you need a supported, but not enabled transpiler ('x' below), just install
    it in the same folder dependency-cruiser is installed. E.g. 'npm i livescript'
    will enable livescript support if it's installed in your project folder.

    ✔ transpiler             versions supported  version found
    - ---------------------- ------------------- ------------------------
    ✔ javascript             *                   acorn@8.12.1
    ✔ babel                  >=7.0.0 <8.0.0      @babel/core@7.25.2
    ✔ coffee-script          >=1.0.0 <2.0.0      coffeescript@2.7.0
    ✔ coffeescript           >=1.0.0 <3.0.0      coffeescript@2.7.0
    x livescript             >=1.0.0 <2.0.0      -
    ✔ svelte                 >=3.0.0 <5.0.0      svelte/compiler@4.2.19
    ✔ swc                    >=1.0.0 <2.0.0      @swc/core@1.7.26
    ✔ typescript             >=2.0.0 <6.0.0      typescript@5.6.2
    ✔ vue-template-compiler  >=2.0.0 <3.0.0      vue-template-compiler
    ✔ @vue/compiler-sfc      >=3.0.0 <4.0.0      vue-template-compiler

    ✔ extension
    - ---------
    ✔ .js
    ✔ .cjs
    ✔ .mjs
    ✔ .jsx
    ✔ .ts
    ✔ .tsx
    ✔ .d.ts
    ✔ .cts
    ✔ .d.cts
    ✔ .mts
    ✔ .d.mts
    ✔ .vue
    ✔ .svelte
    x .ls
    ✔ .coffee
    ✔ .litcoffee
    ✔ .coffee.md
    ✔ .csx
    ✔ .cjsx

Before

 Supported:

    If you need a supported, but not enabled transpiler ('x' below), just install
    it in the same folder dependency-cruiser is installed. E.g. 'npm i livescript'
    will enable livescript support if it's installed in your project folder.

  Transpilers:

    ✔ javascript (>es1)
    ✔ babel (>=7.0.0 <8.0.0)
    ✔ coffee-script (>=1.0.0 <2.0.0)
    ✔ coffeescript (>=1.0.0 <3.0.0)
    x livescript (>=1.0.0 <2.0.0)
    ✔ svelte (>=3.0.0 <5.0.0)
    ✔ swc (>=1.0.0 <2.0.0)
    ✔ typescript (>=2.0.0 <6.0.0)
    ✔ vue-template-compiler (>=2.0.0 <3.0.0)
    ✔ @vue/compiler-sfc (>=3.0.0 <4.0.0)

  Extensions:

    ✔ .js
    ✔ .cjs
    ✔ .mjs
    ✔ .jsx
    ✔ .ts
    ✔ .tsx
    ✔ .d.ts
    ✔ .cts
    ✔ .d.cts
    ✔ .mts
    ✔ .d.mts
    ✔ .vue
    ✔ .svelte
    x .ls
    ✔ .coffee
    ✔ .litcoffee
    ✔ .coffee.md
    ✔ .csx
    ✔ .cjsx

Types of changes

Checklist

codeclimate[bot] commented 2 weeks ago

Code Climate has analyzed commit f92da8ba and detected 0 issues on this pull request.

View more on Code Climate.