Skip to content

Migrate IDE event bus to mitt

Paul Gascou-Vaillancourt requested to merge migrate-ide-event-bus into master

What does this MR do?

As per our recommendations to prepare to migration to Vue 3, this removes the Vue event bus from the IDE code in favor of a mitt-based solution.

This MR lays the groundwork for other migrations by providing an event hub factory to create a mitt event bus that exposes the same methods as Vue-based event busses ($on, $off and $emit). This makes migrating to the new approach as easy as changing the module that exports the event bus:

-import Vue from 'vue';
+import createEventHub from '~/helpers/event_hub_factory';
 
-export default new Vue();
+export default createEventHub();

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Mitt was made for the browser, but works in any JavaScript runtime. It has no dependencies and supports IE9+.

  • [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Edited by Paul Gascou-Vaillancourt

Merge request reports