question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
agilgur5commented, Mar 29, 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

2reactions
JustFly1984commented, Mar 22, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript is not picking up Jest types - Stack Overflow
I am using VS Code; I have installed @types/jest; I have attempted to reinstall all my packages; I have reloaded my editor; Here...
Read more >
types/jest dependency should be changed to @jest/types #387
Looks like Jest v27 types are not supported by @types/jest and were moved to @jest/types . Suggested solution: Should @types/testing-library__ ...
Read more >
types/jest - npm
@types/jest. TypeScript icon, indicating that this package has built-in type declarations · Readme · Code Beta · 2 Dependencies · 7,851 Dependents ...
Read more >
Installing ts-jest - Huafu
You can install ts-jest and dependencies all at once with the following commands. Using npm : npm install --save-dev jest typescript ts-jest @types/jest....
Read more >
types/jest@26.0.24 - Snyk Vulnerability Database
Learn more about known @types/jest 26.0.24 vulnerabilities and licenses ... This does not include vulnerabilities belonging to this package's dependencies.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found