mermaid-js / zenuml-core

The ZenUML renderer
https://embed.zenuml.com
MIT License
31 stars 8 forks source link

Fix/vue-warning #176

Closed dontry closed 3 months ago

dontry commented 3 months ago

This MR addresses several Vue warnings in unit tests:

  1. [Vue warn]: (deprecation RENDER_FUNCTION) Vue 3's render function API has changed.

This is fixed by configuring compat config in beforeEach hook as below:

 configureCompat({
      RENDER_FUNCTION: false,
    });
  1. [Vue warn]: (deprecation ATTR_FALSE_VALUE) Attribute "rtl" with v-bind value false will render rtl="false" instead of removing it in Vue 3. To remove the attribute, use null or undefined instead.

This is fixed by configuring compat config in beforeEach hook as below

 configureCompat({
       ATTR_FALSE_VALUE: false,
    });
  1. [Vue warn]: (deprecation GLOBAL_MOUNT) The global app bootstrapping API has changed: vm.$mount() and the "el" option have been removed. Use createApp(RootComponent).mount() instead. Details: https://v3-migration.vuejs.org/breaking-changes/global-api.html#mounting-app-instance

This is fixed it by refactoring EventBus file. Removed new Vue() and created a native EventEmitter instance.