Closed hediet closed 2 years ago
Typescript has released latest version 4.3.2, but ttypescript is incompatible with it. I temporarily locked typescript's version (~4.0.3).
Would either of you mind trying it with ts-patch?
If you have an issue, I'll look into it and possibly submit a PR for ttypescript as well.
Would either of you mind trying it with ts-patch?
Is there a way to use ts-patch without ts-patch modifying any external files (like ttypescript)? Could you setup a github action that publishes some ts-patched-typescript?
Is there a way to use ts-patch without ts-patch modifying any external files (like ttypescript)?
Not at the moment. I have a plan for a new library which creates a much better plugin architecture. It will do in-memory modification with disk caching. Unfortunately, I'm pretty swamped, so that's in the hopeful pile.
Technically tsp will be faster, which is part of the reason I went with direct modification route to begin with. If your concern is with yarn overwriting it, there is an easy way to mitigate that. You can see an example in the crosstype repository
Would either of you mind trying it with ts-patch?
If you have an issue, I'll look into it and possibly submit a PR for ttypescript as well.
works a dream so far, thanks so much!
works a dream so far, thanks so much!
I can verify that!
"postinstall": "ts-patch install",
works nicely to ensure that contributors don't need to care about ts-patch
. However, I guess ts-patch
is not going to work with yarn berry.
However, I guess
ts-patch
is not going to work with yarn berry.
Should work just fine if you leverage postinstall-postinstall
package.
Oh, "yarn berry" is a thing, "berry" is not a person :)
Given the activity on this, the issues with ttypescript and its unmaintained status, and the current limitation with ts-patch
, I think it's time to do the rewrite.
I've sketched out the design. Here are the highlights:
tsc
or something else, default is tspc
)ttypescript
style transformer packagesI've decided to keep the name for simplicity and visibility. So the rewrite will be housed in ts-patch v2.
You can follow https://github.com/nonara/ts-patch/discussions/40 for updates
BTW - I've not looked into yarn 2 much, but if anyone wants to chime in on how we can support it out the gate, please feel free to share!
Development is underway! Would appreciate anyone's feedback on the config options and strategies laid out: https://github.com/nonara/ts-patch/discussions/40#discussioncomment-972611
Actually
This bug still appears to exist, why was it closed?
I took a look at ts-patch but it has 34 transitive dependencies while ttypescript has 0, so I would strongly prefer to see ttypescript fixed rather than migrating to ts-patch.
This is the error I get once I started
ttsc --watch
and changed a file: