Skip to content

Commit

Permalink
Update dependency vitest to ^0.31.1 (#165)
Browse files Browse the repository at this point in the history
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vitest](https://togithub.com/vitest-dev/vitest) | [`^0.30.1` ->
`^0.31.1`](https://renovatebot.com/diffs/npm/vitest/0.30.1/0.31.1) |
[![age](https://badges.renovateapi.com/packages/npm/vitest/0.31.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/vitest/0.31.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/vitest/0.31.1/compatibility-slim/0.30.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/vitest/0.31.1/confidence-slim/0.30.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitest-dev/vitest</summary>

###
[`v0.31.1`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.31.1)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.31.0...v0.31.1)

#####    🚀 Features

- **watch**: Press `r` should rerun current pattern tests  -  by
[@&#8203;Dunqing](https://togithub.com/Dunqing) and
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#3305
[<samp>(69d27)</samp>](https://togithub.com/vitest-dev/vitest/commit/69d27117)

#####    🐞 Bug Fixes

- Make sure thrown error is an object  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3298
[<samp>(a93be)</samp>](https://togithub.com/vitest-dev/vitest/commit/a93be56c)
- Remove duplicate type  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3303
[<samp>(5382e)</samp>](https://togithub.com/vitest-dev/vitest/commit/5382e8b6)
- Throw an error, if tests are collected with a different vitest version
 -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3301
[<samp>(708b1)</samp>](https://togithub.com/vitest-dev/vitest/commit/708b10fe)
- Support application/x-gzip metadata in html report  -  by
[@&#8203;mzanelee](https://togithub.com/mzanelee) and **Michael Lee** in
[vitest-dev/vitest#3333
[<samp>(5bf7e)</samp>](https://togithub.com/vitest-dev/vitest/commit/5bf7eb6e)
- Correctly restore vi.fn implementation  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3341
[<samp>(2aff8)</samp>](https://togithub.com/vitest-dev/vitest/commit/2aff8c5f)
- Display error message correctly  -  by
[@&#8203;btea](https://togithub.com/btea) in
[vitest-dev/vitest#3314
[<samp>(a5b3d)</samp>](https://togithub.com/vitest-dev/vitest/commit/a5b3d78e)
- Exclude `cwd` from test name filter  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#3353
[<samp>(324a9)</samp>](https://togithub.com/vitest-dev/vitest/commit/324a9b54)
- Check error type before modifying it  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3385
[<samp>(c44d9)</samp>](https://togithub.com/vitest-dev/vitest/commit/c44d9912)
- `toMatchInlineSnapshot` fails when file path includes parentheses  - 
by [@&#8203;pacexy](https://togithub.com/pacexy) in
[vitest-dev/vitest#3370
and
[vitest-dev/vitest#3371
[<samp>(dcf13)</samp>](https://togithub.com/vitest-dev/vitest/commit/dcf1346a)
- Stop spying on a method, when it's restored  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3386
[<samp>(2cb1a)</samp>](https://togithub.com/vitest-dev/vitest/commit/2cb1a15a)
- Test repeats  -  by
[@&#8203;fenghan34](https://togithub.com/fenghan34) in
[vitest-dev/vitest#3369
[<samp>(fb8fc)</samp>](https://togithub.com/vitest-dev/vitest/commit/fb8fc7ab)
-   **browser**:
- Throw an error if test failed to load  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3390
[<samp>(b354b)</samp>](https://togithub.com/vitest-dev/vitest/commit/b354bc1c)
- Keep default export when rewriting exports  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3389
[<samp>(6501d)</samp>](https://togithub.com/vitest-dev/vitest/commit/6501d2e3)
-   **cli**:
- Improve cac errors when mixing boolean and dot notation  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#3302
[<samp>(93fbd)</samp>](https://togithub.com/vitest-dev/vitest/commit/93fbd02d)
-   **reporter**:
- Prevent deleting test reports stored in coverage directory  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#3331
[<samp>(ddbba)</samp>](https://togithub.com/vitest-dev/vitest/commit/ddbba396)
-   **typecheck**:
- Correctly resolve custom tsconfig path  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3342
[<samp>(c53ae)</samp>](https://togithub.com/vitest-dev/vitest/commit/c53ae079)
-   **vite-node**:
- Allow returning id not wrapped in promise  -  by
[@&#8203;danielroe](https://togithub.com/danielroe) in
[vitest-dev/vitest#3312
[<samp>(9836c)</samp>](https://togithub.com/vitest-dev/vitest/commit/9836ccb4)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.31.0...v0.31.1)

###
[`v0.31.0`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.31.0)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.30.1...v0.31.0)

#####    🚨 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
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3294
[<samp>(cf3af)</samp>](https://togithub.com/vitest-dev/vitest/commit/cf3afe2b)

    -   The change should be minor:

    ```diff
    - declare namespace Vi {
    + declare module 'vitest' {
       interface Assertion<T = any> extends CustomMatchers<T> {}
       interface AsymmetricMatchersContaining extends CustomMatchers {}
    }
    ```

#####    🚀 Features

- Update mock implementation to support ESM runtime, introduce
"vi.hoisted"  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3258
[<samp>(0c09a)</samp>](https://togithub.com/vitest-dev/vitest/commit/0c09a40d)
- Bypass ESM import order restriction with `vi.hoisted` to run code
before imports are executed:
    ```ts
    vi.hoisted(() => vi.setSystemTime(new Date(2022, 1, 1)))
    ```
    You can also use it to pass variables to `vi.mock`:
    ```ts
    const { mockedMethod } = vi.hoisted(() => {
      return { mockedMethod: vi.fn() }
    })   
    vi.mock('./path/to/module.js', () => {
      return { originalMethod: mockedMethod }
    })
    ```
- Add repeat method to tests  -  by
[@&#8203;samkevin1](https://togithub.com/samkevin1) in
[vitest-dev/vitest#2652
[<samp>(7c8f0)</samp>](https://togithub.com/vitest-dev/vitest/commit/7c8f0ba9)
- Add an option to hide skipped test lines  -  by
[@&#8203;g4rry420](https://togithub.com/g4rry420) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2745
[<samp>(9bdb1)</samp>](https://togithub.com/vitest-dev/vitest/commit/9bdb1603)
- **coverage**: Watermarks for c8  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#3254
[<samp>(730af)</samp>](https://togithub.com/vitest-dev/vitest/commit/730af0b4)
- **ui**: Add html coverage  -  by
[@&#8203;userquin](https://togithub.com/userquin) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3071
[<samp>(e24cd)</samp>](https://togithub.com/vitest-dev/vitest/commit/e24cd9b2)
- **watch**: Test run cancelling, feat: `--bail` option for cancelling
test run  -  by [@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#3163
[<samp>(8d460)</samp>](https://togithub.com/vitest-dev/vitest/commit/8d4606eb)

#####    🐞 Bug Fixes

- Don't call global setup teardown twice  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3188
[<samp>(ba3d1)</samp>](https://togithub.com/vitest-dev/vitest/commit/ba3d1338)
- Reporter to log version before provider initalizations  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#3131
[<samp>(481b1)</samp>](https://togithub.com/vitest-dev/vitest/commit/481b1fd2)
- Throw an error if Vitest cannot access its internal state  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3250
[<samp>(fbb14)</samp>](https://togithub.com/vitest-dev/vitest/commit/fbb1468e)
- Warning suppression broken  -  by
[@&#8203;IceQub3](https://togithub.com/IceQub3) in
[vitest-dev/vitest#3270
and
[vitest-dev/vitest#3271
[<samp>(036de)</samp>](https://togithub.com/vitest-dev/vitest/commit/036de797)
- Show correct diff in "toHaveBeenCalledWith"  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3289
[<samp>(19fcd)</samp>](https://togithub.com/vitest-dev/vitest/commit/19fcd8df)
- Don't print esm warning, if package name is not found  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3292
[<samp>(62c14)</samp>](https://togithub.com/vitest-dev/vitest/commit/62c14cba)
- Support exactOptionalPropertyTypes  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3293
[<samp>(ba81d)</samp>](https://togithub.com/vitest-dev/vitest/commit/ba81d8a3)
- Don't inline vite hmr and rollup types  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3291
[<samp>(1f118)</samp>](https://togithub.com/vitest-dev/vitest/commit/1f1189bc)
-   **browser**:
- Failing to load vitest/utils  -  by
[@&#8203;userquin](https://togithub.com/userquin) in
[vitest-dev/vitest#3190
[<samp>(78bad)</samp>](https://togithub.com/vitest-dev/vitest/commit/78bad4ab)
-   **coverage**:
- `thresholdAutoUpdate` to work with `perFile`  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#3182
[<samp>(29eeb)</samp>](https://togithub.com/vitest-dev/vitest/commit/29eebf65)
- Throw error if fail to load built-in provider  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#3217
[<samp>(0a287)</samp>](https://togithub.com/vitest-dev/vitest/commit/0a2875e3)
- Stackblitz hangs with c8  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#3225
[<samp>(d9fda)</samp>](https://togithub.com/vitest-dev/vitest/commit/d9fda2a1)
- C8 to ignore vite's generated helpers  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#3241
[<samp>(21942)</samp>](https://togithub.com/vitest-dev/vitest/commit/21942db0)
- Workspaces c8 source maps  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#3226
[<samp>(efce3)</samp>](https://togithub.com/vitest-dev/vitest/commit/efce3b4d)
-   **docs**:
- Correct typo and broken link to WebdriverIO  -  by
[@&#8203;nathanbabcock](https://togithub.com/nathanbabcock) in
[vitest-dev/vitest#3275
[<samp>(c7da1)</samp>](https://togithub.com/vitest-dev/vitest/commit/c7da155f)
-   **spy**:
- Update to set initial implementation through normal logic  -  by
[@&#8203;Codex-](https://togithub.com/Codex-) in
[vitest-dev/vitest#3260
and
[vitest-dev/vitest#3263
[<samp>(c759a)</samp>](https://togithub.com/vitest-dev/vitest/commit/c759a9aa)
-   **vite-node**:
- Circular imports  -  by [@&#8203;antfu](https://togithub.com/antfu) in
[vitest-dev/vitest#3196
[<samp>(cbb59)</samp>](https://togithub.com/vitest-dev/vitest/commit/cbb593a8)
- Add missing `import.meta.hot.send` mock  -  by
[@&#8203;antfu](https://togithub.com/antfu)
[<samp>(b1624)</samp>](https://togithub.com/vitest-dev/vitest/commit/b1624db5)
-   **vitest**:
- Also check for vite relative to vitest package  -  by
[@&#8203;JoshuaKGoldberg](https://togithub.com/JoshuaKGoldberg) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#3274
[<samp>(a3393)</samp>](https://togithub.com/vitest-dev/vitest/commit/a3393b15)
-   **watch**:
- Run test files when added to filesystem  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#3189
[<samp>(7b2c8)</samp>](https://togithub.com/vitest-dev/vitest/commit/7b2c81bc)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.30.1...v0.31.0)

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

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

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

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/dermoumi/crafts).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS42OS4zIiwidXBkYXRlZEluVmVyIjoiMzUuODkuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: S Dermoumi <hi@sdrm.me>
  • Loading branch information
renovate[bot] and dermoumi committed May 23, 2023
1 parent 11d52f5 commit 6860f7e
Show file tree
Hide file tree
Showing 12 changed files with 85 additions and 141 deletions.
2 changes: 1 addition & 1 deletion apps/client/package.json
Expand Up @@ -31,6 +31,6 @@
"vite": "^4.3.8",
"vite-plugin-html": "^3.2.0",
"vite-plugin-top-level-await": "^1.3.1",
"vitest": "^0.30.1"
"vitest": "^0.31.1"
}
}
2 changes: 1 addition & 1 deletion libs/default-map/package.json
Expand Up @@ -18,6 +18,6 @@
"prettier": "^2.8.8",
"typescript": "^5.0.4",
"vite": "^4.3.8",
"vitest": "^0.30.1"
"vitest": "^0.31.1"
}
}
2 changes: 1 addition & 1 deletion libs/ecs/package.json
Expand Up @@ -21,6 +21,6 @@
"prettier": "^2.8.8",
"typescript": "^5.0.4",
"vite": "^4.3.8",
"vitest": "^0.30.1"
"vitest": "^0.31.1"
}
}
2 changes: 1 addition & 1 deletion libs/game-app/package.json
Expand Up @@ -21,6 +21,6 @@
"prettier": "^2.8.8",
"typescript": "^5.0.4",
"vite": "^4.3.8",
"vitest": "^0.30.1"
"vitest": "^0.31.1"
}
}
2 changes: 1 addition & 1 deletion plugins-client/input/package.json
Expand Up @@ -22,6 +22,6 @@
"prettier": "^2.8.8",
"typescript": "^5.0.4",
"vite": "^4.3.8",
"vitest": "^0.30.1"
"vitest": "^0.31.1"
}
}
2 changes: 1 addition & 1 deletion plugins-client/three/package.json
Expand Up @@ -27,6 +27,6 @@
"prettier": "^2.8.8",
"typescript": "^5.0.4",
"vite": "^4.3.8",
"vitest": "^0.30.1"
"vitest": "^0.31.1"
}
}
2 changes: 1 addition & 1 deletion plugins-client/variable-update/package.json
Expand Up @@ -21,6 +21,6 @@
"prettier": "^2.8.8",
"typescript": "^5.0.4",
"vite": "^4.3.8",
"vitest": "^0.30.1"
"vitest": "^0.31.1"
}
}
17 changes: 10 additions & 7 deletions plugins-client/variable-update/setup-tests.ts
@@ -1,10 +1,13 @@
declare global {
namespace Vi {
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
interface ExpectStatic {
numberBetween: (min: number, max: number) => any;
}
}
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/consistent-type-definitions */

type CustomMatchers = {
numberBetween: (min: number, max: number) => any;
};

declare module "vitest" {
interface Assertion extends CustomMatchers {}
interface AsymmetricMatchersContaining extends CustomMatchers {}
}

// Add a matcher for numbers between a min and max values
Expand Down
2 changes: 1 addition & 1 deletion plugins-common/fixed-update/package.json
Expand Up @@ -21,6 +21,6 @@
"prettier": "^2.8.8",
"typescript": "^5.0.4",
"vite": "^4.3.8",
"vitest": "^0.30.1"
"vitest": "^0.31.1"
}
}
2 changes: 1 addition & 1 deletion plugins-common/physics/package.json
Expand Up @@ -24,6 +24,6 @@
"prettier": "^2.8.8",
"typescript": "^5.0.4",
"vite": "^4.3.8",
"vitest": "^0.30.1"
"vitest": "^0.31.1"
}
}
2 changes: 1 addition & 1 deletion plugins-common/world-entities/package.json
Expand Up @@ -21,6 +21,6 @@
"prettier": "^2.8.8",
"typescript": "^5.0.4",
"vite": "^4.3.8",
"vitest": "^0.30.1"
"vitest": "^0.31.1"
}
}

0 comments on commit 6860f7e

Please sign in to comment.