Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

fix(vue): support optional chaining #564

Merged
merged 2 commits into from
Feb 21, 2022
Merged

Conversation

dhayab
Copy link
Member

@dhayab dhayab commented Feb 18, 2022

This PR updates dependencies for Vue InstantSearch templates, to add support for optional chaining.

@dhayab dhayab requested review from a team, FabienMotte and sarahdayan and removed request for a team February 18, 2022 16:48
@Haroenv
Copy link
Contributor

Haroenv commented Feb 18, 2022

What do you plan to use it for? is it maybe possible to regenerate with a more modern config that supports this + others out of the box? maybe via vite?

@dhayab
Copy link
Member Author

dhayab commented Feb 18, 2022

@Haroenv this was a quick win I found when adapting the Autocomplete x Vue InstantSearch guide for Vue 2. I'll set aside an hour or two to replace those with a vite-based boilerplate. Also, I had doubts about updating the Vue InstantSearch 2 template but maybe it is not necessary, since the last release (2.7.1) was ~2y ago. Wdyt?

@dhayab dhayab marked this pull request as draft February 18, 2022 18:52
@sarahdayan
Copy link
Member

+1 for using this as an opportunity to go with a more modern toolchain—if this doesn't take too long and doesn't create time consuming issues to solve.

@dhayab
Copy link
Member Author

dhayab commented Feb 21, 2022

@Haroenv @sarahdayan I looked into it and I'm not positive we should move the template to Vite.

Vue 2 support in Vite depends on a community plugin (https://github.com/underfin/vite-plugin-vue2), and although it seems maintained by a known figure in the Vue community, it might create unforeseen issues / support requests, compared to bumping @vue/cli and its dependencies. Wdyt?

@Haroenv
Copy link
Contributor

Haroenv commented Feb 21, 2022

Yes, that indeed doesn't sound better. Maybe then babel preset env just needs to be updated? It just seems a little odd to add only the optional chaining explicitly, as it's no longer a proposal

@dhayab dhayab marked this pull request as ready for review February 21, 2022 14:13
Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

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

lgtm when CI passes :)

@dhayab dhayab enabled auto-merge (squash) February 21, 2022 14:15
@dhayab dhayab merged commit 2dfa2ec into master Feb 21, 2022
@Haroenv Haroenv deleted the fix/vue-optional-chaining branch February 21, 2022 14:16
aymeric-giraudet pushed a commit to algolia/instantsearch that referenced this pull request Dec 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants