Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(addon): wrong vue directives transform filter #380

Merged
merged 4 commits into from
Sep 27, 2024

Conversation

userquin
Copy link
Contributor

@userquin userquin commented Sep 27, 2024

Testing Nuxt 3 integration the filter seems to be wrong, we only need to check if resolveDirective as _resolveDirective is present, if we use a template with a div and the directive there is no _ctx., check test added, without this fix the directive will not be imported.

This PR also includes:

  • set meta.vueDirectives=true for directives resolved via scan dirs: this will allow Nuxt DevTools to add Directives entry, right now directives shown as composables (when using scan and the new directives folder I'm adding to Nuxt): ✔️ feat: add directives page nuxt/devtools#740
  • include missing types in Vue preset: added MaybeRef, MaybeRefOrGetter and DirectiveBinding

imagen

@userquin userquin changed the title fix(addon): wrong transform filter fix(addon): wrong vue directives transform filter Sep 27, 2024
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.62%. Comparing base (a4a5e0a) to head (c7a11e0).
Report is 45 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #380      +/-   ##
==========================================
- Coverage   98.73%   97.62%   -1.11%     
==========================================
  Files          14       15       +1     
  Lines        1817     1434     -383     
  Branches      374      457      +83     
==========================================
- Hits         1794     1400     -394     
- Misses         23       34      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@userquin userquin marked this pull request as draft September 27, 2024 17:24
@userquin userquin marked this pull request as ready for review September 27, 2024 17:45
@antfu antfu merged commit cf374a5 into unjs:main Sep 27, 2024
4 of 5 checks passed
@userquin userquin deleted the feat-add-more-vue-directive-options branch September 28, 2024 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants