Rich-Harris / estree-walker

Traverse an ESTree-compliant AST
MIT License
389 stars 37 forks source link

Move `@types/estree` to dependencies instead of devDeps #35

Closed Ayc0 closed 1 year ago

Ayc0 commented 1 year ago

As estree is exposed in the types used by estree-walker, when using estree-walker with a strict package manager like yarn pnp, TypeScript warns us that it cannot find the package estree when using estree-walker:

image

Here is the error I have in TypeScript:

.yarn/cache/estree-walker-npm-3.0.1-f100136724-002ec6bba6.zip/node_modules/estree-walker/types/index.d.ts(18,56): error TS2307: Cannot find module 'estree' or its corresponding type declarations.

Moving @types/estree to the deps would allow other package to directly find estree (as devDeps are not installed by other packages, but deps are)