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

chore(deps): update vitest monorepo to v0.32.0 #261

Merged
merged 5 commits into from
Jun 13, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 4, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@vitest/coverage-c8 (source) 0.24.3 -> 0.32.0 age adoption passing confidence
@vitest/ui (source) ^0.24.5 -> ^0.32.0 age adoption passing confidence
vitest 0.24.3 -> 0.32.0 age adoption passing confidence

Release Notes

vitest-dev/vitest

v0.32.0

Compare Source

   🚨 Breaking Changes
  • Throw an error, if the module cannot be resolved  -  by @​sheremet-va in https://github.com/vitest-dev/vitest/issues/3307 (1ad63)
    • Vitest used to fall back to the original import when it could not resolve it to the file path or the virtual module. This leads to hard-to-find module graph mismatches if you had incorrect alias or relied on relative imports to be resolved to the project root (which is usual behavior in TypeScript) because the code accidentally "worked". With this release, Vitest will now throw an error if it cannot resolve the module - there are possible edge cases that are not covered yet, so if you have any problems with this, please open a separate issue with reproduction.
  • Improve globs  -  by @​nickmccurdy in https://github.com/vitest-dev/vitest/issues/3392 (19ecc)
    • Vitest now has glob patterns similar to Jest for better compatibility. It's possible that some files will be considered test files when previously they were not. For example, Vitest now considers test.js to be a test file. Also any file in __tests__ is now considered to be a test, not just files with test or spec suffix.
  • Add @vitest/coverage-v8 package  -  by @​AriPerkkio in https://github.com/vitest-dev/vitest/issues/3339 (82112)
    • Vitest now uses v8 code coverage directly for better performance. @vitest/coverage-c8 is deprecated as Vitest no longer uses c8 package for coverage output. It will not be updated anymore, and Vitest will fail in the next version if the user has c8 as their coverage provider. Please, install the new @vitest/coverage-v8 package if you previously used @vitest/coverage-c8.
  • mocker: Don't restore mock to the original if the module is automocked  -  by @​sheremet-va in https://github.com/vitest-dev/vitest/issues/3518 (c1004)
    • spy.mockRestore on auto-mocked named exports will no longer restore their implementation to the actual function. This behavior better matches what Jest does.
   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v0.31.4

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v0.31.3

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v0.31.2

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v0.31.1

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v0.31.0

Compare Source

   🚨 Breaking Changes
  • Remove browser from allowed pools inside poolMatchGlob config option. Please, use Vitest workspaces for running tests in the browser.

  • Move assertion declarations to expect package  -  by @​sheremet-va in https://github.com/vitest-dev/vitest/issues/3294 (cf3af)

    • The change should be minor:
    - declare namespace Vi {
    + declare module 'vitest' {
       interface Assertion<T = any> extends CustomMatchers<T> {}
       interface AsymmetricMatchersContaining extends CustomMatchers {}
    }
   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v0.30.1

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v0.30.0

Compare Source

   🚨 Breaking Changes
   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v0.29.8

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v0.29.7

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v0.29.6

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v0.29.5

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v0.29.4

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v0.29.3

Compare Source

   🚀 Features
   🐞 Bug Fixes
   🏎 Performance
    View changes on GitHub

v0.29.2

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v0.29.1

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v0.29.0

Compare Source

This release makes some significant changes to how tests are running. If you were using --no-threads before, you might consider enabling --single-thread instead (because your tests are now running in child_process instead of a worker thread) or try our new performance optimization feature (discussed later). If you were relying on API that was not available inside a worker (like process.chdir(), you can now use this option.

One of the potential breaking bug fixes is that environments do not share the same global scope anymore if you run them with --no-isolate, --no-threads or --single-thread - you might need to update your setup files if you were relying on a global variable before.

If you had performance issues on large code bases before, try the new deps.experimentalOptimizer option instead of disabling threads. Feedback is welcome!

One of the breaking changes includes adding a link to snapshots inside snapshot files, meaning you will need to update all your snapshots.

   🚨 Breaking Changes
   🚀 Features

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 4, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 476e2eb
Status: ✅  Deploy successful!
Preview URL: https://2d282dbd.lipoic-frontend.pages.dev
Branch Preview URL: https://renovate-vitest-monorepo.lipoic-frontend.pages.dev

View logs

@renovate renovate bot force-pushed the renovate/vitest-monorepo branch 8 times, most recently from 6309c2e to 87c8309 Compare February 7, 2023 14:48
@renovate renovate bot changed the title chore(deps): update vitest monorepo to v0.28.4 chore(deps): update vitest monorepo to v0.28.5 Feb 13, 2023
@renovate renovate bot changed the title chore(deps): update vitest monorepo to v0.28.5 chore(deps): update vitest monorepo to v0.29.1 Feb 25, 2023
@renovate renovate bot changed the title chore(deps): update vitest monorepo to v0.29.1 chore(deps): update vitest monorepo to v0.29.2 Feb 28, 2023
@renovate renovate bot force-pushed the renovate/vitest-monorepo branch from b4dea10 to c50b83c Compare March 15, 2023 22:22
@renovate renovate bot changed the title chore(deps): update vitest monorepo to v0.29.2 chore(deps): update vitest monorepo to v0.29.3 Mar 15, 2023
@renovate renovate bot force-pushed the renovate/vitest-monorepo branch from c50b83c to 07b940a Compare March 20, 2023 16:37
@renovate renovate bot changed the title chore(deps): update vitest monorepo to v0.29.3 chore(deps): update vitest monorepo to v0.29.5 Mar 20, 2023
@renovate renovate bot force-pushed the renovate/vitest-monorepo branch from 07b940a to 193631a Compare March 20, 2023 20:30
@renovate renovate bot changed the title chore(deps): update vitest monorepo to v0.29.5 chore(deps): update vitest monorepo Mar 20, 2023
@renovate renovate bot force-pushed the renovate/vitest-monorepo branch from 193631a to 43cca24 Compare March 21, 2023 00:05
@renovate renovate bot changed the title chore(deps): update vitest monorepo chore(deps): update vitest monorepo to v0.29.7 Mar 21, 2023
@renovate renovate bot force-pushed the renovate/vitest-monorepo branch 2 times, most recently from b275818 to f15e3f0 Compare March 28, 2023 19:04
@renovate renovate bot changed the title chore(deps): update vitest monorepo to v0.29.7 chore(deps): update vitest monorepo to v0.29.8 Mar 28, 2023
@renovate renovate bot force-pushed the renovate/vitest-monorepo branch from f15e3f0 to c961248 Compare March 31, 2023 09:37
@renovate renovate bot force-pushed the renovate/vitest-monorepo branch from c961248 to d229206 Compare April 9, 2023 14:38
@renovate renovate bot changed the title chore(deps): update vitest monorepo to v0.29.8 chore(deps): update vitest monorepo to v0.30.0 Apr 9, 2023
@renovate renovate bot force-pushed the renovate/vitest-monorepo branch from d229206 to 471368b Compare April 11, 2023 14:19
@renovate renovate bot changed the title chore(deps): update vitest monorepo to v0.30.0 chore(deps): update vitest monorepo to v0.30.1 Apr 11, 2023
@renovate renovate bot force-pushed the renovate/vitest-monorepo branch from 471368b to 6a68be9 Compare May 3, 2023 18:20
@renovate renovate bot changed the title chore(deps): update vitest monorepo to v0.30.1 chore(deps): update vitest monorepo May 3, 2023
@renovate renovate bot force-pushed the renovate/vitest-monorepo branch from 6a68be9 to e796734 Compare May 3, 2023 23:58
@renovate renovate bot changed the title chore(deps): update vitest monorepo chore(deps): update vitest monorepo to v0.31.0 May 3, 2023
@renovate renovate bot force-pushed the renovate/vitest-monorepo branch from e796734 to 37fb75e Compare May 17, 2023 18:43
@renovate renovate bot changed the title chore(deps): update vitest monorepo to v0.31.0 chore(deps): update vitest monorepo to v0.31.1 May 17, 2023
@renovate renovate bot force-pushed the renovate/vitest-monorepo branch from 5c87957 to 1fe3e56 Compare June 1, 2023 17:35
@renovate renovate bot changed the title chore(deps): update vitest monorepo to v0.31.1 chore(deps): update vitest monorepo to v0.31.4 Jun 1, 2023
@renovate renovate bot force-pushed the renovate/vitest-monorepo branch from 1fe3e56 to b46c05a Compare June 6, 2023 20:12
@renovate renovate bot changed the title chore(deps): update vitest monorepo to v0.31.4 chore(deps): update vitest monorepo to v0.32.0 Jun 6, 2023
@renovate
Copy link
Contributor Author

renovate bot commented Jun 10, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@SiongSng
Copy link
Member

SiongSng commented Jun 10, 2023

似乎是 axios 套件拋出的序列化錯誤導致單元測試失敗。

image

我錯了,與 axios 無關

@SiongSng
Copy link
Member

我發現是從 Vitest 的 0.25.1 版開始會拋出這種錯誤,導致 msw 無法攔截請求進行模擬。

image

@codecov
Copy link

codecov bot commented Jun 10, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.46 ⚠️

Comparison is base (2b418c2) 24.09% compared to head (476e2eb) 23.64%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #261      +/-   ##
===========================================
- Coverage    24.09%   23.64%   -0.46%     
===========================================
  Files           41       41              
  Lines         3083     3083              
  Branches        54       46       -8     
===========================================
- Hits           743      729      -14     
- Misses        2340     2354      +14     

see 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Let `setup.ts` as a module.
@lumynou5
Copy link
Member

lumynou5 commented Jun 10, 2023

URLs aren't mocked in tests since vitest 0.25.1, see also vitest-dev/vitest#2305. This can be fixed if use happy-dom 8.0.0 or later.
However, happy-dom 7.8.0 introduces a bug that assigning window.location.href a relative URL would be invalid, see also capricorn86/happy-dom#678, and resolved since 9.3.1. The original uses URLs relative to about:blank, the default host, and it shouldn't happen; therefore, it adds a setup file to make the host https://localhost in cf83276.

Copy link
Member

@SiongSng SiongSng left a comment

Choose a reason for hiding this comment

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

LGTM

@SiongSng SiongSng merged commit 36302d3 into develop Jun 13, 2023
@SiongSng SiongSng deleted the renovate/vitest-monorepo branch June 13, 2023 12:51
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