You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Capturing a few items from my personal to-do list that need to be double-checked:
when swc: true, make sure path is an absolute path to ts-node's own SWC transpiler
absolute path to the swc transpiler, which itself is responsible for finding and loading @swc/core or @swc/wasm
Within swc transpiler
use tsconfig-relative require() to find swc first
fallback to require() relative to ts-node, in case ts-node is a global installation
When transpiler is a string, do project-local require
When transpiler is the ts-node/transpilers/swc-experimental, also fallback to absolute path to globally-installed-ts-node-transpiler for backwards compat
can we do this with require.resolve(specifier, {paths})?
Consider genericizing this require() logic
We have several use-cases for this: locate transpiler, locate compiler, locate @swc/core|wasm, locate --require
make a single require.resolve wrapper that understands the nuance of how we locate dependencies in all the above situations
- if specifier comes from a tsconfig, attempt to resolve relative to tsconfig
- if specifier comes from API or CLI, attempt to resolve relative to ...
- CWD?
- entrypoint? (for shebangs?) No, the shebang case is handled by having a tsconfig next to the entrypoint
tweak swc jsdoc to link to ts-node website, since it requires installing additional deps
Activity
Resolve #1613: transpiler / swc things to double-check (#1627)
Update dependency ts-node to v10.5.0 (#1156)