Skip to content

fix(javascript): improve bundlesize, add check to CI #762

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

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

shortcuts
Copy link
Member

@shortcuts shortcuts commented Jun 28, 2022

🧭 What and Why

🎟 JIRA Ticket: -

Changes included:

In #738, I forgot to check/increase the bundlesize, which also made me realize that we use Object.entries in the JS client, which is not supported in some (older/IE) browsers, and had huge impact on size (~60kb in algoliasearch).

In this PR, we now only leverage Object.keys, and also check for the bundlesize in the CI, which allow us to catch those big increase issue.

🧪 Test

CI :D

@shortcuts shortcuts self-assigned this Jun 28, 2022
@netlify
Copy link

netlify bot commented Jun 28, 2022

Deploy Preview for api-clients-automation canceled.

Name Link
🔨 Latest commit 70fd7ca
🔍 Latest deploy log https://app.netlify.com/sites/api-clients-automation/deploys/62baf74967de970008e002e9

@algolia-bot
Copy link
Collaborator

algolia-bot commented Jun 28, 2022

✗ The generated branch has been deleted.

If the PR has been merged, you can check the generated code on the main branch.
You can still access the code generated on main via this commit.

@shortcuts shortcuts marked this pull request as ready for review June 28, 2022 10:58
@shortcuts shortcuts requested review from a team, damcou and millotp and removed request for a team June 28, 2022 11:01
millotp
millotp previously approved these changes Jun 28, 2022
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.

nice catch, I didn't know it could have such a big impact !

Base automatically changed from feat/generators-algoliasearch-js to main June 28, 2022 12:30
@shortcuts shortcuts force-pushed the fix/js-bundlesize branch from 831c932 to 70fd7ca Compare June 28, 2022 12:42
@shortcuts shortcuts requested a review from millotp June 28, 2022 12:43
@shortcuts shortcuts enabled auto-merge (squash) June 28, 2022 12:43
@shortcuts shortcuts merged commit b9c4145 into main Jun 28, 2022
@shortcuts shortcuts deleted the fix/js-bundlesize branch June 28, 2022 12:53
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.

3 participants