-
-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
swc transpiler and new --transpiler option to use third-party transpi…
…lers (#1160) * WIP experimental swc compiler * Fix optional peer dep * wip * properly merge all of ts onto exports object * fix clobbering of code because swc does not append a //# sourcemap comment * More changes: - rename from ts-node/compilers/swc to ts-node/compiler/swc-experimental - add @swc/wasm fallback when @swc/core is not installed or available - expand TSCommon to include all api surface used by ts-node; use TSCommon consistently (should be extracted to a different PR) - ts-node's compiler loading logic detects a createTypescriptCompiler function and will invoke it to get instance of compiler - fix ts-node's sourcemap comment appender to work even when TS compiler does not append a sourcemap comment. swc does not append such a comment * Fix bug in swc loading to allow swc API instance to be passed to factory * lint fixes * Fix typo in createTypescriptCompiler function name * Switch from hacky overloading the "compiler" config to implementing a new, dedicated custom transpiler API * fix package.json files array and add --transpiler CLI flag * make --transpiler imply --transpile-only and add tests * fixes * add missing test files * add @swc/core dep to tests * add some jsdoc to new transpiler api surface * change transpiler options to be specified as "transpiler: [name, {/*options*/}]" * fix * cleanup comments
- Loading branch information
Showing
13 changed files
with
367 additions
and
20 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Oops, something went wrong.