ionic-team / trapeze

The mobile project configuration toolbox. Manage native iOS, Android, Ionic/Capacitor, React Native, and Flutter apps through a simple YAML format.
https://trapeze.dev
Other
323 stars 40 forks source link

`@types/jest` included in dependencies #186

Closed kensodemann closed 1 year ago

kensodemann commented 1 year ago

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.

kensodemann commented 1 year ago

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.