Skip to content

Commit dbd78f6

Browse files
authored
chore(v2): vitest 4 (#8084)
1 parent d48c3d2 commit dbd78f6

File tree

74 files changed

+194
-264
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+194
-264
lines changed

.changeset/free-needles-live.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@qwik.dev/core': patch
3+
---
4+
5+
FEAT: All vite.config.mts files got renamed to vite.config.ts files, because all starters are marked as ESM projects

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"skipFiles": ["<node_internals>/**"],
3939
"cwd": "${workspaceFolder}/packages/docs",
4040
"program": "${workspaceFolder}/packages/docs/node_modules/vite/bin/vite.js",
41-
"args": ["build", "-c", "adapters/cloudflare-pages/vite.config.mts"]
41+
"args": ["build", "-c", "adapters/cloudflare-pages/vite.config.ts"]
4242
},
4343
{
4444
"type": "node",

e2e/qwik-cli-e2e/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ Both `config.cleanupFn();` and `killAllRegisteredProcesses` there are extremely
4747

4848
## Adding new tests
4949

50-
Right now we have only one test file within this project. This means only one test application will be created and used, which is good from the execution time standpoint. If more files are added, it shouldn't potentially be a problem as we have `fileParallelism: false` set in the `vite.config.mts`, which means only one test will be executed at a time. This obviously slows down the execution time, but is safer, because we're working with a real file system.
50+
Right now we have only one test file within this project. This means only one test application will be created and used, which is good from the execution time standpoint. If more files are added, it shouldn't potentially be a problem as we have `fileParallelism: false` set in the `vite.config.ts`, which means only one test will be executed at a time. This obviously slows down the execution time, but is safer, because we're working with a real file system.

e2e/qwik-cli-e2e/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"private": true,
88
"scripts": {
9-
"e2e": "vitest run --config=vite.config.mts",
10-
"e2e.watch": "vitest watch --config=vite.config.mts"
9+
"e2e": "vitest run --config=vite.config.ts",
10+
"e2e.watch": "vitest watch --config=vite.config.ts"
1111
}
1212
}
File renamed without changes.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
"vite-imagetools": "9.0.0",
162162
"vite-plugin-dts": "4.5.4",
163163
"vite-tsconfig-paths": "5.1.4",
164-
"vitest": "3.2.4",
164+
"vitest": "4.0.1",
165165
"watchlist": "0.3.1",
166166
"which-pm-runs": "1.1.0",
167167
"zod": "3.25.48"

packages/docs/src/routes/api/qwik-router-vite-vercel/api.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
}
2727
],
2828
"kind": "Interface",
29-
"content": "```typescript\nexport interface VercelEdgeAdapterOptions extends ServerAdapterOptions \n```\n**Extends:** ServerAdapterOptions\n\n\n<table><thead><tr><th>\n\nProperty\n\n\n</th><th>\n\nModifiers\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\n[outputConfig?](./router.verceledgeadapteroptions.outputconfig.md)\n\n\n</td><td>\n\n\n</td><td>\n\nboolean\n\n\n</td><td>\n\n_(Optional)_ Determines if the build should auto-generate the `.vercel/output/config.json` config.\n\nDefaults to `true`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[staticPaths?](./router.verceledgeadapteroptions.staticpaths.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\\[\\]\n\n\n</td><td>\n\n_(Optional)_ Manually add pathnames that should be treated as static paths and not SSR. For example, when these pathnames are requested, their response should come from a static file, rather than a server-side rendered response.\n\n\n</td></tr>\n<tr><td>\n\n[target?](./router.verceledgeadapteroptions.target.md)\n\n\n</td><td>\n\n\n</td><td>\n\n'webworker' \\| 'node'\n\n\n</td><td>\n\n_(Optional)_ Define the `target` property in the `ssr` object in the `vite.config.mts` file.\n\nDefaults to `webworker`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[vcConfigEntryPoint?](./router.verceledgeadapteroptions.vcconfigentrypoint.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\n_(Optional)_ The `entrypoint` property in the `.vc-config.json` file. Indicates the initial file where code will be executed for the Edge Function.\n\nDefaults to `entry.vercel-edge.js`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[vcConfigEnvVarsInUse?](./router.verceledgeadapteroptions.vcconfigenvvarsinuse.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\\[\\]\n\n\n</td><td>\n\n_(Optional)_ The `envVarsInUse` property in the `.vc-config.json` file. List of environment variable names that will be available for the Edge Function to utilize.\n\nDefaults to `undefined`<!-- -->.\n\n\n</td></tr>\n</tbody></table>",
29+
"content": "```typescript\nexport interface VercelEdgeAdapterOptions extends ServerAdapterOptions \n```\n**Extends:** ServerAdapterOptions\n\n\n<table><thead><tr><th>\n\nProperty\n\n\n</th><th>\n\nModifiers\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\n[outputConfig?](./router.verceledgeadapteroptions.outputconfig.md)\n\n\n</td><td>\n\n\n</td><td>\n\nboolean\n\n\n</td><td>\n\n_(Optional)_ Determines if the build should auto-generate the `.vercel/output/config.json` config.\n\nDefaults to `true`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[staticPaths?](./router.verceledgeadapteroptions.staticpaths.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\\[\\]\n\n\n</td><td>\n\n_(Optional)_ Manually add pathnames that should be treated as static paths and not SSR. For example, when these pathnames are requested, their response should come from a static file, rather than a server-side rendered response.\n\n\n</td></tr>\n<tr><td>\n\n[target?](./router.verceledgeadapteroptions.target.md)\n\n\n</td><td>\n\n\n</td><td>\n\n'webworker' \\| 'node'\n\n\n</td><td>\n\n_(Optional)_ Define the `target` property in the `ssr` object in the `vite.config.ts` file.\n\nDefaults to `webworker`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[vcConfigEntryPoint?](./router.verceledgeadapteroptions.vcconfigentrypoint.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\n_(Optional)_ The `entrypoint` property in the `.vc-config.json` file. Indicates the initial file where code will be executed for the Edge Function.\n\nDefaults to `entry.vercel-edge.js`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[vcConfigEnvVarsInUse?](./router.verceledgeadapteroptions.vcconfigenvvarsinuse.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\\[\\]\n\n\n</td><td>\n\n_(Optional)_ The `envVarsInUse` property in the `.vc-config.json` file. List of environment variable names that will be available for the Edge Function to utilize.\n\nDefaults to `undefined`<!-- -->.\n\n\n</td></tr>\n</tbody></table>",
3030
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/adapters/vercel-edge/vite/index.ts",
3131
"mdFile": "router.verceledgeadapteroptions.md"
3232
}
3333
]
34-
}
34+
}

packages/docs/src/routes/api/qwik-router-vite-vercel/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ _(Optional)_ Manually add pathnames that should be treated as static paths and n
113113
114114
</td><td>
115115
116-
_(Optional)_ Define the `target` property in the `ssr` object in the `vite.config.mts` file.
116+
_(Optional)_ Define the `target` property in the `ssr` object in the `vite.config.ts` file.
117117
118118
Defaults to `webworker`.
119119

packages/docs/src/routes/docs/(qwik)/advanced/custom-build-dir/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In certain cases, we may need to make the build output directory different from
2121

2222
Usually with Vite.js we do it like this:
2323

24-
```ts title="vite.config.mts"
24+
```ts title="vite.config.ts"
2525
import { defineConfig } from 'vite';
2626
import { qwikVite } from '@qwik.dev/core/optimizer';
2727
import { qwikRouter } from '@qwik.dev/router/vite';
@@ -56,7 +56,7 @@ However, it will be overridden by the settings of QwikVite() so nothing happens
5656

5757
So instead of changing the settings in Vite.js directly, we just need to change the settings in QwikVite() like this:
5858

59-
```ts title="vite.config.mts"
59+
```ts title="vite.config.ts"
6060
import { defineConfig } from 'vite';
6161
import { qwikVite } from '@qwik.dev/core/optimizer';
6262
import { qwikRouter } from '@qwik.dev/router/vite';

packages/docs/src/routes/docs/(qwik)/advanced/library/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ This will create a new folder called `my-library` with the following structure:
5656
│   ├── index.ts
5757
│   └── root.tsx
5858
├── tsconfig.json
59-
└── vite.config.mts
59+
└── vite.config.ts
6060
```
6161

62-
The most important files of a library are a properly configured `package.json` and `vite.config.mts`.
62+
The most important files of a library are a properly configured `package.json` and `vite.config.ts`.
6363

6464
## package.json
6565

@@ -90,7 +90,7 @@ Notice the `qwik` field, this is the entry point for the Qwik Optimizer, it will
9090

9191
> The file must be called with the `.qwik.mjs` extension, otherwise the Qwik Optimizer will not recognize it.
9292
93-
## vite.config.mts
93+
## vite.config.ts
9494

9595
```ts {8-12}
9696
import { defineConfig } from 'vite';

0 commit comments

Comments
 (0)