jeffijoe / typesync

Install missing TypeScript typings for dependencies in your package.json.
MIT License
1.53k stars 22 forks source link

can we have an option to have all @types only on root package.json of monorepo? #51

Closed sibelius closed 3 years ago

sibelius commented 4 years ago

we install @types for all monorepo packages inside root package.json, so we don't need to install them in every single package of the monorepo

can we add an option for this behavior?

it should search all package.json, and install all @types of all packages inside the root package.json

jeffijoe commented 4 years ago

Would it make sense to make this the default behavior instead? I never used monorepos so I don't know the workflow.

sibelius commented 4 years ago

For me yes, not sure for everybody else

vijaybritto commented 4 years ago

What happens when different versions of the same package exist? How will code editors figure out that we require v1 of types in a package and v2 in other?

socksrust commented 4 years ago

Types should be hooked into the root package.json only if they have same version for all packages.

sibelius commented 4 years ago

we always try to upgrade all packages to the same versions

sibelius commented 3 years ago

it is better to keep @types in packages they belong