palantir / conjure-typescript-runtime

An HTTP bridge library for use in front end applications and generated conjure code
Apache License 2.0
5 stars 13 forks source link

upgrade karma deps #152

Closed pgoldberg closed 2 years ago

pgoldberg commented 2 years ago

Before this PR

Necessary to unblock https://github.com/palantir/conjure-typescript-runtime/pull/151

When trying to run karma integration tests after switching to using web-streams-polyfill/ponyfill, I was getting an obscure error:

19 08 2022 23:19:58.878:INFO [compiler.karma-typescript]: Compiling project using Typescript 3.2.4
19 08 2022 23:20:01.579:INFO [compiler.karma-typescript]: Compiled 58 files in 2674 ms.
19 08 2022 23:20:02.169:ERROR [karma]: { inspect: [Function: inspect] }
error Command failed with exit code 1.

After googling it, I found this comment, https://github.com/karma-runner/karma/issues/3764#issuecomment-1043010803. I set a breakpoint at the place the comment mentioned, and saw this error:

'Unable to resolve module [web-streams-polyfill/dist/types] from [/Volumes/git/conjure-typescript-runtime/packages/conjure-client/src/fetchBridge/blobReadableStreamAdapter.js

This seemed pretty strange to me, and after playing around with it for a while without being able to resolve it, I just tried bumping karma-typescript, which fixed the issue. That caused some deprecation warnings, so I bumped karma to resolve those. Then I figured I might as well upgrade all of the karma-related deps to latest (I checked the changelogs, doesn't look like there are any major breaks that would affect us).

I didn't dig too much more into what caused the problem, but I'm guessing it's the bug that this PR resolved: https://github.com/monounity/karma-typescript/pull/437

After this PR

==COMMIT_MSG== Upgrade karma dependencies ==COMMIT_MSG==

Possible downsides?