ionic-team/trapeze

`@types/jest` included in dependencies

kensodemann opened this issue · 1 comments

When using @capacitor/assets in an application using vite and vitest and not jest causes the editor to no longer flag the use of jest specific structures as an error, which degrades the DX when writing unit tests.

If I remove @capacitor/assets the errors are once again displayed in the editor.

Digging into this, I found that @capacitor/assets indirectly installs @types/jest:

~/Projects/Demos/auth-playground-vue (main ✘)✹ ᐅ npm ls @types/jest
auth-playground-vue@0.0.1 /Users/ken/Projects/Demos/auth-playground-vue
└─┬ @capacitor/assets@2.0.4
  └─┬ @trapezedev/project@5.0.10
    └── @types/jest@27.5.2

Trapeze probably ought to have @types/jest in the devDependencies since it is a development time thing.

By the same token, though, I wasn't sure if Trapeze should be an installed dependency either as it also seems like a development time thing. I am guessing that both projects need their dependencies reviewed as to what belongs in the dependencies and what belongs in the devDependencies.

Created PR #187 .
It was not clear to me which of the current deps really ought to be devDeps as I am not that familiar with the code base. However, it certainly does make sense that the @types packages would be devDeps.