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

feat(javascript): add worker build #4249

Merged
merged 8 commits into from
Dec 16, 2024
Merged

Conversation

shortcuts
Copy link
Member

🧭 What and Why

🎟 JIRA Ticket: https://algolia.atlassian.net/browse/DI-3318

Changes included:

follow up of algolia/algoliasearch-client-javascript#1573
closes algolia/algoliasearch-client-javascript#1567

adding a new build adds some overhead on the maintenance/build time of the client but for good, it prevents breaking the generateSecuredApiKey signature and allows us to still keep a fetch build as well as a worker build

the update of the package.json is a breaking change however, since it changes the imported build, but since it wasn't working... kind of a fix

@shortcuts shortcuts self-assigned this Dec 16, 2024
@shortcuts shortcuts requested a review from a team as a code owner December 16, 2024 12:44
@algolia-bot
Copy link
Collaborator

algolia-bot commented Dec 16, 2024

✔️ Code generated!

Name Link
🪓 Triggered by fa507b0c4b0b086e992a2877c2f838f484f1633f
🍃 Generated commit 9c95c55df7285bda6e3d1623b050b2933e34556f
🌲 Generated branch generated/fix/javascript-worker-crypto
📊 Benchmark results

Benchmarks performed on the method using a mock server, the results might not reflect the real-world performance.

Language Req/s
go 1673
javascript 1569
csharp 1467
php 1441
java 1126
python 1094
ruby 888
swift 758

shortcuts and others added 2 commits December 16, 2024 13:47
Co-authored-by: Torbjørn Holtmon <torbjornholtmon@gmail.com>
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

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

gg

}

{{#searchHelpers}}
async function getCryptoKey(secret: string): Promise<CryptoKey> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need to import CryptoKey ?

@shortcuts shortcuts enabled auto-merge (squash) December 16, 2024 15:43
@shortcuts shortcuts merged commit d6f48a4 into main Dec 16, 2024
28 checks passed
@shortcuts shortcuts deleted the fix/javascript-worker-crypto branch December 16, 2024 15:56
algolia-bot added a commit that referenced this pull request Dec 16, 2024
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
Co-authored-by: Torbjørn Holtmon <torbjornholtmon@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-javascript that referenced this pull request Dec 16, 2024
algolia/api-clients-automation#4249

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
Co-authored-by: Torbjørn Holtmon <torbjornholtmon@gmail.com>
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.

[bug]: Unable to use search client in cloudflare workers: Cannot bundle Node.js built-in "crypto"
3 participants