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
If the transform path is relative, it is resolved relative to the path housing the project's tsconfig.json.
It seems, however, if the compiler API is used, these paths get resolved relative to cwd. It would be more preferable to determine project root and resolve from there.
tsc resolves ./my-transformer.ts from /my-project/.
ts.createProgram resolves ./my-transformer.ts from process.cwd()
Release Note
I'm choosing to release this update as non-major because it has a very low impact-vector and v2 is marked out for the next version. I wrestled with this for some time, however, because the behaviour is aberrant and likely affects few (if any) people's workflow, I'm marginally comfortable with the decision in this case.
If the
transform
path is relative, it is resolved relative to the path housing the project'stsconfig.json
.It seems, however, if the compiler API is used, these paths get resolved relative to
cwd
. It would be more preferable to determine project root and resolve from there.Example
/my-project/tsconfig.json
In the above example:
tsc
resolves./my-transformer.ts
from/my-project/
.ts.createProgram
resolves./my-transformer.ts
fromprocess.cwd()
Release Note
I'm choosing to release this update as non-major because it has a very low impact-vector and
v2
is marked out for the next version. I wrestled with this for some time, however, because the behaviour is aberrant and likely affects few (if any) people's workflow, I'm marginally comfortable with the decision in this case.Related
#53
The text was updated successfully, but these errors were encountered: