vitest-dev / vitest

Next generation testing framework powered by Vite.
https://vitest.dev
MIT License
12.54k stars 1.12k forks source link

`tsc` with `"vitest"` version 2 requires `"@types/node"` to run without errors #6141

Open hamirmahal opened 1 month ago

hamirmahal commented 1 month ago

Describe the bug

tsc with "vitest" version 2 requires "@types/node" to run without errors, but that's not the case with version 1 of vitest.

Reproduction

https://github.com/hamirmahal/vitest-debug/actions/runs/9915513422/job/27396470395#logs

System Info

System:
    OS: Linux 6.5 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (8) x64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
    Memory: 22.94 GB / 31.03 GB
    Container: Yes
    Shell: 5.1.16 - /usr/bin/bash
  Binaries:
    Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v20.9.0/bin/yarn
    npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
    pnpm: 9.4.0 - ~/.nvm/versions/node/v20.9.0/bin/pnpm
  Browsers:
    Brave Browser: 126.1.67.123
    Chrome: 126.0.6478.126
    Chromium: 126.0.6478.126

Used Package Manager

npm

Validations

hamirmahal commented 1 month ago

You can see that tsc --noEmit fails after updating from "vitest": "^1.6.0" to "vitest": "^2.0.2", whereas it was passing before.

hamirmahal commented 1 month ago

https://github.com/vitest-dev/vitest/discussions/6117#discussioncomment-10048473