Skip to content
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

Fix ide typescript compatability in __tests__ dir #3620

Merged
merged 6 commits into from
Oct 29, 2023

Conversation

tonyraoul
Copy link
Contributor

Description

While having a look at #3590 I found out that WeakRef was not defined although ESNext was being in use.
Apparently VSCode and most LSP servers don't recognise tsconfig.test.json and the directory was explicitly excluded from the project root, only tsconfig.json is recognised.

This PR aims at fixing Developer Experience while working within __tests__ for both mobx-react and mobx-react-light packages.

Hope I am helping.
Cheers.

@changeset-bot
Copy link

changeset-bot bot commented Feb 1, 2023

⚠️ No Changeset found

Latest commit: 899d392

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@urugator
Copy link
Collaborator

urugator commented Feb 1, 2023

Thanks for looking into it. Isn't there the same issue with mobx package?
I wasn't able to get rid of those "decorators are experimental" warnings in tests , so this could somehow explain it... (but IIRC i did tried to remove __test__ from exludes) ...

@tonyraoul
Copy link
Contributor Author

tonyraoul commented Feb 1, 2023

@urugator

Isn't there the same in issue with mobx package?

Added a fix for it in 9409d73

I wasn't able to get rid of those "decorators are experimental" warnings in tests , so this could somehow explain it... (but IIRC i did tried to remove test from exludes) ...

I was able to see this issue within VSCode and after 9409d73 it's fixed.
Removing __tests__ from exclude would have solved the issue if ES2021.WeakRef was added to lib, however within the mobx-react directory lib is set to es6 which doesn't have WeakRef.

@tonyraoul
Copy link
Contributor Author

@urugator would you like me to close this or is it still needed ?

@urugator
Copy link
Collaborator

No please keep it open. The PR is very much appreciated, I (or someone else) will get to it eventually. There are just other issues I would like to settle first and I don't want to accidentaly complicate their resolution due to config changes or something. Sorry for the delay.

@urugator urugator merged commit 5846dfe into mobxjs:main Oct 29, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants