-
Notifications
You must be signed in to change notification settings - Fork 45
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
Q: how to configure resolving tsconfig with workspace packages? #3446
Comments
Thanks for the sample repo. We can't get the
Are we missing something? At a glance, we can see a few things missing from your setup:
Once you complete these steps, you should be able to run |
If rules out task runner (moon), jest cli still works in either way
But doesn't work
|
We're not quite sure why this isn't working for you, but we have identified that it works if you rename your configuration file to |
Yes, I also noticed those too. Unfortunately, unlike the example repo I created, there are the actual TypeScript dependencies in the config file so it isn't easy to use js as a config. |
In April 2024, we updated Wallaby's jest integration to always process TypeScript files with If we update your project to use We have found a workaround that allows you to use To fix the problem in your sample project (after updating the project to use packages/pkg-core/tsconfig.json
If you know a better way of doing this for your project, please let us know. If you're not OK with the workaround, please let us know and we'll consider another option for you. |
Thanks, that gives me a clue to explore further. It looks like there's an edge case to ts-node's config module resolution. I filed TypeStrong/ts-node#2146 and created a short workaround fix to the upstream itself. I can apply a patch / workaround on the repo's ts-node dependency, but afaik wallaby manages dependency on its own, so I presume there's no way to apply custom patches on those. Am I understanding this correctly? If that's the case probably the other way of workaround is removing subpath exports, while it is still not ideal. For the issue itself, I think it can be closed since this is more upstream issue. Still hope if there's a way to apply some patches to the wallaby's core but that's probably out of the scope. |
We will take a look at your PR and do some testing early next week. If there are no issues, we'll apply a similar patch to our version of |
We've applied your PR to Wallaby's version of |
Issue description or question
https://github.com/kwonoj/wallaby-workspace-test
When running jest via cli
yarn test
, tsconfig extending from workspace packageseems being resolved and
jest.config.ts
being parsed. In wallay, gettingIs there a way to setup / configure to resolve workspace package's tsconfig?
Wallaby diagnostics report
The text was updated successfully, but these errors were encountered: