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: async data prep functions should use Promise.resolve #475

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

stefl
Copy link
Contributor

@stefl stefl commented Jan 10, 2025

Description

  • These data prep functions for exports are marked as async
  • Use Promise.resolve to retain the expected async behaviour without changing the signature of each function
  • Not user-facing

Copy link

vercel bot commented Jan 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
oak-ai-lesson-assistant ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 1:25pm

Copy link

Playwright test results

passed  17 passed
skipped  2 skipped

Details

report  Open report ↗︎
stats  19 tests across 16 suites
duration  2 minutes, 48 seconds
commit  c7cff2c

Skipped tests

No persona › tests/auth.test.ts › authenticate through Clerk UI
No persona › tests/chat-performance.test.ts › Component renders during lesson chat › There are no unnecessary rerenders across left and right side of chat

@stefl stefl requested a review from a team January 10, 2025 13:41
Copy link
Collaborator

@codeincontext codeincontext left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Promise.resolve to retain the expected async behaviour without changing the signature of each function

I think this is an issue in linting, as the behaviour in both cases is identical. As far as I know, returning Promise.resolve in an async function is a no-op, the goal in this PR is to fix the lint warnings saying "this is an async function and it doesn't look like it needs to be"

@stefl stefl merged commit 4bc7cd8 into main Jan 13, 2025
18 checks passed
@stefl stefl deleted the fix/async_not_needed branch January 13, 2025 15:18
@oak-machine-user
Copy link
Collaborator

🎉 This PR is included in version 1.21.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants