Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@types/jest included in dependencies #186

Closed
kensodemann opened this issue Mar 30, 2023 · 1 comment · Fixed by #187
Closed

@types/jest included in dependencies #186

kensodemann opened this issue Mar 30, 2023 · 1 comment · Fixed by #187

Comments

@kensodemann
Copy link
Member

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
[email protected] /Users/ken/Projects/Demos/auth-playground-vue
└─┬ @capacitor/[email protected]
  └─┬ @trapezedev/[email protected]
    └── @types/[email protected]

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.

@jcesarmobile jcesarmobile transferred this issue from ionic-team/capacitor-assets May 8, 2023
@kensodemann
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant