-
Notifications
You must be signed in to change notification settings - Fork 157
feat(algoliasearch): add support for algoliasearch v4 #756
Conversation
The bundle size increased because:
We cannot use the JavaScript Helper v3 in Vue InstantSearch v2 because it introduced breaking changes. Why isn't the Client v4 compatible with the Helper v2? (if that's only because of the |
Yes, either we make the client v4 workable with v2 of the helper, or we do this change only in the next branch on Vue InstantSearch |
package.json
Outdated
@@ -47,11 +47,11 @@ | |||
"release:publish": "scripts/release-publish.sh" | |||
}, | |||
"dependencies": { | |||
"algoliasearch-helper": "^2.26.1", | |||
"algoliasearch-helper": "^3.0.0", |
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.
"algoliasearch-helper": "^3.0.0", | |
"algoliasearch-helper": "^2.28.1", |
InstantSearch.js v3 needs an update with this too (however it should also be deduplicated if it doesn't)
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.
Confirmed, we still get Gzipped Size: 68.82 KB
with this update. We need to update instantsearch first right?
/Users/nunomaduro/Algolia/vue-instantsearch/node_modules/algoliasearch-helper/package.json:
1 {
2: "name": "algoliasearch-helper",
3 "version": "2.28.1",
4 "description": "Helper for implementing advanced search features with algolia",
/Users/nunomaduro/Algolia/vue-instantsearch/node_modules/instantsearch.js/node_modules/algoliasearch-helper/package.json:
1 {
2: "name": "algoliasearch-helper",
3 "version": "2.26.1",
4 "description": "Helper for implementing advanced search features with algolia",
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.
Seems that yarn did not correctly deduplicated the dependencies in the lockfile, I will fix this.
Just updating the lockfile isn't enough, we also need to update InstantSearch, since we can't be sure people will update the lockfile (and thus have duplicates) |
If I'm not mistaken |
This change add support for algoliasearch v4 to Vue-InstantSearch.
No changes were necessary in the code. Also since the client is mocked in the unit tests we did not add an extra job on CIrcleCI to test with the 2 versions of the client.
The examples were updated to use the latest v4 beta.
Important note: we also upgraded the algoliasearch-helper dependency to 3.0.0 which is the version that support algoliasearch v4.
Update: after upgrading algoliasearch-helper from 2.26.1 ot 3.0.0 the bundle size jumped from 59KB to 68KB. We need to investigate on it:
Bundle size
Before:After: