diff --git a/docs/config/index.md b/docs/config/index.md
index d96882ad0..0b21ec128 100644
--- a/docs/config/index.md
+++ b/docs/config/index.md
@@ -11,8 +11,7 @@
To configure `vitest` itself, add `test` property in your Vite config. You'll also need to add a reference to Vitest types using a [triple slash command](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types-) at the top of your config file.
```ts
-///
-import { defineConfig } from 'vite'
+import { defineConfig } from 'vitest/node'
export default defineConfig({
test: {
@@ -78,7 +77,7 @@ By default, `vitest` does not provide global APIs for explicitness. If you prefe
```ts
// vite.config.ts
-import { defineConfig } from 'vite'
+import { defineConfig } from 'vitest/node'
export default defineConfig({
test: {
@@ -102,7 +101,7 @@ If you are already using [`unplugin-auto-import`](https://github.com/antfu/unplu
```ts
// vite.config.ts
-import { defineConfig } from 'vite'
+import { defineConfig } from 'vitest/node'
import AutoImport from 'unplugin-auto-import/vite'
export default defineConfig({
@@ -349,7 +348,7 @@ Vite plugins will receive `ssr: false` flag when processing those files.
When you use JSX as component models other than React (e.g. Vue JSX or SolidJS), you might want to config as following to make `.tsx` / `.jsx` transformed as client-side components:
```ts
-import { defineConfig } from 'vite'
+import { defineConfig } from 'vitest/node'
export default defineConfig({
test: {
diff --git a/docs/guide/features.md b/docs/guide/features.md
index 169149352..b5370c9bd 100644
--- a/docs/guide/features.md
+++ b/docs/guide/features.md
@@ -212,7 +212,7 @@ After that, change the `environment` option in your config file:
```ts
// vite.config.ts
-import { defineConfig } from 'vite'
+import { defineConfig } from 'vitest/node'
export default defineConfig({
test: {
@@ -238,7 +238,7 @@ To configure it, set `test.coverage` options in your config file:
```ts
// vite.config.ts
-import { defineConfig } from 'vite'
+import { defineConfig } from 'vitest/node'
export default defineConfig({
test: {
diff --git a/docs/guide/index.md b/docs/guide/index.md
index da536557d..54d478d00 100644
--- a/docs/guide/index.md
+++ b/docs/guide/index.md
@@ -41,7 +41,7 @@ To configure `vitest` itself, add `test` property in your Vite config. You'll al
```ts
///
-import { defineConfig } from 'vite'
+import { defineConfig } from 'vitest/node'
export default defineConfig({
test: {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index c45050b90..5c25962a4 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -216,7 +216,7 @@ importers:
dependencies:
'@emotion/react': 11.7.1_react@17.0.2
'@emotion/styled': 11.6.0_79c1490562c3c65ef55eb132a37e39b4
- '@mui/lab': 5.0.0-alpha.68_00d3a31c190d5aab8bc1331ffcd81422
+ '@mui/lab': 5.0.0-alpha.69_00d3a31c190d5aab8bc1331ffcd81422
'@mui/material': 5.4.1_c84e354a724f4213aa6539fdea9d08aa
history: 5.2.0
notistack: 2.0.3_bf5bfc40fd92e5337fe8788c2df37de7
@@ -2498,53 +2498,53 @@ packages:
minimist: 1.2.5
dev: true
- /@date-io/core/2.11.0:
- resolution: {integrity: sha512-DvPBnNoeuLaoSJZaxgpu54qzRhRKjSYVyQjhznTFrllKuDpm0sDFjHo6lvNLCM/cfMx2gb2PM2zY2kc9C8nmuw==}
+ /@date-io/core/2.13.1:
+ resolution: {integrity: sha512-pVI9nfkf2qClb2Cxdq0Q4zJhdawMG4ybWZUVGifT78FDwzRMX2SwXBb55s5NRJk0HcIicDuxktmCtemZqMH1Zg==}
dev: false
- /@date-io/date-fns/2.11.0_date-fns@2.28.0:
- resolution: {integrity: sha512-mPQ71plBeFrArvBSHtjWMHXA89IUbZ6kuo2dsjlRC/1uNOybo91spIb+wTu03NxKTl8ut07s0jJ9svF71afpRg==}
+ /@date-io/date-fns/2.13.1_date-fns@2.28.0:
+ resolution: {integrity: sha512-8fmfwjiLMpFLD+t4NBwDx0eblWnNcgt4NgfT/uiiQTGI81fnPu9tpBMYdAcuWxaV7LLpXgzLBx1SYWAMDVUDQQ==}
peerDependencies:
date-fns: ^2.0.0
peerDependenciesMeta:
date-fns:
optional: true
dependencies:
- '@date-io/core': 2.11.0
+ '@date-io/core': 2.13.1
date-fns: 2.28.0
dev: false
- /@date-io/dayjs/2.11.0:
- resolution: {integrity: sha512-w67vRK56NZJIKhJM/CrNbfnIcuMvR3ApfxzNZiCZ5w29sxgBDeKuX4M+P7A9r5HXOMGcsOcpgaoTDINNGkdpGQ==}
+ /@date-io/dayjs/2.13.1:
+ resolution: {integrity: sha512-5bL4WWWmlI4uGZVScANhHJV7Mjp93ec2gNeUHDqqLaMZhp51S0NgD25oqj/k0LqBn1cdU2MvzNpk/ObMmVv5cQ==}
peerDependencies:
dayjs: ^1.8.17
peerDependenciesMeta:
dayjs:
optional: true
dependencies:
- '@date-io/core': 2.11.0
+ '@date-io/core': 2.13.1
dev: false
- /@date-io/luxon/2.11.1:
- resolution: {integrity: sha512-JUXo01kdPQxLORxqdENrgdUhooKgDUggsNRSdi2BcUhASIY2KGwwWXu8ikVHHGkw+DUF4FOEKGfkQd0RHSvX6g==}
+ /@date-io/luxon/2.13.1:
+ resolution: {integrity: sha512-yG+uM7lXfwLyKKEwjvP8oZ7qblpmfl9gxQYae55ifbwiTs0CoCTkYkxEaQHGkYtTqGTzLqcb0O9Pzx6vgWg+yg==}
peerDependencies:
luxon: ^1.21.3 || ^2.x
peerDependenciesMeta:
luxon:
optional: true
dependencies:
- '@date-io/core': 2.11.0
+ '@date-io/core': 2.13.1
dev: false
- /@date-io/moment/2.11.0:
- resolution: {integrity: sha512-QSL+83qezQ9Ty0dtFgAkk6eC0GMl/lgYfDajeVUDB3zVA2A038hzczRLBg29ifnBGhQMPABxuOafgWwhDjlarg==}
+ /@date-io/moment/2.13.1:
+ resolution: {integrity: sha512-XX1X/Tlvl3TdqQy2j0ZUtEJV6Rl8tOyc5WOS3ki52He28Uzme4Ro/JuPWTMBDH63weSWIZDlbR7zBgp3ZA2y1A==}
peerDependencies:
moment: ^2.24.0
peerDependenciesMeta:
moment:
optional: true
dependencies:
- '@date-io/core': 2.11.0
+ '@date-io/core': 2.13.1
dev: false
/@discoveryjs/json-ext/0.5.6:
@@ -3056,8 +3056,30 @@ packages:
react-is: 17.0.2
dev: false
- /@mui/lab/5.0.0-alpha.68_00d3a31c190d5aab8bc1331ffcd81422:
- resolution: {integrity: sha512-wvszkLsgXgl3kMPVpHNm9pRYld9/2r0MYRlJUEh2GWwjBPE3dDTOIF2IHgZ3WqRBnJMitzUVt7v5Lu9/grjrIQ==}
+ /@mui/base/5.0.0-alpha.69_react-dom@17.0.2+react@17.0.2:
+ resolution: {integrity: sha512-IxUUj/lkilCTNBIybQxyQGW/zpxFp490G0QBQJgRp9TJkW2PWSTLvAH7gcH0YHd0L2TAf1TRgfdemoRseMzqQA==}
+ engines: {node: '>=12.0.0'}
+ peerDependencies:
+ '@types/react': ^16.8.6 || ^17.0.0
+ react: ^17.0.0
+ react-dom: ^17.0.0
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ dependencies:
+ '@babel/runtime': 7.17.2
+ '@emotion/is-prop-valid': 1.1.1
+ '@mui/utils': 5.4.2_react@17.0.2
+ '@popperjs/core': 2.11.0
+ clsx: 1.1.1
+ prop-types: 15.7.2
+ react: 17.0.2
+ react-dom: 17.0.2_react@17.0.2
+ react-is: 17.0.2
+ dev: false
+
+ /@mui/lab/5.0.0-alpha.69_00d3a31c190d5aab8bc1331ffcd81422:
+ resolution: {integrity: sha512-VrTcmXTS9UlTsp40nIZ/R/HBHOvxP2lvgSY9zLSn5XPhMQEMD1H0wTJ68mEuCm18cnl1sbcUOCMfWx9io/u5zg==}
engines: {node: '>=12.0.0'}
peerDependencies:
'@mui/material': ^5.0.0
@@ -3081,14 +3103,14 @@ packages:
optional: true
dependencies:
'@babel/runtime': 7.17.2
- '@date-io/date-fns': 2.11.0_date-fns@2.28.0
- '@date-io/dayjs': 2.11.0
- '@date-io/luxon': 2.11.1
- '@date-io/moment': 2.11.0
- '@mui/base': 5.0.0-alpha.68_react-dom@17.0.2+react@17.0.2
+ '@date-io/date-fns': 2.13.1_date-fns@2.28.0
+ '@date-io/dayjs': 2.13.1
+ '@date-io/luxon': 2.13.1
+ '@date-io/moment': 2.13.1
+ '@mui/base': 5.0.0-alpha.69_react-dom@17.0.2+react@17.0.2
'@mui/material': 5.4.1_c84e354a724f4213aa6539fdea9d08aa
- '@mui/system': 5.4.1_922a85da57e3646a57465b7970b0de85
- '@mui/utils': 5.4.1_react@17.0.2
+ '@mui/system': 5.4.2_922a85da57e3646a57465b7970b0de85
+ '@mui/utils': 5.4.2_react@17.0.2
clsx: 1.1.1
date-fns: 2.28.0
prop-types: 15.7.2
@@ -3153,6 +3175,22 @@ packages:
react: 17.0.2
dev: false
+ /@mui/private-theming/5.4.2_react@17.0.2:
+ resolution: {integrity: sha512-mlPDYYko4wIcwXjCPEmOWbNTT4DZ6h9YHdnRtQPnWM28+TRUHEo7SbydnnmVDQLRXUfaH4Y6XtEHIfBNPE/SLg==}
+ engines: {node: '>=12.0.0'}
+ peerDependencies:
+ '@types/react': ^16.8.6 || ^17.0.0
+ react: ^17.0.0
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ dependencies:
+ '@babel/runtime': 7.17.2
+ '@mui/utils': 5.4.2_react@17.0.2
+ prop-types: 15.7.2
+ react: 17.0.2
+ dev: false
+
/@mui/styled-engine/5.4.1_922a85da57e3646a57465b7970b0de85:
resolution: {integrity: sha512-CFLNJkopRoAuShkgUZOTBVxdTlKu4w6L4kOwPi4r3QB2XXS6O5kyLHSsg9huUbtOYk5Dv5UZyUSc5pw4J7ezdg==}
engines: {node: '>=12.0.0'}
@@ -3174,6 +3212,27 @@ packages:
react: 17.0.2
dev: false
+ /@mui/styled-engine/5.4.2_922a85da57e3646a57465b7970b0de85:
+ resolution: {integrity: sha512-tz9p3aRtzXHKAg7x3BgP0hVQEoGKaxNCFxsJ+d/iqEHYvywWFSs6oxqYAvDHIRpvMlUZyPNoTrkcNnbdMmH/ng==}
+ engines: {node: '>=12.0.0'}
+ peerDependencies:
+ '@emotion/react': ^11.4.1
+ '@emotion/styled': ^11.3.0
+ react: ^17.0.0
+ peerDependenciesMeta:
+ '@emotion/react':
+ optional: true
+ '@emotion/styled':
+ optional: true
+ dependencies:
+ '@babel/runtime': 7.17.2
+ '@emotion/cache': 11.7.1
+ '@emotion/react': 11.7.1_react@17.0.2
+ '@emotion/styled': 11.6.0_79c1490562c3c65ef55eb132a37e39b4
+ prop-types: 15.7.2
+ react: 17.0.2
+ dev: false
+
/@mui/system/5.4.1_922a85da57e3646a57465b7970b0de85:
resolution: {integrity: sha512-07JBYf9iQdxIHZU8cFOLoxBnkQDUPLb7UBhNxo4998yEqpWFJ00WKgEVYBKvPl0X+MRU/20wqFz6yGIuCx4AeA==}
engines: {node: '>=12.0.0'}
@@ -3203,6 +3262,35 @@ packages:
react: 17.0.2
dev: false
+ /@mui/system/5.4.2_922a85da57e3646a57465b7970b0de85:
+ resolution: {integrity: sha512-QegBVu6fxUNov1X9bWc1MZUTeV3A5g9PIpli7d0kzkGfq6JzrJWuPlhSPZ+6hlWmWky+bbAXhU65Qz8atWxDGw==}
+ engines: {node: '>=12.0.0'}
+ peerDependencies:
+ '@emotion/react': ^11.5.0
+ '@emotion/styled': ^11.3.0
+ '@types/react': ^16.8.6 || ^17.0.0
+ react: ^17.0.0
+ peerDependenciesMeta:
+ '@emotion/react':
+ optional: true
+ '@emotion/styled':
+ optional: true
+ '@types/react':
+ optional: true
+ dependencies:
+ '@babel/runtime': 7.17.2
+ '@emotion/react': 11.7.1_react@17.0.2
+ '@emotion/styled': 11.6.0_79c1490562c3c65ef55eb132a37e39b4
+ '@mui/private-theming': 5.4.2_react@17.0.2
+ '@mui/styled-engine': 5.4.2_922a85da57e3646a57465b7970b0de85
+ '@mui/types': 7.1.2
+ '@mui/utils': 5.4.2_react@17.0.2
+ clsx: 1.1.1
+ csstype: 3.0.10
+ prop-types: 15.7.2
+ react: 17.0.2
+ dev: false
+
/@mui/types/7.1.1:
resolution: {integrity: sha512-33hbHFLCwenTpS+T4m4Cz7cQ/ng5g+IgtINkw1uDBVvi1oM83VNt/IGzWIQNPK8H2pr0WIfkmboD501bVdYsPw==}
peerDependencies:
@@ -3212,6 +3300,15 @@ packages:
optional: true
dev: false
+ /@mui/types/7.1.2:
+ resolution: {integrity: sha512-SD7O1nVzqG+ckQpFjDhXPZjRceB8HQFHEvdLLrPhlJy4lLbwEBbxK74Tj4t6Jgk0fTvLJisuwOutrtYe9P/xBQ==}
+ peerDependencies:
+ '@types/react': '*'
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ dev: false
+
/@mui/utils/5.4.1_react@17.0.2:
resolution: {integrity: sha512-5HzM+ZjlQqbSp7UTOvLlhAjkWB+o9Z4NzO0W+yhZ1KnxITr+zr/MBzYmmQ3kyvhui8pyhgRDoTcVgwb+02ZUZA==}
engines: {node: '>=12.0.0'}
@@ -3226,6 +3323,20 @@ packages:
react-is: 17.0.2
dev: false
+ /@mui/utils/5.4.2_react@17.0.2:
+ resolution: {integrity: sha512-646dBCC57MXTo/Gf3AnZSHRHznaTETQq5x7AWp5FRQ4jPeyT4WSs18cpJVwkV01cAHKh06pNQTIufIALIWCL5g==}
+ engines: {node: '>=12.0.0'}
+ peerDependencies:
+ react: ^17.0.0
+ dependencies:
+ '@babel/runtime': 7.17.2
+ '@types/prop-types': 15.7.4
+ '@types/react-is': 17.0.3
+ prop-types: 15.7.2
+ react: 17.0.2
+ react-is: 17.0.2
+ dev: false
+
/@nodelib/fs.scandir/2.1.4:
resolution: {integrity: sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==}
engines: {node: '>= 8'}