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

Question: Why not include @types/jest as TSDX's dependencies? #633

Closed
rockmandash opened this issue Mar 22, 2020 · 6 comments · Fixed by #672
Closed

Question: Why not include @types/jest as TSDX's dependencies? #633

rockmandash opened this issue Mar 22, 2020 · 6 comments · Fixed by #672
Labels
kind: bug Something isn't working

Comments

@rockmandash
Copy link

Current Behavior

@types/jest is in newly generated package's devDependencies.

Desired Behavior

Why not include @types/jest as TSDX's dependencies?

This way, the newly generated boilerplate package's devDependencis will be cleaner.

Suggested Solution

Actually, if the newly generated boilerplate package's devDependencis includes only TSDX, that will be awesome, and I think it's doable.

Who does this impact? Who is this for?

All users

Describe alternatives you've considered

None.

@JustFly1984
Copy link

Please don’t bloat dependencies, it requires maintaining, updating and time to download/install for every deploy

@rockmandash
Copy link
Author

TSDX's dependencies include "jest": "^24.8.0".

When I generate a new project using TSDX, I get "@types/jest": "^25.1.4".

The version is a mismatch, this is not a problem about bloat dependencies.

@agilgur5
Copy link
Collaborator

agilgur5 commented Mar 22, 2020

I don't know for sure, but I'm pretty sure the reason for that is historical rather than intentional. TSDX was originally written in JS and most of the tests are still in JS (I've got a TODO to rewrite them, hopefully won't be too hard -- EDIT: it wasn't, see #649).

@types/jest was only added as a devDep in #146 which added the first and only TS test.

Also seems like @types/shelljs made its way in as a dep instead of a devDep too in #244

PR welcome to change both/either of those. Might need to be careful with the yarn.lock file when doing so


ts-jest's installation instructions do say to install @types/jest.

Side note: We're able to get away with most types as devDeps because TSDX is a CLI and so not generally imported into any TS code

@agilgur5
Copy link
Collaborator

@allcontributors please add @rockmandash for bug

@allcontributors
Copy link
Contributor

@agilgur5

I've put up a pull request to add @rockmandash! 🎉

@tony
Copy link

tony commented Mar 31, 2021

If you're working with Karma on a project (@types/karma), this as a hard-dependency makes life much harder.

I like tsdx for the build and watch, but the test opinions may be good to be optional

(I also have projects with jest, so those are fine)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants