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(vue): add optional IonicConfig type parameter to IonicVue plugin #29637

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

Sukaato
Copy link
Contributor

@Sukaato Sukaato commented Jun 19, 2024

Issue number: resolves #29659


What is the current behavior?

while using .use(IonicVue, {}), the config object has no autocomplete.

What is the new behavior?

  • Add type autocomplete on plugin option in VueJS package.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@Sukaato Sukaato requested a review from a team as a code owner June 19, 2024 13:17
@Sukaato Sukaato requested a review from rugoncalves June 19, 2024 13:17
Copy link

vercel bot commented Jun 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2024 1:19pm

@Sukaato
Copy link
Contributor Author

Sukaato commented Jun 24, 2024

Any update on this PR ?

@thetaPC
Copy link
Contributor

thetaPC commented Jun 24, 2024

@Sukaato Thank you for the PR!

Is this PR associated to an open issue? If it is, please add the issue number. If it's not, please open a new issue that highlights the reason why this PR is needed.

@Sukaato
Copy link
Contributor Author

Sukaato commented Jun 25, 2024

here's the issue: #29659

@reslear
Copy link

reslear commented Jun 26, 2024

@thetaPC a really useful little improvement
everyone would stop using :)
// @ts-ignore

image

@thetaPC thetaPC requested review from thetaPC and removed request for rugoncalves June 26, 2024 23:52
@thetaPC thetaPC changed the title feat (vue): Add plugin type feat (vue): add optional IonicConfig type parameter to IonicVue plugin Jun 28, 2024
@thetaPC thetaPC changed the title feat (vue): add optional IonicConfig type parameter to IonicVue plugin feat(vue): add optional IonicConfig type parameter to IonicVue plugin Jun 28, 2024
Copy link
Contributor

@thetaPC thetaPC left a comment

Choose a reason for hiding this comment

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

LGTM

@thetaPC thetaPC added this pull request to the merge queue Jun 28, 2024
Merged via the queue into ionic-team:main with commit 90893f4 Jun 28, 2024
50 of 51 checks passed
@thetaPC thetaPC mentioned this pull request Jun 28, 2024
3 tasks
@brandyscarney brandyscarney changed the title feat(vue): add optional IonicConfig type parameter to IonicVue plugin fix(vue): add optional IonicConfig type parameter to IonicVue plugin Jun 28, 2024
@Sukaato Sukaato deleted the feat/vue-plugin-type branch June 29, 2024 07:50
github-merge-queue bot pushed a commit that referenced this pull request Jul 16, 2024
Issue number: Internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

In v3.2.46 [vue was updated](vuejs/core#3969) to
add support for a generic type argument to the `Plugin` type. In
#29637 Ionic's Vue
plugin was updated to use the generic, but the`@ionic/vue` project is
currently installing v3.2.37.

This results in a local type checking error and build error:
```
(!) Plugin typescript: @rollup/plugin-typescript TS2315: Type 'Plugin_2' is not generic.
src/ionic-vue.ts: (24:24)

24 export const IonicVue: Plugin<[IonicConfig?]> = {
```

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Bumps and pins the dev dependency of `vue` to `3.2.46`. There are
other breaking changes that Vue has shipped in minor/patch cycles that
prevents from updating to the latest.
- Resolves the type checking error locally during build of
the`@ionic/vue` package

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Validation steps:
1. Checkout the branch
2. Build `core/`
3. In `packages/vue`, install latest pinned dependencies with `npm ci`
4. Sync the changes to the `vue` package with `npm run sync`
5. Open `/packages/vue/src/ionic-vue.ts`
6. Observe: No type errors on L24
7. Run `npm run build`
8. Observe: No build errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: vue @ionic/vue package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Vue ionic plugin has no type
3 participants