-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: jest fast transpile. no more ts-jest. (#5530)
`ts-jest` is slow. It performs full type checking before we even hit a line of code. This can lead to upwards of 7+ seconds of wait time in some cases (like e2e tests). It's not really necessary to do such type-checking when in a development cycle, as: 1. Your IDE is likely running tsc. 2. You're likely running an `yarn tsc -b --watch` in the root of the project, to ensure you're getting incremental builds applied to `dest` folders for cross module imports. 3. CI will do a full build as a backstop for devs that didn't do incrementals and forgot to sanity check the project with a `yarn build`. This PR swaps `ts-jest` for `@swc/jest`, a rust transpiler which can leverage the explicit `type` imports in the previous PR to do very fast ts->js transpilation. I think swapping out type-safety in this point of the dev cycle is worth the improved feedback cycle. Especially given points above. It also knocks about a second off startup time by not calling `yarn bin jest` in the test script, as yarn startup itself is annoyingly slow. Running foundation tests: * before: `7.8s` * after: `3.7s` Running circuits.js tests: * before: `13.3s` * after: `5.8s` I expect the performance improves even more as you higher up the stack and ts-jest had more to transpile.
- Loading branch information
1 parent
a5076ca
commit 1912802
Showing
46 changed files
with
545 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"scripts": { | ||
"build": "yarn clean && yarn generate && tsc -b" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.