hiyaryan / the-cdj

The Cognitive Distortion Journal (CDJ) is a smart journaling tool that helps remedy distorted thinking. It can feel impossible to follow the CBT technique of labeling distorted thinking and finding alternative modes of thought (i.e. reframing) while cognitive distortions are occurring. The CDJ does that work for you. -- The CDJ is in beta testing!!
https://thecdj.app
3 stars 0 forks source link

139 Routes TS Migration #155

Closed davidzlu closed 3 weeks ago

davidzlu commented 1 month ago

Example migrating routes directory to Typescript.

index.js in routes directory was not migrated as changing to TS caused issues with import statements when running unit tests. It seems like when index.js becomes index.ts, the jest runtime environment can't resolve the import statements within the barrel file. This might be due to an issue with how babel-jest is transpiling things, but I haven't been able to figure it out yet. Even adding the babel typescript preset didn't solve the issue.

Application still runs in containers after migrating index.js to TS, however. This issue only happens with jest.

hiyaryan commented 4 weeks ago

@davidzlu The initial TS migration #156 has been merged into the main TS Migration #139! Please merge it into your PR here and resolve any conflicts. With this setup we should be able to work in parallel with only fast-forwards. 😃