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

Bump @vue/test-utils from 2.3.2 to 2.4.1 #492

Closed

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 1, 2023

Bumps @vue/test-utils from 2.3.2 to 2.4.1.

Release notes

Sourced from @​vue/test-utils's releases.

v2.4.1

What's Changed

Fixes

Docs

(Dev) Dependencies

New Contributors

Full Changelog: vuejs/test-utils@v2.4.0...v2.4.1

v2.4.0

Note: there might be some minor breaking changes around types. We tried hard to avoid this and tested a few different projects, but there was some major under the hood changes relating to types (which should improve the TypeScript experience). See the note at the top of the previous release, 2.4.0-alpha.2: https://github.com/vuejs/test-utils/releases/tag/v2.4.0-alpha.2

Between the last main release, v2.3.2, and v2.4.0, there were three alphas:

Please see those release notes for changes if you are updating from v2.3.2. Again, there should not be any major changes, and you code and tests should continue to work as before without any changes.

If you do encounter breaking changes transitioning from 2.3.x -> 2.4.x, please file an issue.

v2.4.0-alpha.2

Note: this will be the last 2.x release. Due to vuejs/test-utils#2026, the next release will be Test Utils 3.x. It has no API related breaking changes, but some types might be impacted - the full extent of vuejs/test-utils#2026 is still being investigated, but at this point it's unlikely you'll need to change any code. In general, type safety should be improved across the board.

What's Changed

... (truncated)

Commits
  • 6af516a publish: 2.4.1
  • c41e914 chore(deps): update typescript-eslint monorepo to v6 (#2129)
  • e235e3a fix: modify createVMProxy (#2125)
  • a304f59 chore: exception for no-extra-semi lint rule
  • 881646e chore(deps): update dependency js-beautify to v1.14.9
  • 5426ca2 chore(deps): update vitest to v0.33.0
  • 136e67b chore(deps): update dependency prettier to v3 and eslint-plugin-prettier to v5
  • ffbb7cf chore(deps): update all non-major dependencies
  • f0df231 docs: add warning about isVisible()
  • 73890ef chore(deps): update vitest to v0.32.4
  • Additional commits viewable in compare view

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Aug 1, 2023
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/vue/test-utils-2.4.1 branch from 769c29f to 7f71d65 Compare August 16, 2023 14:03
@lucaswerkmeister
Copy link
Member

@dependabot rebase

Bumps [@vue/test-utils](https://github.com/vuejs/test-utils) from 2.3.2 to 2.4.1.
- [Release notes](https://github.com/vuejs/test-utils/releases)
- [Commits](vuejs/test-utils@v2.3.2...v2.4.1)

---
updated-dependencies:
- dependency-name: "@vue/test-utils"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/vue/test-utils-2.4.1 branch from 7f71d65 to d319a98 Compare October 9, 2023 08:32
@lucaswerkmeister
Copy link
Member

The error in LemmaInput.test.ts can be resolved by not spreading the whole config in createComponent() – all the callers only pass props and/or global anyway:

diff --git a/tests/unit/components/LemmaInput.test.ts b/tests/unit/components/LemmaInput.test.ts
index 9eb60cd6b9..37d6c66626 100644
--- a/tests/unit/components/LemmaInput.test.ts
+++ b/tests/unit/components/LemmaInput.test.ts
@@ -1,8 +1,8 @@
 import { MessagesKey } from '@/plugins/MessagesPlugin/Messages';
 import {
+	ComponentMountingOptions,
 	DOMWrapper,
 	mount,
-	MountingOptions,
 } from '@vue/test-utils';
 import LemmaInput from '@/components/LemmaInput.vue';
 import { ConfigKey } from '@/plugins/ConfigPlugin/Config';
@@ -20,7 +20,7 @@ describe( 'LemmaInput', () => {
 	let store: Store<RootState>;
 
 	// eslint-disable-next-line @typescript-eslint/no-explicit-any
-	function createComponent( config: Partial<MountingOptions<any>> = {} ) {
+	function createComponent( config: Pick<ComponentMountingOptions<any>, 'props' | 'global'> = {} ) {
 		store = initStore( {
 			lexemeCreator: unusedLexemeCreator,
 			langCodeRetriever: unusedLangCodeRetriever,
@@ -29,7 +29,6 @@ describe( 'LemmaInput', () => {
 		} );
 
 		return mount( LemmaInput, {
-			...config,
 			props: {
 				modelValue: '',
 				...config.props,

(I’m not sure if the change from MountingOptions to ComponentMountingOptions is needed, but it matches mount()’s type definitions.)

But the two other type errors are in Vue Test Utils itself, and I suspect they might require a newer Vue.js version to solve – but we want to keep the Vue version in sync with MediaWiki core. So I think this is stalled for now.

lucaswerkmeister added a commit that referenced this pull request Oct 9, 2023
The `...config` in particular was causing type issues when upgrading
@vue/test-utils in #492; and while that pull request is also blocked for
other reasons, I think we can make our lives easier by simplifying these
types. Callers of this method (which is local to this one test file)
only pass in props and/or global.provide, so we can just specify the
types for those members instead of full ComponentOptions; the Props type
from LemmaInput is just duplicated, since I think that’s simpler than
trying to get it back out of the full/exported LemmaInput type again.

Bug: T348108
lucaswerkmeister added a commit that referenced this pull request Oct 9, 2023
lucaswerkmeister added a commit that referenced this pull request Oct 9, 2023
The `...config` in particular was causing type issues when upgrading
@vue/test-utils in #492; and while that pull request is also blocked for
other reasons, I think we can make our lives easier by simplifying these
types. Callers of this method (which is local to this one test file)
only pass in props and/or global.provide, so we can just specify the
types for those members instead of full ComponentOptions; the Props type
from LemmaInput is just duplicated, since I think that’s simpler than
trying to get it back out of the full/exported LemmaInput type again.

Bug: T348108
@lucaswerkmeister
Copy link
Member

The error in LemmaInput.test.ts can be resolved by not spreading the whole config in createComponent() – all the callers only pass props and/or global anyway:

Done (somewhat differently) in #535.

But the two other type errors are in Vue Test Utils itself, and I suspect they might require a newer Vue.js version to solve – but we want to keep the Vue version in sync with MediaWiki core. So I think this is stalled for now.

This is still the case; should be retried once there’s a new VTU release (or MediaWiki updates its Vue version).

lucaswerkmeister added a commit that referenced this pull request Oct 9, 2023
@lucaswerkmeister
Copy link
Member

The type errors still persist in 2.4.2, as far as I can tell from a local test (npm i @vue/test-utils@latest && npm run check-types).

Copy link
Contributor Author

dependabot bot commented on behalf of github Nov 15, 2023

Superseded by #576.

@dependabot dependabot bot closed this Nov 15, 2023
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/vue/test-utils-2.4.1 branch November 15, 2023 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Development

Successfully merging this pull request may close these issues.

1 participant