-
Notifications
You must be signed in to change notification settings - Fork 90
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
Update crypto statement to fix vite issue #1652
Conversation
27480d2
to
df8e9dd
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1652 +/- ##
==========================================
- Coverage 97.54% 97.43% -0.12%
==========================================
Files 22 22
Lines 857 858 +1
Branches 93 93
==========================================
Hits 836 836
- Misses 20 22 +2
+ Partials 1 0 -1 ☔ View full report in Codecov by Sentry. |
I tried this branch with the repo to reproduce the issue https://github.com/flexchar/meili-issue-1299 and it works! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking in consideration my comment. I tested on my project and it worked perfectly. Awesome work. ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors merge
1653: Update version for the next release (v0.40.0) r=curquiza a=meili-bot - Fix the issue introduced in the v0.39 that affected vite apps #1652 `@brunoocasali` - Now to use the `generateTenantToken` you should use it with `await`: before: ```js const token = client.generateTenantToken(apiKeyUid, searchRules, { apiKey: apiKey, expiresAt: expiresAt, }) ``` after: ```js const token = await client.generateTenantToken(apiKeyUid, searchRules, { apiKey: apiKey, expiresAt: expiresAt, }) ``` Co-authored-by: meili-bot <[email protected]>
After the introduction of this PR #1616 we had a bunch of issues related to vite configuration on client projects as shown here meilisearch/meilisearch-js-plugins#1299
This PR introduces the rollback needed to fix the consumer's code. If this change is not enough, I will completely reverse the PR 1616.
Edit:
I was able to solve the issue, by using this branch with this reproduction repo I could build the project and also run the application without any issue.
But this change introduces some breaking changes in the JWT code:
Now it is required to use await:
await client.generateTenantToken(..)
instead of justclient.generateTenantToken(..)
.