charlierudolph / dependency-lint

Lints NPM dependencies and devDependencies
MIT License
14 stars 6 forks source link

Need to ignore @tsd/typescript after upgrading tsd to 0.16 #60

Closed aurelien-reeves closed 3 years ago

aurelien-reeves commented 3 years ago

Refs. https://github.com/cucumber/cucumber-js/pull/1681

tsd 0.16 moved their types to a dedicated npm package @tsd/typescript (cf. https://github.com/SamVerschueren/tsd/commit/53764847c3bee2eb8f1fc61cab4ba3bdb2497880).

In cucumber-js, after upgrading tsd, dependency-lint reported the following:

$ dependency-lint
devDependencies:
  ✖ @tsd/typescript (missing)
      used in scripts:
        build-local

I had to add @tsd/typescript to the ignore list to prevent the error (https://github.com/cucumber/cucumber-js/pull/1681/commits/f34c2a16456e197a43a84e35f832034db014bf70)

charlierudolph commented 3 years ago

Oh interesting. This appears to be caused by @tsd/typescript being a drop in replacement for typescript and exporting executables of the same name. Given typescript is a direct dependency and tsd/typescript is not, I'm confused why this is reported. I'll dig into this a bit more

charlierudolph commented 3 years ago

Looks like tsc in the node_modules bin folder is correctly pointing to typescript so appears this is an issue with dependency-lint and how it determines what module executables are available. I can switch to reading the node_modules/.bin folder instead of looking at the package.json files of the other files.

charlierudolph commented 3 years ago

Fixed in 7.0.1

charlierudolph commented 3 years ago

This is fixed for linux based systems but seems need to figure something else out for windows based systems

charlierudolph commented 3 years ago

Fixed in 7.1.0 (reverted to old way of finding executables but limited to just direct dependencies / devDependencies)