-
-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass ts.Program to getCustomTransformers() #889
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