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

Created on 22 Mar 2020  路  5Comments  路  Source: formium/tsdx

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.

bug

Most helpful comment

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

All 5 comments

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

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__.

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

@allcontributors please add @rockmandash for bug

@agilgur5

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

Was this page helpful?
0 / 5 - 0 ratings