Created by: raix
This pr swaps out babel and use swc for transpiling code building/testing
Overview:
-
Make start/build/test work with swc -
fix any broken tests -
enable browserlists support -
Remove support for Flow (currently not supported in swc) -
load project tsconfig/jsconfig and map into swc config -
use ts-jest for jest ts/tsx file transformation (keeping an eye on stc)(keeping the scope of the pr to swc) -
QA if project browserslist config is working -
QA project tsconfig mapping works -
QA project tsconfig is loaded in ts-jest -
Add babel back -
Move js/ts transformation out into separate files for swc and babel -
Add and document SWC_TRANSFORM
-
QA both babel and swc configurations -
Allow comments in jsconfig.json
- we use this file to configure swc in non TypeScript projects -
Cover by tests - reuse the kitchensink?
Notes:
- Currently eslint use use babel parser (waiting for someone to write eslint in rust / swc ast or transform swc ast to espree ast?)
Dependency updates:
- remove tar-pack seems to be unmaintained had a dependency on tar 2.x - we are now on tar 6.x
- jest patch update to
27.4.4
BREAKING CHANGE:
- When using swc it will removed support for Flow (done in one commit we can revert if https://github.com/swc-project/swc/issues/256 gets added)