plantain-00 / type-coverage

A CLI tool to check type coverage for typescript code
MIT License
1.2k stars 43 forks source link

0 / 0 NaN% type-coverage success. #91

Closed Jack-Works closed 3 years ago

Jack-Works commented 3 years ago

Version(if relevant): 2.17.2

Environment(if relevant): Windows

It seems like the new glob lib does not support windows well. It displays this on Windows machine while works well on CI.

0 / 0 NaN%
type-coverage success.
cdrini commented 3 years ago

Also getting the same error on Windows, although I went back to 2.10.x and still saw the issue. As a workaround for any Windows users, running it inside docker worked:

docker run -it --rm -v /$(pwd)://app -w //app node:14 npx type-coverage

In case it's useful:

$ tsc --version
3.8.3
cdrini commented 3 years ago

I also tried updating typescript to latest 4.2.4, but no luck.

Jack-Works commented 3 years ago

although I went back to 2.10.x and still saw the issue.

@cdrini you need to make sure the transitive dependency type-coverage-core also gets downgraded. please check out your lockfile to verify if it is really 2.10.x

plantain-00 commented 3 years ago

Can you provide tsconfig.json include and exclude? @Jack-Works @cdrini

Jack-Works commented 3 years ago

Our project is https://github.com/DimensionDev/Maskbook

The main tsconfig is /tsconfig.json, type-coverage is running on /packages/maskbook/ which using this tsconfig and have content:

{
  "extends": "../../tsconfig.json",
  "compilerOptions": {
    "rootDirs": ["./src/", "./abis/"],
    "outDir": "./dist/"
  },
  "include": ["./src/**/*.tsx", "./src/**/*.ts", "./src/**/*.json", "./abis/*.json"],
  "references": [{ "path": "../shared/" }, { "path": "../theme/" }, { "path": "../icons/" }]
}
plantain-00 commented 3 years ago

v2.17.3 should fix this

cdrini commented 3 years ago

Confirmed working for me on 2.17.3 :+1: Thank you @plantain-00 !

Jack-Works commented 3 years ago

works for me too thanks!