Pass ts.Program to getCustomTransformers()#889
Pass ts.Program to getCustomTransformers()#889johnnyreilly merged 3 commits intoTypeStrong:masterfrom
Conversation
|
This looks awesome! Thanks for contributing! It looks like the test output for the custom transformers needs regenerating. You can find instructions on how to do that here: https://github.com/TypeStrong/ts-loader/blob/master/test/comparison-tests/README.md#regenerating-test-data |
|
The expected test output seems correct, as it should make the string literal uppercase but it doesn't. But I get the same failing test on Looked into it briefly and the custom transformer in the tests seems to get called, but the changes are not applied. |
|
As in the functionality doesn't work at all? Or just the test isn't triggering the functionality successfully? Have you successfully used your fork locally? I'm travelling at the moment and so can't test this myself I'm afraid... |
A lot of transformers requires a Program instance so we pass ts.Program to getCustomTransformers() to be able to pass it on to transformers
|
Never mind, I forgot to set Hopefully works now! |
|
Nice one! I'll look to merge and release when I'm back. Thanks! |
|
Thanks! I'll look to ship this with |
|
Had hoped this was going to be my first automated deployment with GitHub Actions. Alas not: Will have to do this by hand 😥 |
A lot of transformers requires a Program instance so we pass ts.Program to getCustomTransformers() to be able to pass it on to transformers. Transformers mostly need ts.Program in order to access the type checker.
Fixes #860