jest-clean-console-reporter icon indicating copy to clipboard operation
jest-clean-console-reporter copied to clipboard

build: switch to using typescript

Open yharaskrik opened this issue 4 years ago • 6 comments

Initial implementation of TS, never really setup a TS repo other than an Nx workspace before. I have all the files switched to typescript and the tsc build setup but will still need to work on out it is being compiled so it is packageable by npm

yharaskrik avatar Jan 19 '21 06:01 yharaskrik

This would make the building and packaging much easier if we wanted to go that way!

https://github.com/jevakallio/jest-clean-console-reporter/issues/2

yharaskrik avatar Jan 19 '21 06:01 yharaskrik

@yharaskrik thanks for this effort!

To make this easier to review, could you git rm dist/ and add dist/ to .gitignore?

Regarding development workflow, instead of Nx as discussed in #2, I'd favor tsdx. I've never used to to develop node libraries, but it does support CommonJS as output format: https://github.com/formium/tsdx

jevakallio avatar Jan 19 '21 08:01 jevakallio

Oh ya for sure! I did add dist to the git ignore but I must have added the folder to hit by accident prior.

I'll take a look at tsdx!

yharaskrik avatar Jan 19 '21 16:01 yharaskrik

Hey @jevakallio just letting you know that the type exports were merged into Jest master by @SimenB. Just gotta wait for those to land so that I can update this PR and then I think that is the last thing that needs to be done to get the TS migration done to have initial TS support!

yharaskrik avatar Jan 23 '21 17:01 yharaskrik

That change will only be available in Jest@27, so not sure you need to wait for it? As long as build/ works and a migration plan is in place I think it's fine to move on in the meantime 👍

SimenB avatar Jan 23 '21 18:01 SimenB

Oh sweet ok! Good to know, @jevakallio how do you feel about getting this in at some point then, we can roll with it for the time being and then I just need to update the type imports in a couple of places come jest 27.

yharaskrik avatar Jan 23 '21 18:01 yharaskrik