feat: split class conversion to enable other Babel plugin conversion #100
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To ensure that other plugins can be used upfront the conversion of the ES6 imports and classes to UI5 AMD-like syntax and Object.extend, the plugin now runs in the exit phase of the visitor. This allows other plugins, e.g. decorators to run before and convert the code accordingly. This plugin only sanitizes the decorators to remove the plugin proprietary ones to avoid conflicts with other plugins.
Added tests to ensure that a proper decorator handling works when using the plugin-proposal-decorators or that e.g the conversion of getters/setters takes place when using the babel plugin named plugin-transform-property-mutators as this is not part of the preset-env by default.
Updated all dependencies of the project with this change.
Fixes #23
Fixes #25
It makes #23 and #25 working but to completely fix it, the lifecycle/architecture of the plugin needs to completely adopted as mentioned by @Elberet in his issues. But with the changes of this PR it at least can work with class decorators and the transpiling of the getters and setters.