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

chore: use vitest expect-type only #4868

Merged
merged 7 commits into from
Oct 16, 2023
Merged

chore: use vitest expect-type only #4868

merged 7 commits into from
Oct 16, 2023

Conversation

mmkal
Copy link
Collaborator

@mmkal mmkal commented Oct 1, 2023

Closes #

🎯 Changes

Replace copy-pasted expect-type from mmkal/expect-type#16 with the prerelease version published to npm.

Creating as a draft initially so I can make sure this doesn't regress anything. I ran pnpm test-ci with and without this change a bunch of times and the timing was pretty much the same, and it passes.

Note: I don't actually see how inferenceUtils.ts is ever referenced but I'm guessing there's some tsconfig setup making its exports available globally. So I just replaced its contents with export * from 'expect-type'.

CC @KATT and @neo773 who I think copy-pasted it originally in #3271? Anything I should check before declaring #mmkal/expect-type#16 ready for release? I want to make sure this repo and vitest are both happy with it and can stop maintaining forks.

βœ… Checklist

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

@vercel
Copy link

vercel bot commented Oct 1, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
next-prisma-starter βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Oct 16, 2023 8:24am
og-image βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Oct 16, 2023 8:24am
trpc-next-app-dir βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Oct 16, 2023 8:24am
www βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Oct 16, 2023 8:24am

@mmkal
Copy link
Collaborator Author

mmkal commented Oct 1, 2023

Oh, it looks like vitest exports their forked expectTypeOf implementation and that's what's being used here - no wonder there was so little difference! There might be a bug in their implementation too, but will do some digging.

@mmkal mmkal changed the title use my version of expect-type use vitest expect-type only Oct 1, 2023
@mmkal
Copy link
Collaborator Author

mmkal commented Oct 1, 2023

Updated to remove the expect-type dependency completely for now. If trpc is using vitest it should just use the re-exported version from there.

KATT
KATT previously approved these changes Oct 6, 2023
@KATT KATT marked this pull request as ready for review October 6, 2023 15:25
@KATT KATT requested a review from a team as a code owner October 6, 2023 15:25
@KATT
Copy link
Member

KATT commented Oct 6, 2023

thanks for this :)

# Conflicts:
#	packages/client/package.json
#	packages/server/package.json
#	pnpm-lock.yaml
KATT
KATT previously approved these changes Oct 6, 2023
KATT
KATT previously approved these changes Oct 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants