diff --git a/.oxfmtrc.json b/.oxfmtrc.json deleted file mode 100644 index ca1f443d59..0000000000 --- a/.oxfmtrc.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "./node_modules/oxfmt/configuration_schema.json", - "printWidth": 120, - "singleQuote": true, - "ignorePatterns": [ - "tegg/core/loader/test/fixtures/modules/loader-failed/AppRepo.ts", - "tegg/core/aop-runtime/test/aop-runtime.test.ts", - "packages/core/test/fixtures/load_dirs/syntax_error/*", - "packages/core/test/fixtures/syntaxerror/*", - "packages/core/test/fixtures/load_context_syntax_error/**/*", - "CHANGELOG.md" - ], - "experimentalSortImports": { - "groups": [ - ["type-import"], - ["type-builtin", "value-builtin"], - ["type-external", "value-external", "type-internal", "value-internal"], - ["type-parent", "type-sibling", "type-index", "value-parent", "value-sibling", "value-index"], - ["ts-equals-import"], - ["unknown"] - ], - "newlinesBetween": true, - "order": "asc" - }, - "yaml": { - "singleQuote": true - } -} diff --git a/.oxlintrc.json b/.oxlintrc.json deleted file mode 100644 index 24e3ed173a..0000000000 --- a/.oxlintrc.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "./node_modules/oxlint/configuration_schema.json", - "env": { - "node": true - }, - "ignorePatterns": [ - "**/test/fixtures/**", - "tegg/benchmark/http", - "tools/create-egg/src/templates/egg3-tegg", - "tools/create-egg/src/templates/egg3-simple-ts/test" - ], - "rules": { - "no-unused-vars": "error", - "preserve-caught-error": "error" - } -} diff --git a/CLAUDE.md b/CLAUDE.md index 6b3853d968..45b2e39a17 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1013,3 +1013,56 @@ Include setup instructions and common configuration patterns. - [Koa.js](https://koajs.com/) - Underlying web framework - [Midway.js](https://midwayjs.org/) - Enterprise Node.js framework - [Think.js](https://thinkjs.org/) - Alternative Node.js framework + + +# Using Vite+, the Unified Toolchain for the Web + +This project is using Vite+, a modern toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, and Oxfmt. Vite+ wraps these tools and package manager commands in a single, global CLI called `vite`. Vite+ is distinct from Vite, but it invokes Vite through `vite dev` and `vite build`. + +## Vite+ Workflow + +`vite` is a global binary that handles the full development lifecycle. Run `vite help` to print a list of commands and `vite --help` for information about a specific command. + +### Vite+ Commands + +- dev - Run the development server +- build - Build for production +- lint - Lint code +- test - Run tests +- fmt - Format code +- lib - Build library +- new - Create a new monorepo package (in-project) or a new project (global) +- run - Run tasks from `package.json` scripts + +These commands map to their corresponding tools. For example, `vite dev --port 3000` runs Vite's dev server and works the same as Vite. `vite test` runs JavaScript tests through the bundled Vitest. The versions of individual tools can be checked using `vite --version`. For example, `vite lint --version` prints the bundled Oxlint version, and `vite test --version` prints the bundled Vitest version. This is useful when researching documentation, features, and bugs. + +### Package Manager Commands + +Vite+ automatically detects and wraps the underlying package manager such as pnpm, npm, or Yarn through the `packageManager` field in `package.json` or package manager-specific lockfiles. + +- install - Install all dependencies, or add packages if package names are provided +- add - Add packages to dependencies +- remove - Remove packages from dependencies +- dlx - Execute a package binary without installing it as a dependency +- info - View package information from the registry, including latest versions +- link - Link packages for local development +- outdated - Check for outdated packages +- pm - Forward a command to the package manager +- unlink - Unlink packages +- update - Update packages to their latest versions +- why - Show why a package is installed + +## Common Pitfalls + +- **Using the package manager directly:** Do not use pnpm, npm, or Yarn directly. Vite+ can handle all package manager operations. +- **Always use Vite commands to run tools:** Don't attempt to run `vite vitest` or `vite oxlint`. They do not exist. Use `vite test` and `vite lint` instead. +- **Running scripts:** Vite+ commands take precedence over `package.json` scripts. If there is a `test` script defined in `scripts` that conflicts with the built-in `vite test` command, run it using `vite run test`. +- **Do not install Vitest, Oxlint, Oxfmt, or tsdown directly:** Vite+ wraps these tools. They must not be installed directly. You cannot upgrade these tools by installing their latest versions. Always use Vite+ commands. +- **Import JavaScript modules from `vite-plus`:** Instead of importing from `vite` or `vitest`, all modules should be imported from the project's `vite-plus` dependency. For example, `import { defineConfig } from 'vite-plus';` or `import { expect, test, vi } from 'vite-plus/test';`. You must not install `vitest` to import test utilities. +- **Type-Aware Linting:** There is no need to install `oxlint-tsgolint`, `vite lint --type-aware` works out of the box. + +## Review Checklist for Agents + +- [ ] Run `vite install` after pulling remote changes and before getting started. +- [ ] Run `vite lint`, `vite fmt`, and `vite test` to validate changes. + diff --git a/examples/helloworld-tegg/package.json b/examples/helloworld-tegg/package.json index d23af4ebbe..97888a5af0 100644 --- a/examples/helloworld-tegg/package.json +++ b/examples/helloworld-tegg/package.json @@ -37,15 +37,15 @@ "scripts": { "dev": "egg-bin dev", "debug": "egg-bin debug", - "test": "vitest run", - "cov": "vitest run --coverage", + "test": "vite test run", + "cov": "vite test run --coverage", "lint": "eslint . --ext .ts", "ci": "pnpm run lint && pnpm run cov", "prepublishOnly": "pnpm run build", "start": "egg-scripts start --daemon", "stop": "egg-scripts stop", "typecheck": "tsgo --noEmit", - "build": "tsdown" + "build": "vite lib" }, "dependencies": { "@eggjs/scripts": "workspace:", @@ -56,9 +56,9 @@ "@eggjs/bin": "workspace:*", "@eggjs/mock": "workspace:*", "@eggjs/tsconfig": "workspace:*", - "tsdown": "catalog:", "typescript": "catalog:", - "vitest": "catalog:" + "vitest": "catalog:", + "vite-plus": "catalog:" }, "engines": { "node": ">=22.18.0" diff --git a/examples/helloworld-tegg/test/ArgsController.test.ts b/examples/helloworld-tegg/test/ArgsController.test.ts index 58ce5ebfaa..f67a7ce25a 100644 --- a/examples/helloworld-tegg/test/ArgsController.test.ts +++ b/examples/helloworld-tegg/test/ArgsController.test.ts @@ -1,5 +1,5 @@ import { app } from '@eggjs/mock/bootstrap'; -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; test('should POST /api/args/request success', async () => { app.mockCsrf(); diff --git a/examples/helloworld-tegg/test/SimpleController.test.ts b/examples/helloworld-tegg/test/SimpleController.test.ts index c57a1e9779..1bf91e03dd 100644 --- a/examples/helloworld-tegg/test/SimpleController.test.ts +++ b/examples/helloworld-tegg/test/SimpleController.test.ts @@ -1,5 +1,5 @@ import { app } from '@eggjs/mock/bootstrap'; -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; test('should GET /api/headers with headers', async () => { await app.httpRequest().get('/api/headers').set('X-Custom', 'custom').expect(200).expect({ diff --git a/examples/helloworld-tegg/test/setup.ts b/examples/helloworld-tegg/test/setup.ts index e1ba73ea38..b3104143b7 100644 --- a/examples/helloworld-tegg/test/setup.ts +++ b/examples/helloworld-tegg/test/setup.ts @@ -1,4 +1,4 @@ -import { beforeAll, afterAll } from 'vitest'; +import { beforeAll, afterAll } from 'vite-plus/test'; // https://vitest.dev/config/#setupfiles // export beforeAll and afterAll to globalThis, let @eggjs/mock/bootstrap use it diff --git a/examples/helloworld-tegg/tsdown.config.ts b/examples/helloworld-tegg/tsdown.config.ts index cc85171a1a..faad4743ca 100644 --- a/examples/helloworld-tegg/tsdown.config.ts +++ b/examples/helloworld-tegg/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: ['app.ts', 'config/**/*.ts', 'app/**/*.ts'], diff --git a/examples/helloworld-tegg/vite.config.ts b/examples/helloworld-tegg/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/examples/helloworld-tegg/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/examples/helloworld-tegg/vitest.config.ts b/examples/helloworld-tegg/vitest.config.ts index 95c075acee..a2e2e58594 100644 --- a/examples/helloworld-tegg/vitest.config.ts +++ b/examples/helloworld-tegg/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject } from 'vitest/config'; +import { defineProject } from 'vite-plus'; export default defineProject({ test: { diff --git a/examples/helloworld-typescript/package.json b/examples/helloworld-typescript/package.json index 854d309605..2b357201b0 100644 --- a/examples/helloworld-typescript/package.json +++ b/examples/helloworld-typescript/package.json @@ -25,15 +25,15 @@ "scripts": { "dev": "egg-bin dev", "debug": "egg-bin debug", - "test": "vitest run", - "cov": "vitest run --coverage", + "test": "vite test run", + "cov": "vite test run --coverage", "lint": "eslint . --ext .ts", "ci": "pnpm run lint && pnpm run cov", "prepublishOnly": "pnpm run build", "start": "egg-scripts start --daemon", "stop": "egg-scripts stop", "typecheck": "tsgo --noEmit", - "build": "tsdown" + "build": "vite lib" }, "dependencies": { "@eggjs/scripts": "workspace:", @@ -44,9 +44,9 @@ "@eggjs/bin": "workspace:*", "@eggjs/mock": "workspace:*", "@eggjs/tsconfig": "workspace:*", - "tsdown": "catalog:", "typescript": "catalog:", - "vitest": "catalog:" + "vitest": "catalog:", + "vite-plus": "catalog:" }, "engines": { "node": ">=22.18.0" diff --git a/examples/helloworld-typescript/test/hello.test.ts b/examples/helloworld-typescript/test/hello.test.ts index 6437eadcd3..cd99279973 100644 --- a/examples/helloworld-typescript/test/hello.test.ts +++ b/examples/helloworld-typescript/test/hello.test.ts @@ -1,5 +1,5 @@ import { app } from '@eggjs/mock/bootstrap'; -import { test } from 'vitest'; +import { test } from 'vite-plus/test'; test('should GET /', async () => { await app.httpRequest().get('/').expect(200).expect('Hello EggJS 🥚🥚🥚🥚'); diff --git a/examples/helloworld-typescript/test/setup.ts b/examples/helloworld-typescript/test/setup.ts index e1ba73ea38..b3104143b7 100644 --- a/examples/helloworld-typescript/test/setup.ts +++ b/examples/helloworld-typescript/test/setup.ts @@ -1,4 +1,4 @@ -import { beforeAll, afterAll } from 'vitest'; +import { beforeAll, afterAll } from 'vite-plus/test'; // https://vitest.dev/config/#setupfiles // export beforeAll and afterAll to globalThis, let @eggjs/mock/bootstrap use it diff --git a/examples/helloworld-typescript/tsdown.config.ts b/examples/helloworld-typescript/tsdown.config.ts index cc85171a1a..faad4743ca 100644 --- a/examples/helloworld-typescript/tsdown.config.ts +++ b/examples/helloworld-typescript/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: ['app.ts', 'config/**/*.ts', 'app/**/*.ts'], diff --git a/examples/helloworld-typescript/vite.config.ts b/examples/helloworld-typescript/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/examples/helloworld-typescript/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/examples/helloworld-typescript/vitest.config.ts b/examples/helloworld-typescript/vitest.config.ts index 95c075acee..a2e2e58594 100644 --- a/examples/helloworld-typescript/vitest.config.ts +++ b/examples/helloworld-typescript/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject } from 'vitest/config'; +import { defineProject } from 'vite-plus'; export default defineProject({ test: { diff --git a/package.json b/package.json index 8989bb0ee1..bda14dcecf 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,14 @@ "scripts": { "clean-dist": "pnpm -r --parallel exec rimraf dist", "clean": "pnpm -r --parallel run clean && pnpm clean-dist", - "build": "tsdown", + "build": "vite lib", "prelint": "pnpm clean-dist", - "lint": "oxlint --type-aware --type-check --quiet", - "fmt": "oxfmt", + "lint": "vite lint --type-aware --type-check --quiet", + "fmt": "vite fmt", "typecheck": "pnpm clean && pnpm -r run typecheck", - "fmtcheck": "oxfmt --check .", + "fmtcheck": "vite fmt --check .", "pretest": "pnpm run clean && pnpm -r run pretest", - "test": "vitest run --bail 1 --retry 2 --testTimeout 20000 --hookTimeout 20000", + "test": "vite test run --bail 1 --retry 2 --testTimeout 20000 --hookTimeout 20000", "test:cov": "pnpm run test --coverage", "preci": "pnpm -r --parallel run pretest", "ci": "pnpm run test --coverage", @@ -58,22 +58,19 @@ "js-yaml": "catalog:", "lint-staged": "catalog:", "mocha": "catalog:", - "oxfmt": "catalog:", - "oxlint": "catalog:", - "oxlint-tsgolint": "catalog:", "publint": "catalog:", "rimraf": "catalog:", "semver": "catalog:", - "tsdown": "catalog:", "tsx": "catalog:", "typescript": "catalog:", "urllib": "catalog:", - "vitest": "catalog:" + "vitest": "catalog:", + "vite-plus": "catalog:" }, "lint-staged": { "*": [ - "oxfmt --no-error-on-unmatched-pattern", - "oxlint --type-aware --fix" + "vite fmt --no-error-on-unmatched-pattern", + "vite lint --type-aware --fix" ] }, "engines": { diff --git a/packages/cluster/package.json b/packages/cluster/package.json index baf2a389f6..9e28a8c7d9 100644 --- a/packages/cluster/package.json +++ b/packages/cluster/package.json @@ -41,9 +41,9 @@ } }, "scripts": { - "lint": "oxlint", + "lint": "vite lint", "typecheck": "tsgo --noEmit", - "test": "vitest run" + "test": "vite test run" }, "dependencies": { "@eggjs/utils": "workspace:*", @@ -65,10 +65,10 @@ "@eggjs/tsconfig": "workspace:*", "address": "catalog:", "coffee": "catalog:", - "tsdown": "catalog:", "typescript": "catalog:", "urllib": "catalog:", - "vitest": "catalog:" + "vitest": "catalog:", + "vite-plus": "catalog:" }, "engines": { "node": ">=22.18.0" diff --git a/packages/cluster/test/agent_worker.test.ts b/packages/cluster/test/agent_worker.test.ts index 992a571468..be9d6dd9ff 100644 --- a/packages/cluster/test/agent_worker.test.ts +++ b/packages/cluster/test/agent_worker.test.ts @@ -4,7 +4,7 @@ import { scheduler } from 'node:timers/promises'; import { mm, type MockClusterApplication } from '@eggjs/mock'; import coffee from 'coffee'; -import { describe, it, afterEach, beforeAll, afterAll } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll } from 'vite-plus/test'; import { cluster, getFilepath } from './utils.ts'; diff --git a/packages/cluster/test/app_worker.test.ts b/packages/cluster/test/app_worker.test.ts index b77f906ab8..f2e0e3f97b 100644 --- a/packages/cluster/test/app_worker.test.ts +++ b/packages/cluster/test/app_worker.test.ts @@ -6,7 +6,7 @@ import { mm, type MockApplication } from '@eggjs/mock'; import { request } from '@eggjs/supertest'; import { ip } from 'address'; import urllib from 'urllib'; -import { describe, it, afterEach, beforeEach, beforeAll, afterAll } from 'vitest'; +import { describe, it, afterEach, beforeEach, beforeAll, afterAll } from 'vite-plus/test'; import { cluster, getFilepath } from './utils.ts'; diff --git a/packages/cluster/test/https.test.ts b/packages/cluster/test/https.test.ts index e09e96596e..d78573ee82 100644 --- a/packages/cluster/test/https.test.ts +++ b/packages/cluster/test/https.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert'; import { mm, type MockApplication } from '@eggjs/mock'; import { HttpClient } from 'urllib'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { getFilepath, cluster } from './utils.ts'; diff --git a/packages/cluster/test/master/after-start.test.ts b/packages/cluster/test/master/after-start.test.ts index c5b7f6810f..f8e1812981 100644 --- a/packages/cluster/test/master/after-start.test.ts +++ b/packages/cluster/test/master/after-start.test.ts @@ -2,7 +2,7 @@ import { strict as assert } from 'node:assert'; import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach, beforeAll, afterAll } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll } from 'vite-plus/test'; import { cluster } from '../utils.ts'; diff --git a/packages/cluster/test/master/check-pid-file.test.ts b/packages/cluster/test/master/check-pid-file.test.ts index 429688ece5..26706b1f11 100644 --- a/packages/cluster/test/master/check-pid-file.test.ts +++ b/packages/cluster/test/master/check-pid-file.test.ts @@ -5,7 +5,7 @@ import path from 'node:path'; import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach, beforeEach } from 'vitest'; +import { describe, it, afterEach, beforeEach } from 'vite-plus/test'; import { cluster, getFilepath } from '../utils.ts'; diff --git a/packages/cluster/test/master/close-master.test.ts b/packages/cluster/test/master/close-master.test.ts index 2d6a325084..7057ca8a25 100644 --- a/packages/cluster/test/master/close-master.test.ts +++ b/packages/cluster/test/master/close-master.test.ts @@ -3,7 +3,7 @@ import { once } from 'node:events'; import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { cluster } from '../utils.ts'; diff --git a/packages/cluster/test/master/messenger.test.ts b/packages/cluster/test/master/messenger.test.ts index 13badf2f49..b1a0aa4e22 100644 --- a/packages/cluster/test/master/messenger.test.ts +++ b/packages/cluster/test/master/messenger.test.ts @@ -1,7 +1,7 @@ import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { cluster } from '../utils.ts'; diff --git a/packages/cluster/test/master/others.test.ts b/packages/cluster/test/master/others.test.ts index 7e520b4d3e..72bd074a94 100644 --- a/packages/cluster/test/master/others.test.ts +++ b/packages/cluster/test/master/others.test.ts @@ -6,7 +6,7 @@ import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; import { request } from '@eggjs/supertest'; -import { describe, it, afterEach, beforeAll, afterAll } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll } from 'vite-plus/test'; import { cluster, getFilepath } from '../utils.ts'; diff --git a/packages/cluster/test/master/start-master.test.ts b/packages/cluster/test/master/start-master.test.ts index f44cb78df3..c2f24d9c03 100644 --- a/packages/cluster/test/master/start-master.test.ts +++ b/packages/cluster/test/master/start-master.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { cluster } from '../utils.ts'; diff --git a/packages/cluster/test/options.test.ts b/packages/cluster/test/options.test.ts index b1ab8b966d..fb544e95d3 100644 --- a/packages/cluster/test/options.test.ts +++ b/packages/cluster/test/options.test.ts @@ -4,7 +4,7 @@ import path from 'node:path'; import { mm } from '@eggjs/mock'; import { importResolve } from '@eggjs/utils'; -import { describe, it, afterEach, beforeAll, afterAll } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll } from 'vite-plus/test'; import { parseOptions } from '../src/utils/options.ts'; import { getFilepath, cluster } from './utils.ts'; diff --git a/packages/cluster/test/worker_threads.test.ts b/packages/cluster/test/worker_threads.test.ts index d5a7a8f2a6..7f9a8322f3 100644 --- a/packages/cluster/test/worker_threads.test.ts +++ b/packages/cluster/test/worker_threads.test.ts @@ -1,5 +1,5 @@ import { type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { cluster } from './utils.ts'; diff --git a/packages/cluster/tsdown.config.ts b/packages/cluster/tsdown.config.ts index 667b7effe8..6fa04b62c9 100644 --- a/packages/cluster/tsdown.config.ts +++ b/packages/cluster/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/packages/cluster/vite.config.ts b/packages/cluster/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/packages/cluster/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/packages/cluster/vitest.config.ts b/packages/cluster/vitest.config.ts index 57eec8c40a..b41efbed0b 100644 --- a/packages/cluster/vitest.config.ts +++ b/packages/cluster/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject } from 'vitest/config'; +import { defineProject } from 'vite-plus'; export default defineProject({ test: { diff --git a/packages/cookies/test/cookie.test.ts b/packages/cookies/test/cookie.test.ts index 1d5dd91115..d082fac99b 100644 --- a/packages/cookies/test/cookie.test.ts +++ b/packages/cookies/test/cookie.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { Cookie } from '../src/index.ts'; diff --git a/packages/cookies/test/cookies.test.ts b/packages/cookies/test/cookies.test.ts index aaa0ccf9e8..d6dcee27c2 100644 --- a/packages/cookies/test/cookies.test.ts +++ b/packages/cookies/test/cookies.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, expect, it, vi } from 'vitest'; +import { describe, expect, it, vi } from 'vite-plus/test'; import { CookieError, type CookieSetOptions } from '../src/index.ts'; import Cookies from './cookies.ts'; diff --git a/packages/cookies/test/keygrip.test.ts b/packages/cookies/test/keygrip.test.ts index 212904758d..9587968e25 100644 --- a/packages/cookies/test/keygrip.test.ts +++ b/packages/cookies/test/keygrip.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import crypto from 'node:crypto'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { Keygrip } from '../src/index.ts'; diff --git a/packages/cookies/tsdown.config.ts b/packages/cookies/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/packages/cookies/tsdown.config.ts +++ b/packages/cookies/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/packages/cookies/vite.config.ts b/packages/cookies/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/packages/cookies/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/packages/core/test/asyncLocalStorage.test.ts b/packages/core/test/asyncLocalStorage.test.ts index f3f16c9822..4d4aa0df3b 100644 --- a/packages/core/test/asyncLocalStorage.test.ts +++ b/packages/core/test/asyncLocalStorage.test.ts @@ -3,7 +3,7 @@ import { AsyncLocalStorage } from 'node:async_hooks'; import { request } from '@eggjs/supertest'; import { getAsyncLocalStorage, kGALS } from 'gals'; -import { test, beforeAll } from 'vitest'; +import { test, beforeAll } from 'vite-plus/test'; // @ts-ignore import { Application } from './fixtures/egg-esm/index.ts'; diff --git a/packages/core/test/egg-ts.test.ts b/packages/core/test/egg-ts.test.ts index 69720e7fa9..1aaf7c695c 100644 --- a/packages/core/test/egg-ts.test.ts +++ b/packages/core/test/egg-ts.test.ts @@ -3,7 +3,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; import coffee from 'coffee'; import { mm } from 'mm'; -import { describe, it, beforeEach, afterEach } from 'vitest'; +import { describe, it, beforeEach, afterEach } from 'vite-plus/test'; import { utils } from '../src/index.ts'; import { createApp, getFilepath, type Application } from './helper.ts'; diff --git a/packages/core/test/egg.test.ts b/packages/core/test/egg.test.ts index c96cb9f068..20d27fca1f 100644 --- a/packages/core/test/egg.test.ts +++ b/packages/core/test/egg.test.ts @@ -7,7 +7,7 @@ import util from 'node:util'; import { request } from '@eggjs/supertest'; import coffee from 'coffee'; import { mm } from 'mm'; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, beforeEach, afterEach } from 'vite-plus/test'; import { EggCore } from '../src/index.js'; import { createApp, getFilepath, type Application } from './helper.js'; diff --git a/packages/core/test/fixtures/helloworld-ts/test/index.test.ts b/packages/core/test/fixtures/helloworld-ts/test/index.test.ts index c1353f2772..0d8ef7136f 100644 --- a/packages/core/test/fixtures/helloworld-ts/test/index.test.ts +++ b/packages/core/test/fixtures/helloworld-ts/test/index.test.ts @@ -1,5 +1,5 @@ import { app } from '@eggjs/mock/bootstrap'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; describe('example helloworld test', () => { it('should GET / 200', () => { diff --git a/packages/core/test/index.test.ts b/packages/core/test/index.test.ts index accd163f90..164adb79f6 100644 --- a/packages/core/test/index.test.ts +++ b/packages/core/test/index.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { test, expect } from 'vitest'; +import { test, expect } from 'vite-plus/test'; import * as EggCore from '../src/index.ts'; import type { EggAppConfig } from '../src/index.ts'; diff --git a/packages/core/test/lifecycle.test.ts b/packages/core/test/lifecycle.test.ts index 0359806edb..a94fc8cf86 100644 --- a/packages/core/test/lifecycle.test.ts +++ b/packages/core/test/lifecycle.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { EggCore } from '../src/egg.ts'; import { Lifecycle } from '../src/lifecycle.ts'; diff --git a/packages/core/test/loader/context_loader.test.ts b/packages/core/test/loader/context_loader.test.ts index 2d60116c2e..69fa23b1c6 100644 --- a/packages/core/test/loader/context_loader.test.ts +++ b/packages/core/test/loader/context_loader.test.ts @@ -1,5 +1,5 @@ import { request } from '@eggjs/supertest'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, getFilepath, type Application } from '../helper.js'; diff --git a/packages/core/test/loader/egg_loader.test.ts b/packages/core/test/loader/egg_loader.test.ts index 659ce65239..b535d239c0 100644 --- a/packages/core/test/loader/egg_loader.test.ts +++ b/packages/core/test/loader/egg_loader.test.ts @@ -4,7 +4,7 @@ import path from 'node:path'; import { getPlugins } from '@eggjs/utils'; import { mm } from 'mm'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { EggLoader } from '../../src/index.js'; import { createApp, getFilepath, type Application } from '../helper.js'; diff --git a/packages/core/test/loader/file_loader.test.ts b/packages/core/test/loader/file_loader.test.ts index 2a0554823d..c620f87c8c 100644 --- a/packages/core/test/loader/file_loader.test.ts +++ b/packages/core/test/loader/file_loader.test.ts @@ -3,7 +3,7 @@ import path from 'node:path'; import { isClass } from 'is-type-of'; import yaml from 'js-yaml'; -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import { FileLoader, CaseStyle } from '../../src/loader/file_loader.ts'; import { getFilepath } from '../helper.ts'; diff --git a/packages/core/test/loader/get_app_info.test.ts b/packages/core/test/loader/get_app_info.test.ts index 6c34f87c11..35608bd298 100644 --- a/packages/core/test/loader/get_app_info.test.ts +++ b/packages/core/test/loader/get_app_info.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm } from 'mm'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { createApp, getFilepath, type Application } from '../helper.js'; diff --git a/packages/core/test/loader/get_appname.test.ts b/packages/core/test/loader/get_appname.test.ts index a64ee09ecf..3a5526d516 100644 --- a/packages/core/test/loader/get_appname.test.ts +++ b/packages/core/test/loader/get_appname.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { createApp, getFilepath, type Application } from '../helper.js'; diff --git a/packages/core/test/loader/get_framework_paths.test.ts b/packages/core/test/loader/get_framework_paths.test.ts index 5bb5e243dd..fce3442a59 100644 --- a/packages/core/test/loader/get_framework_paths.test.ts +++ b/packages/core/test/loader/get_framework_paths.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import { importModule } from '@eggjs/utils'; import { mm } from 'mm'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { EggLoader, EggCore } from '../../src/index.ts'; import { createApp, getFilepath, type Application } from '../helper.ts'; diff --git a/packages/core/test/loader/get_load_units.test.ts b/packages/core/test/loader/get_load_units.test.ts index dad69d017f..ee52c3e1e5 100644 --- a/packages/core/test/loader/get_load_units.test.ts +++ b/packages/core/test/loader/get_load_units.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm } from 'mm'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { createApp, getFilepath, type Application } from '../helper.js'; diff --git a/packages/core/test/loader/get_server_env.test.ts b/packages/core/test/loader/get_server_env.test.ts index 34f9eadbe6..96ebb52452 100644 --- a/packages/core/test/loader/get_server_env.test.ts +++ b/packages/core/test/loader/get_server_env.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm } from 'mm'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { createApp, type Application } from '../helper.js'; diff --git a/packages/core/test/loader/load_file.test.ts b/packages/core/test/loader/load_file.test.ts index 7102b3f13c..53091592da 100644 --- a/packages/core/test/loader/load_file.test.ts +++ b/packages/core/test/loader/load_file.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm } from 'mm'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { createApp, getFilepath, type Application } from '../helper.js'; diff --git a/packages/core/test/loader/mixin/load_agent_extend.test.ts b/packages/core/test/loader/mixin/load_agent_extend.test.ts index be5f5f8c8e..f4bc33db6d 100644 --- a/packages/core/test/loader/mixin/load_agent_extend.test.ts +++ b/packages/core/test/loader/mixin/load_agent_extend.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp } from '../../helper.js'; diff --git a/packages/core/test/loader/mixin/load_application_extend.test.ts b/packages/core/test/loader/mixin/load_application_extend.test.ts index 68d3de51ba..c727b591c2 100644 --- a/packages/core/test/loader/mixin/load_application_extend.test.ts +++ b/packages/core/test/loader/mixin/load_application_extend.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp } from '../../helper.js'; diff --git a/packages/core/test/loader/mixin/load_config.test.ts b/packages/core/test/loader/mixin/load_config.test.ts index f23bd96c90..4ad639082a 100644 --- a/packages/core/test/loader/mixin/load_config.test.ts +++ b/packages/core/test/loader/mixin/load_config.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import path from 'node:path'; import { mm } from 'mm'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { EggCore } from '../../../src/index.js'; import { createApp, getFilepath, type Application } from '../../helper.js'; diff --git a/packages/core/test/loader/mixin/load_controller.test.ts b/packages/core/test/loader/mixin/load_controller.test.ts index efd6b59359..640a21f255 100644 --- a/packages/core/test/loader/mixin/load_controller.test.ts +++ b/packages/core/test/loader/mixin/load_controller.test.ts @@ -3,7 +3,7 @@ import path from 'node:path'; import { request } from '@eggjs/supertest'; import { isFunction, isAsyncFunction } from 'is-type-of'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, getFilepath, type Application } from '../../helper.js'; diff --git a/packages/core/test/loader/mixin/load_custom_agent.test.ts b/packages/core/test/loader/mixin/load_custom_agent.test.ts index d41e03a88a..aa2529cd63 100644 --- a/packages/core/test/loader/mixin/load_custom_agent.test.ts +++ b/packages/core/test/loader/mixin/load_custom_agent.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp } from '../../helper.js'; diff --git a/packages/core/test/loader/mixin/load_custom_app.test.ts b/packages/core/test/loader/mixin/load_custom_app.test.ts index f62c8610d9..b77ed4ac72 100644 --- a/packages/core/test/loader/mixin/load_custom_app.test.ts +++ b/packages/core/test/loader/mixin/load_custom_app.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, type Application } from '../../helper.js'; diff --git a/packages/core/test/loader/mixin/load_custom_loader.test.ts b/packages/core/test/loader/mixin/load_custom_loader.test.ts index 10e8d38d7c..05c09f27f5 100644 --- a/packages/core/test/loader/mixin/load_custom_loader.test.ts +++ b/packages/core/test/loader/mixin/load_custom_loader.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, type Application } from '../../helper.js'; diff --git a/packages/core/test/loader/mixin/load_extend.test.ts b/packages/core/test/loader/mixin/load_extend.test.ts index 45f0bbf146..775b9497a7 100644 --- a/packages/core/test/loader/mixin/load_extend.test.ts +++ b/packages/core/test/loader/mixin/load_extend.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; import { mm } from 'mm'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { createApp, type Application } from '../../helper.js'; diff --git a/packages/core/test/loader/mixin/load_extend_class.test.ts b/packages/core/test/loader/mixin/load_extend_class.test.ts index 2c26e1ff4e..86896cba46 100644 --- a/packages/core/test/loader/mixin/load_extend_class.test.ts +++ b/packages/core/test/loader/mixin/load_extend_class.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; import { mm } from 'mm'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { createApp, type Application } from '../../helper.ts'; diff --git a/packages/core/test/loader/mixin/load_helper_extend.test.ts b/packages/core/test/loader/mixin/load_helper_extend.test.ts index 740e97ff0e..c1c712c3b0 100644 --- a/packages/core/test/loader/mixin/load_helper_extend.test.ts +++ b/packages/core/test/loader/mixin/load_helper_extend.test.ts @@ -1,5 +1,5 @@ import { request } from '@eggjs/supertest'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, type Application } from '../../helper.js'; diff --git a/packages/core/test/loader/mixin/load_middleware.test.ts b/packages/core/test/loader/mixin/load_middleware.test.ts index c3a15340e0..0794451905 100644 --- a/packages/core/test/loader/mixin/load_middleware.test.ts +++ b/packages/core/test/loader/mixin/load_middleware.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import path from 'node:path'; import { request } from '@eggjs/supertest'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, getFilepath, type Application } from '../../helper.js'; diff --git a/packages/core/test/loader/mixin/load_plugin.test.ts b/packages/core/test/loader/mixin/load_plugin.test.ts index 49740f20ff..77ac02250c 100644 --- a/packages/core/test/loader/mixin/load_plugin.test.ts +++ b/packages/core/test/loader/mixin/load_plugin.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs'; import path from 'node:path'; import { mm } from 'mm'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { EggCore, EggLoader } from '../../../src/index.js'; import { createApp, getFilepath, type Application } from '../../helper.js'; diff --git a/packages/core/test/loader/mixin/load_service.test.ts b/packages/core/test/loader/mixin/load_service.test.ts index 6420fe00e8..65e4971233 100644 --- a/packages/core/test/loader/mixin/load_service.test.ts +++ b/packages/core/test/loader/mixin/load_service.test.ts @@ -3,7 +3,7 @@ import path from 'node:path'; import { request } from '@eggjs/supertest'; import { mm } from 'mm'; -import { describe, it, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterEach, beforeAll } from 'vite-plus/test'; import { createApp, getFilepath, type Application } from '../../helper.js'; diff --git a/packages/core/test/singleton.test.ts b/packages/core/test/singleton.test.ts index de67cdcacd..c0bbaca288 100644 --- a/packages/core/test/singleton.test.ts +++ b/packages/core/test/singleton.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { scheduler } from 'node:timers/promises'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { Singleton } from '../src/singleton.js'; diff --git a/packages/core/test/support-typescript.test.ts b/packages/core/test/support-typescript.test.ts index b8191162c5..bbbb2aabb4 100644 --- a/packages/core/test/support-typescript.test.ts +++ b/packages/core/test/support-typescript.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { request } from '@eggjs/supertest'; -import { describe, it, beforeAll } from 'vitest'; +import { describe, it, beforeAll } from 'vite-plus/test'; // @ts-ignore import { Application } from './fixtures/egg-esm/index.js'; diff --git a/packages/core/test/utils/index.test.ts b/packages/core/test/utils/index.test.ts index 858d69c7e5..9e04635ca5 100644 --- a/packages/core/test/utils/index.test.ts +++ b/packages/core/test/utils/index.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import path from 'node:path'; import { mm } from 'mm'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import utils from '../../src/utils/index.js'; import { getFilepath } from '../helper.js'; diff --git a/packages/core/test/utils/router.test.ts b/packages/core/test/utils/router.test.ts index 0b2cb8a9ba..959a22dcc5 100644 --- a/packages/core/test/utils/router.test.ts +++ b/packages/core/test/utils/router.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, type Application } from '../helper.js'; diff --git a/packages/core/test/utils/timing.test.ts b/packages/core/test/utils/timing.test.ts index 8bee6d3e5f..3b434ef376 100644 --- a/packages/core/test/utils/timing.test.ts +++ b/packages/core/test/utils/timing.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { Timing } from '../../src/utils/timing.js'; diff --git a/packages/core/tsdown.config.ts b/packages/core/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/packages/core/tsdown.config.ts +++ b/packages/core/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/packages/core/vite.config.ts b/packages/core/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/packages/core/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/packages/core/vitest.config.ts b/packages/core/vitest.config.ts index 91229c2b99..7207e7c3c5 100644 --- a/packages/core/vitest.config.ts +++ b/packages/core/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject } from 'vitest/config'; +import { defineProject } from 'vite-plus'; export default defineProject({ test: { diff --git a/packages/egg/test/agent.test.ts b/packages/egg/test/agent.test.ts index 4052d5de69..97c6cc619f 100644 --- a/packages/egg/test/agent.test.ts +++ b/packages/egg/test/agent.test.ts @@ -4,7 +4,7 @@ import path from 'node:path'; import { scheduler } from 'node:timers/promises'; import { mm } from '@eggjs/mock'; -import { describe, it, afterEach, beforeAll, afterAll } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, getFilepath, type MockApplication, cluster } from './utils.ts'; diff --git a/packages/egg/test/app/extend/agent.test.ts b/packages/egg/test/app/extend/agent.test.ts index b2e0f5aae7..9a116f3855 100644 --- a/packages/egg/test/app/extend/agent.test.ts +++ b/packages/egg/test/app/extend/agent.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { restore, createApp, type MockApplication } from '../../utils.ts'; diff --git a/packages/egg/test/app/extend/application.test.ts b/packages/egg/test/app/extend/application.test.ts index 5176301a2a..e038356d0d 100644 --- a/packages/egg/test/app/extend/application.test.ts +++ b/packages/egg/test/app/extend/application.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs'; import path from 'node:path'; import { scheduler } from 'node:timers/promises'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, type MockApplication, cluster } from '../../utils.ts'; diff --git a/packages/egg/test/app/extend/context.jsonp.test.ts b/packages/egg/test/app/extend/context.jsonp.test.ts index 5969b97b01..84a9373d1b 100644 --- a/packages/egg/test/app/extend/context.jsonp.test.ts +++ b/packages/egg/test/app/extend/context.jsonp.test.ts @@ -1,4 +1,4 @@ -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, type MockApplication } from '../../utils.js'; diff --git a/packages/egg/test/app/extend/context.test.ts b/packages/egg/test/app/extend/context.test.ts index a70b5c842a..2043dc7a6b 100644 --- a/packages/egg/test/app/extend/context.test.ts +++ b/packages/egg/test/app/extend/context.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs'; import path from 'node:path'; import { scheduler } from 'node:timers/promises'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { createApp, diff --git a/packages/egg/test/app/extend/helper.test.ts b/packages/egg/test/app/extend/helper.test.ts index 35bf298212..3423125d95 100644 --- a/packages/egg/test/app/extend/helper.test.ts +++ b/packages/egg/test/app/extend/helper.test.ts @@ -1,4 +1,4 @@ -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, type MockApplication } from '../../utils.ts'; diff --git a/packages/egg/test/app/extend/request.test.ts b/packages/egg/test/app/extend/request.test.ts index e38255514e..c75bf266f6 100644 --- a/packages/egg/test/app/extend/request.test.ts +++ b/packages/egg/test/app/extend/request.test.ts @@ -3,7 +3,7 @@ import { once } from 'node:events'; import type { AddressInfo } from 'node:net'; import urllib from 'urllib'; -import { describe, it, beforeAll, afterAll, afterEach, beforeEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach, beforeEach } from 'vite-plus/test'; import { createApp, type MockApplication, restore, mm } from '../../utils.ts'; diff --git a/packages/egg/test/app/extend/response.test.ts b/packages/egg/test/app/extend/response.test.ts index 5cc1602b7b..1c747f9897 100644 --- a/packages/egg/test/app/extend/response.test.ts +++ b/packages/egg/test/app/extend/response.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { restore, type MockApplication, createApp } from '../../utils.js'; diff --git a/packages/egg/test/app/middleware/body_parser.test.ts b/packages/egg/test/app/middleware/body_parser.test.ts index 8558fd10ca..c920f088d6 100644 --- a/packages/egg/test/app/middleware/body_parser.test.ts +++ b/packages/egg/test/app/middleware/body_parser.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import querystring from 'node:querystring'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { createApp, type MockApplication } from '../../utils.ts'; diff --git a/packages/egg/test/app/middleware/meta.test.ts b/packages/egg/test/app/middleware/meta.test.ts index e2134cb393..12c17e8635 100644 --- a/packages/egg/test/app/middleware/meta.test.ts +++ b/packages/egg/test/app/middleware/meta.test.ts @@ -2,7 +2,7 @@ import { strict as assert } from 'node:assert'; import fs from 'node:fs/promises'; import { scheduler } from 'node:timers/promises'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { createApp, type MockApplication, restore, cluster } from '../../utils.js'; diff --git a/packages/egg/test/app/middleware/notfound.test.ts b/packages/egg/test/app/middleware/notfound.test.ts index 3709225bd3..8caa13ce83 100644 --- a/packages/egg/test/app/middleware/notfound.test.ts +++ b/packages/egg/test/app/middleware/notfound.test.ts @@ -1,4 +1,4 @@ -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { createApp, type MockApplication, restore, mm } from '../../utils.ts'; diff --git a/packages/egg/test/app/middleware/override_method.test.ts b/packages/egg/test/app/middleware/override_method.test.ts index 4b39fbd053..fe3b00275d 100644 --- a/packages/egg/test/app/middleware/override_method.test.ts +++ b/packages/egg/test/app/middleware/override_method.test.ts @@ -1,4 +1,4 @@ -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, type MockApplication } from '../../utils.js'; diff --git a/packages/egg/test/app/middleware/site_file.test.ts b/packages/egg/test/app/middleware/site_file.test.ts index 6773afeb37..ccc320d511 100644 --- a/packages/egg/test/app/middleware/site_file.test.ts +++ b/packages/egg/test/app/middleware/site_file.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, type MockApplication } from '../../utils.ts'; diff --git a/packages/egg/test/application.test.ts b/packages/egg/test/application.test.ts index 07ecabc347..13915ca1cf 100644 --- a/packages/egg/test/application.test.ts +++ b/packages/egg/test/application.test.ts @@ -5,7 +5,7 @@ import path from 'node:path'; import { scheduler } from 'node:timers/promises'; import { mm } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { Application } from '../src/index.ts'; import { type MockApplication, cluster, createApp, getFilepath, startLocalServer } from './utils.ts'; diff --git a/packages/egg/test/asyncSupport.test.ts b/packages/egg/test/asyncSupport.test.ts index 31f77d0ca5..74561d5309 100644 --- a/packages/egg/test/asyncSupport.test.ts +++ b/packages/egg/test/asyncSupport.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { createApp, restore, type MockApplication } from './utils.ts'; diff --git a/packages/egg/test/cluster1/app_worker.test.ts b/packages/egg/test/cluster1/app_worker.test.ts index f48f9f15b9..53cea291a1 100644 --- a/packages/egg/test/cluster1/app_worker.test.ts +++ b/packages/egg/test/cluster1/app_worker.test.ts @@ -4,7 +4,7 @@ import { scheduler } from 'node:timers/promises'; import { request } from '@eggjs/supertest'; import { ip } from 'address'; -import { describe, it, beforeAll, afterAll, afterEach, beforeEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach, beforeEach } from 'vite-plus/test'; import { cluster, type MockApplication } from '../utils.ts'; diff --git a/packages/egg/test/cluster1/cluster-client-error.test.ts b/packages/egg/test/cluster1/cluster-client-error.test.ts index 8d4108b38d..346193ddf9 100644 --- a/packages/egg/test/cluster1/cluster-client-error.test.ts +++ b/packages/egg/test/cluster1/cluster-client-error.test.ts @@ -2,7 +2,7 @@ import { strict as assert } from 'node:assert'; import { readFile } from 'node:fs/promises'; import { scheduler } from 'node:timers/promises'; -import { describe, it, beforeAll } from 'vitest'; +import { describe, it, beforeAll } from 'vite-plus/test'; import { type MockApplication, createApp, getFilepath } from '../utils.ts'; diff --git a/packages/egg/test/cluster1/cluster-client.test.ts b/packages/egg/test/cluster1/cluster-client.test.ts index 83a349a233..2caeb59215 100644 --- a/packages/egg/test/cluster1/cluster-client.test.ts +++ b/packages/egg/test/cluster1/cluster-client.test.ts @@ -2,7 +2,7 @@ import { strict as assert } from 'node:assert'; import { scheduler } from 'node:timers/promises'; import { mm } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { type MockApplication, createApp, singleProcessApp } from '../utils.ts'; diff --git a/packages/egg/test/cluster1/master.test.ts b/packages/egg/test/cluster1/master.test.ts index 7ca5cdad20..ac31ee2336 100644 --- a/packages/egg/test/cluster1/master.test.ts +++ b/packages/egg/test/cluster1/master.test.ts @@ -2,7 +2,7 @@ import { scheduler } from 'node:timers/promises'; import { mm } from '@eggjs/mock'; import coffee, { Coffee } from 'coffee'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { type MockApplication, cluster, getFilepath } from '../utils.ts'; diff --git a/packages/egg/test/cluster2/master.test.ts b/packages/egg/test/cluster2/master.test.ts index 945f297e8b..8d9160813c 100644 --- a/packages/egg/test/cluster2/master.test.ts +++ b/packages/egg/test/cluster2/master.test.ts @@ -1,7 +1,7 @@ import { scheduler } from 'node:timers/promises'; import { mm } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { type MockApplication, cluster } from '../utils.js'; diff --git a/packages/egg/test/egg.test.ts b/packages/egg/test/egg.test.ts index 9d4f7ecda2..2cb973b705 100644 --- a/packages/egg/test/egg.test.ts +++ b/packages/egg/test/egg.test.ts @@ -6,7 +6,7 @@ import { scheduler } from 'node:timers/promises'; import { mm } from '@eggjs/mock'; import assertFile from 'assert-file'; import { readJSONSync } from 'utility'; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, beforeEach, afterEach } from 'vite-plus/test'; import { createApp, cluster, getFilepath, type MockApplication } from './utils.ts'; diff --git a/packages/egg/test/index.test.ts b/packages/egg/test/index.test.ts index 2facc210ca..9d3a73f214 100644 --- a/packages/egg/test/index.test.ts +++ b/packages/egg/test/index.test.ts @@ -1,4 +1,4 @@ -import { test, expect } from 'vitest'; +import { test, expect } from 'vite-plus/test'; import * as egg from '../src/index.ts'; diff --git a/packages/egg/test/lib/core/config/config.cookies.test.ts b/packages/egg/test/lib/core/config/config.cookies.test.ts index 8a587eb462..d312c8c48a 100644 --- a/packages/egg/test/lib/core/config/config.cookies.test.ts +++ b/packages/egg/test/lib/core/config/config.cookies.test.ts @@ -1,4 +1,4 @@ -import { test, beforeAll, afterAll, expect } from 'vitest'; +import { test, beforeAll, afterAll, expect } from 'vite-plus/test'; import { type MockApplication, createApp } from '../../../utils.ts'; diff --git a/packages/egg/test/lib/core/config/config.test.ts b/packages/egg/test/lib/core/config/config.test.ts index bc5fb7663b..bb809394bc 100644 --- a/packages/egg/test/lib/core/config/config.test.ts +++ b/packages/egg/test/lib/core/config/config.test.ts @@ -1,4 +1,4 @@ -import { test, beforeAll, afterAll, expect } from 'vitest'; +import { test, beforeAll, afterAll, expect } from 'vite-plus/test'; import { type MockApplication, createApp } from '../../../utils.ts'; diff --git a/packages/egg/test/lib/core/context_httpclient.test.ts b/packages/egg/test/lib/core/context_httpclient.test.ts index 0a1a90bd2c..44ef3d8b73 100644 --- a/packages/egg/test/lib/core/context_httpclient.test.ts +++ b/packages/egg/test/lib/core/context_httpclient.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { test, beforeAll, afterAll } from 'vitest'; +import { test, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, startLocalServer, type MockApplication } from '../../utils.ts'; diff --git a/packages/egg/test/lib/core/context_performance_starttime.test.ts b/packages/egg/test/lib/core/context_performance_starttime.test.ts index cdfdd77146..0077770cac 100644 --- a/packages/egg/test/lib/core/context_performance_starttime.test.ts +++ b/packages/egg/test/lib/core/context_performance_starttime.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll } from 'vitest'; +import { describe, it, beforeAll } from 'vite-plus/test'; import { createApp, type MockApplication } from '../../utils.js'; diff --git a/packages/egg/test/lib/core/cookies.test.ts b/packages/egg/test/lib/core/cookies.test.ts index 6e68c2cc90..0fbde273f0 100644 --- a/packages/egg/test/lib/core/cookies.test.ts +++ b/packages/egg/test/lib/core/cookies.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs'; import path from 'node:path'; import { mm } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { createApp, type MockApplication, getFilepath } from '../../utils.ts'; diff --git a/packages/egg/test/lib/core/custom_loader.test.ts b/packages/egg/test/lib/core/custom_loader.test.ts index 5801fc14ca..2ad148f5fb 100644 --- a/packages/egg/test/lib/core/custom_loader.test.ts +++ b/packages/egg/test/lib/core/custom_loader.test.ts @@ -1,5 +1,5 @@ import { mm } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { createApp, type MockApplication } from '../../utils.ts'; diff --git a/packages/egg/test/lib/core/dnscache_httpclient.test.ts b/packages/egg/test/lib/core/dnscache_httpclient.test.ts index e07766424f..6c3a11533b 100644 --- a/packages/egg/test/lib/core/dnscache_httpclient.test.ts +++ b/packages/egg/test/lib/core/dnscache_httpclient.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import http from 'node:http'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, type MockApplication, startNewLocalServer } from '../../utils.js'; diff --git a/packages/egg/test/lib/core/httpclient.test.ts b/packages/egg/test/lib/core/httpclient.test.ts index 541f9f1833..6f913d89d0 100644 --- a/packages/egg/test/lib/core/httpclient.test.ts +++ b/packages/egg/test/lib/core/httpclient.test.ts @@ -2,7 +2,7 @@ import { strict as assert } from 'node:assert'; import { mm } from '@eggjs/mock'; import { HttpClient } from 'urllib'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { HttpClient as ContextHttpClient } from '../../../src/lib/core/httpclient.ts'; import { startLocalServer, createApp, type MockApplication } from '../../utils.ts'; diff --git a/packages/egg/test/lib/core/httpclient_tracer_demo.test.ts b/packages/egg/test/lib/core/httpclient_tracer_demo.test.ts index e790c7bcff..88c9642b56 100644 --- a/packages/egg/test/lib/core/httpclient_tracer_demo.test.ts +++ b/packages/egg/test/lib/core/httpclient_tracer_demo.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { scheduler } from 'node:timers/promises'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, startLocalServer, type MockApplication } from '../../utils.js'; diff --git a/packages/egg/test/lib/core/loader/config_loader.test.ts b/packages/egg/test/lib/core/loader/config_loader.test.ts index 80025f8391..3034e55381 100644 --- a/packages/egg/test/lib/core/loader/config_loader.test.ts +++ b/packages/egg/test/lib/core/loader/config_loader.test.ts @@ -2,7 +2,7 @@ import { strict as assert } from 'node:assert'; import path from 'node:path'; import { mm } from '@eggjs/mock'; -import { describe, it, afterEach, expect } from 'vitest'; +import { describe, it, afterEach, expect } from 'vite-plus/test'; import { type MockApplication, createApp, getFilepath } from '../../../utils.ts'; diff --git a/packages/egg/test/lib/core/loader/load_app.test.ts b/packages/egg/test/lib/core/loader/load_app.test.ts index 1e8b8dec27..c16b3fbb0c 100644 --- a/packages/egg/test/lib/core/loader/load_app.test.ts +++ b/packages/egg/test/lib/core/loader/load_app.test.ts @@ -1,4 +1,4 @@ -import { describe, it, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, expect } from 'vite-plus/test'; import { type MockApplication, createApp } from '../../../utils.ts'; diff --git a/packages/egg/test/lib/core/loader/load_boot.test.ts b/packages/egg/test/lib/core/loader/load_boot.test.ts index f1806716a9..541abf8b71 100644 --- a/packages/egg/test/lib/core/loader/load_boot.test.ts +++ b/packages/egg/test/lib/core/loader/load_boot.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs/promises'; import path from 'node:path'; import { scheduler } from 'node:timers/promises'; -import { describe, it, beforeAll } from 'vitest'; +import { describe, it, beforeAll } from 'vite-plus/test'; import { type MockApplication, createApp } from '../../../utils.ts'; diff --git a/packages/egg/test/lib/core/loader/load_plugin.test.ts b/packages/egg/test/lib/core/loader/load_plugin.test.ts index 843a2ea03d..9b49e39cb2 100644 --- a/packages/egg/test/lib/core/loader/load_plugin.test.ts +++ b/packages/egg/test/lib/core/loader/load_plugin.test.ts @@ -3,7 +3,7 @@ import path from 'node:path'; import { mm } from '@eggjs/mock'; import { EggConsoleLogger } from 'egg-logger'; -import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vite-plus/test'; import { AppWorkerLoader, AgentWorkerLoader } from '../../../../src/index.ts'; import { type MockApplication, createApp, getFilepath } from '../../../utils.ts'; diff --git a/packages/egg/test/lib/core/loader/load_router.test.ts b/packages/egg/test/lib/core/loader/load_router.test.ts index 3dc263229d..5ae6109e9f 100644 --- a/packages/egg/test/lib/core/loader/load_router.test.ts +++ b/packages/egg/test/lib/core/loader/load_router.test.ts @@ -1,4 +1,4 @@ -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, type MockApplication } from '../../../utils.js'; diff --git a/packages/egg/test/lib/core/loader/load_service.test.ts b/packages/egg/test/lib/core/loader/load_service.test.ts index 2686c984ac..94bdc7baa8 100644 --- a/packages/egg/test/lib/core/loader/load_service.test.ts +++ b/packages/egg/test/lib/core/loader/load_service.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { mm } from '@eggjs/mock'; -import { describe, afterEach, it } from 'vitest'; +import { describe, afterEach, it } from 'vite-plus/test'; import { type MockApplication, createApp } from '../../../utils.ts'; diff --git a/packages/egg/test/lib/core/logger.test.ts b/packages/egg/test/lib/core/logger.test.ts index 255d53d54b..67686aac7a 100644 --- a/packages/egg/test/lib/core/logger.test.ts +++ b/packages/egg/test/lib/core/logger.test.ts @@ -5,7 +5,7 @@ import { scheduler } from 'node:timers/promises'; import { mm } from '@eggjs/mock'; import { levels } from 'egg-logger'; -import { describe, it, afterEach, beforeAll, afterAll } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll } from 'vite-plus/test'; import { type MockApplication, createApp, cluster, getFilepath } from '../../utils.ts'; diff --git a/packages/egg/test/lib/core/messenger/ipc.test.ts b/packages/egg/test/lib/core/messenger/ipc.test.ts index a57bc7709a..223a4049e1 100644 --- a/packages/egg/test/lib/core/messenger/ipc.test.ts +++ b/packages/egg/test/lib/core/messenger/ipc.test.ts @@ -3,7 +3,7 @@ import { once } from 'node:events'; import { scheduler } from 'node:timers/promises'; import { mm } from '@eggjs/mock'; -import { describe, it, beforeAll, afterEach, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterEach, afterAll } from 'vite-plus/test'; import { Messenger } from '../../../../src/lib/core/messenger/ipc.ts'; import { cluster, type MockApplication } from '../../../utils.ts'; diff --git a/packages/egg/test/lib/core/messenger/local.test.ts b/packages/egg/test/lib/core/messenger/local.test.ts index 8a40013740..a1aeb0e13a 100644 --- a/packages/egg/test/lib/core/messenger/local.test.ts +++ b/packages/egg/test/lib/core/messenger/local.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { mm } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { singleProcessApp, type SingleModeApplication } from '../../../utils.ts'; diff --git a/packages/egg/test/lib/core/router.test.ts b/packages/egg/test/lib/core/router.test.ts index f18c1b7ad5..f8925fb508 100644 --- a/packages/egg/test/lib/core/router.test.ts +++ b/packages/egg/test/lib/core/router.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { mm } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { type MockApplication, createApp, getFilepath } from '../../utils.ts'; diff --git a/packages/egg/test/lib/core/utils.test.ts b/packages/egg/test/lib/core/utils.test.ts index 62ae0faf58..b64f744e9d 100644 --- a/packages/egg/test/lib/core/utils.test.ts +++ b/packages/egg/test/lib/core/utils.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import * as utils from '../../../src/lib/core/utils.ts'; diff --git a/packages/egg/test/lib/core/view.test.ts b/packages/egg/test/lib/core/view.test.ts index d03253c4c7..f91d9f4615 100644 --- a/packages/egg/test/lib/core/view.test.ts +++ b/packages/egg/test/lib/core/view.test.ts @@ -2,7 +2,7 @@ import { strict as assert } from 'node:assert'; import path from 'node:path'; import { ViewEngineBase } from '@eggjs/view'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { type MockApplication, createApp, getFilepath } from '../../utils.ts'; diff --git a/packages/egg/test/lib/define_config.test.ts b/packages/egg/test/lib/define_config.test.ts index 4530cffa9e..fb73263a44 100644 --- a/packages/egg/test/lib/define_config.test.ts +++ b/packages/egg/test/lib/define_config.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import { defineConfig, defineConfigFactory, type EggAppInfo, type PartialEggConfig } from '../../src/index.ts'; diff --git a/packages/egg/test/lib/plugins/depd.test.ts b/packages/egg/test/lib/plugins/depd.test.ts index e3cbe2cbea..ad1f5c033d 100644 --- a/packages/egg/test/lib/plugins/depd.test.ts +++ b/packages/egg/test/lib/plugins/depd.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { mm } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { type MockApplication, createApp } from '../../utils.ts'; diff --git a/packages/egg/test/lib/plugins/development.test.ts b/packages/egg/test/lib/plugins/development.test.ts index f94d84edba..1a8e4b9dd4 100644 --- a/packages/egg/test/lib/plugins/development.test.ts +++ b/packages/egg/test/lib/plugins/development.test.ts @@ -2,7 +2,7 @@ import fs from 'node:fs'; import path from 'node:path'; import { mm } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { type MockApplication, createApp, cluster, getFilepath } from '../../utils.ts'; diff --git a/packages/egg/test/lib/plugins/i18n.test.ts b/packages/egg/test/lib/plugins/i18n.test.ts index 3e0d4592e2..b898ad715e 100644 --- a/packages/egg/test/lib/plugins/i18n.test.ts +++ b/packages/egg/test/lib/plugins/i18n.test.ts @@ -1,4 +1,4 @@ -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { type MockApplication, createApp } from '../../utils.ts'; diff --git a/packages/egg/test/lib/plugins/multipart.test.ts b/packages/egg/test/lib/plugins/multipart.test.ts index 3bcbca78b0..892cf96683 100644 --- a/packages/egg/test/lib/plugins/multipart.test.ts +++ b/packages/egg/test/lib/plugins/multipart.test.ts @@ -3,7 +3,7 @@ import { strict as assert } from 'node:assert'; import { request } from '@eggjs/supertest'; import formstream from 'formstream'; import urllib from 'urllib'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { createApp, type MockApplication, getFilepath } from '../../utils.ts'; diff --git a/packages/egg/test/lib/plugins/onerror.test.ts b/packages/egg/test/lib/plugins/onerror.test.ts index 05bb31baea..af3213a4f1 100644 --- a/packages/egg/test/lib/plugins/onerror.test.ts +++ b/packages/egg/test/lib/plugins/onerror.test.ts @@ -1,5 +1,5 @@ import { mm } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { createApp, type MockApplication } from '../../utils.ts'; diff --git a/packages/egg/test/lib/plugins/security.test.ts b/packages/egg/test/lib/plugins/security.test.ts index c1f75b0d5f..d0fd08a3d9 100644 --- a/packages/egg/test/lib/plugins/security.test.ts +++ b/packages/egg/test/lib/plugins/security.test.ts @@ -1,5 +1,5 @@ import { mm } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { createApp, type MockApplication } from '../../utils.js'; diff --git a/packages/egg/test/lib/plugins/session.test.ts b/packages/egg/test/lib/plugins/session.test.ts index 2597986f6f..2bb825cf87 100644 --- a/packages/egg/test/lib/plugins/session.test.ts +++ b/packages/egg/test/lib/plugins/session.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { mm } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import { createApp, type MockApplication } from '../../utils.ts'; diff --git a/packages/egg/test/lib/plugins/static.test.ts b/packages/egg/test/lib/plugins/static.test.ts index 92a58d23d5..90e5c494fe 100644 --- a/packages/egg/test/lib/plugins/static.test.ts +++ b/packages/egg/test/lib/plugins/static.test.ts @@ -1,4 +1,4 @@ -import { describe, it, beforeAll } from 'vitest'; +import { describe, it, beforeAll } from 'vite-plus/test'; import { createApp, type MockApplication } from '../../utils.js'; diff --git a/packages/egg/test/lib/plugins/watcher.test.ts b/packages/egg/test/lib/plugins/watcher.test.ts index cac6c5e40f..e7de3255ce 100644 --- a/packages/egg/test/lib/plugins/watcher.test.ts +++ b/packages/egg/test/lib/plugins/watcher.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs'; import { scheduler } from 'node:timers/promises'; import { mm } from '@eggjs/mock'; -import { describe, it, beforeEach, afterEach, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeEach, afterEach, beforeAll, afterAll } from 'vite-plus/test'; import { cluster, type MockApplication, getFilepath } from '../../utils.ts'; diff --git a/packages/egg/test/start.test.ts b/packages/egg/test/start.test.ts index fc9352bf66..eb0313bfc1 100644 --- a/packages/egg/test/start.test.ts +++ b/packages/egg/test/start.test.ts @@ -1,4 +1,4 @@ -import { describe } from 'vitest'; +import { describe } from 'vite-plus/test'; // import utils from '../utils'; // import assert from 'assert'; diff --git a/packages/egg/test/typescript.test.ts b/packages/egg/test/typescript.test.ts index c8b33c15e6..fa283632ce 100644 --- a/packages/egg/test/typescript.test.ts +++ b/packages/egg/test/typescript.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { type MockApplication, createApp } from './utils.ts'; diff --git a/packages/egg/test/urllib.test.ts b/packages/egg/test/urllib.test.ts index 66ccd78881..9aee5697ac 100644 --- a/packages/egg/test/urllib.test.ts +++ b/packages/egg/test/urllib.test.ts @@ -1,4 +1,4 @@ -import { test, expect } from 'vitest'; +import { test, expect } from 'vite-plus/test'; import * as urllib from '../src/urllib.ts'; diff --git a/packages/egg/tsdown.config.ts b/packages/egg/tsdown.config.ts index 97a9adebc0..3c963f6eed 100644 --- a/packages/egg/tsdown.config.ts +++ b/packages/egg/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ copy: [ diff --git a/packages/egg/vite.config.ts b/packages/egg/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/packages/egg/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/packages/egg/vitest.config.ts b/packages/egg/vitest.config.ts index 2beb22f404..41e9d64df4 100644 --- a/packages/egg/vitest.config.ts +++ b/packages/egg/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject, type UserWorkspaceConfig } from 'vitest/config'; +import { defineProject, type UserWorkspaceConfig } from 'vite-plus'; const config: UserWorkspaceConfig = defineProject({ test: { diff --git a/packages/errors/test/error.test.ts b/packages/errors/test/error.test.ts index 1f0f0fff9c..2e0b4cf682 100644 --- a/packages/errors/test/error.test.ts +++ b/packages/errors/test/error.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import { EggBaseError, diff --git a/packages/errors/test/framework/formatter.test.ts b/packages/errors/test/framework/formatter.test.ts index a43b83d304..a527444e4e 100644 --- a/packages/errors/test/framework/formatter.test.ts +++ b/packages/errors/test/framework/formatter.test.ts @@ -1,6 +1,6 @@ import * as os from 'os'; -import { describe, it, afterEach, expect, vi } from 'vitest'; +import { describe, it, afterEach, expect, vi } from 'vite-plus/test'; import { FrameworkErrorFormatter, FrameworkBaseError } from '../../src/index.ts'; diff --git a/packages/errors/test/framework/framework_base_error.test.ts b/packages/errors/test/framework/framework_base_error.test.ts index a4f500b69c..22692eea9d 100644 --- a/packages/errors/test/framework/framework_base_error.test.ts +++ b/packages/errors/test/framework/framework_base_error.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import { FrameworkBaseError } from '../../src/index.ts'; diff --git a/packages/errors/test/http/400.test.ts b/packages/errors/test/http/400.test.ts index 579e1ae244..ca1ea561a1 100644 --- a/packages/errors/test/http/400.test.ts +++ b/packages/errors/test/http/400.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { BadRequestError, E400 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/401.test.ts b/packages/errors/test/http/401.test.ts index 97cb40ebb6..95b2ff9fc9 100644 --- a/packages/errors/test/http/401.test.ts +++ b/packages/errors/test/http/401.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { UnauthorizedError, E401 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/402.test.ts b/packages/errors/test/http/402.test.ts index 5ab5a77a47..814a4b4a12 100644 --- a/packages/errors/test/http/402.test.ts +++ b/packages/errors/test/http/402.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { PaymentRequiredError, E402 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/403.test.ts b/packages/errors/test/http/403.test.ts index 3407f20991..3b82748754 100644 --- a/packages/errors/test/http/403.test.ts +++ b/packages/errors/test/http/403.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { ForbiddenError, E403 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/404.test.ts b/packages/errors/test/http/404.test.ts index 725d62d46d..fcc508ecc5 100644 --- a/packages/errors/test/http/404.test.ts +++ b/packages/errors/test/http/404.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { NotFoundError, E404 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/405.test.ts b/packages/errors/test/http/405.test.ts index 2989215727..2c186f57ba 100644 --- a/packages/errors/test/http/405.test.ts +++ b/packages/errors/test/http/405.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { MethodNotAllowedError, E405 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/406.test.ts b/packages/errors/test/http/406.test.ts index b2ef79a818..e3cb284b0c 100644 --- a/packages/errors/test/http/406.test.ts +++ b/packages/errors/test/http/406.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { NotAcceptableError, E406 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/407.test.ts b/packages/errors/test/http/407.test.ts index 4fc456237b..1714e7f73f 100644 --- a/packages/errors/test/http/407.test.ts +++ b/packages/errors/test/http/407.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { ProxyAuthenticationRequiredError, E407 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/408.test.ts b/packages/errors/test/http/408.test.ts index cac524c1bb..f1b7d42422 100644 --- a/packages/errors/test/http/408.test.ts +++ b/packages/errors/test/http/408.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { RequestTimeoutError, E408 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/409.test.ts b/packages/errors/test/http/409.test.ts index 9c8003b115..2132f07b44 100644 --- a/packages/errors/test/http/409.test.ts +++ b/packages/errors/test/http/409.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { ConflictError, E409 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/410.test.ts b/packages/errors/test/http/410.test.ts index 1af4d1a5c3..8509af03de 100644 --- a/packages/errors/test/http/410.test.ts +++ b/packages/errors/test/http/410.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { GoneError, E410 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/411.test.ts b/packages/errors/test/http/411.test.ts index 994f40e22a..ff67ae890c 100644 --- a/packages/errors/test/http/411.test.ts +++ b/packages/errors/test/http/411.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { LengthRequiredError, E411 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/412.test.ts b/packages/errors/test/http/412.test.ts index 30038d8517..89c9d2a538 100644 --- a/packages/errors/test/http/412.test.ts +++ b/packages/errors/test/http/412.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { PreconditionFailedError, E412 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/413.test.ts b/packages/errors/test/http/413.test.ts index 735d631241..d05b066af0 100644 --- a/packages/errors/test/http/413.test.ts +++ b/packages/errors/test/http/413.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { PayloadTooLargeError, E413 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/414.test.ts b/packages/errors/test/http/414.test.ts index 270e8fe048..40f9885759 100644 --- a/packages/errors/test/http/414.test.ts +++ b/packages/errors/test/http/414.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { URITooLongError, E414 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/415.test.ts b/packages/errors/test/http/415.test.ts index 0a4aa03dd8..d220394b9a 100644 --- a/packages/errors/test/http/415.test.ts +++ b/packages/errors/test/http/415.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { UnsupportedMediaTypeError, E415 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/416.test.ts b/packages/errors/test/http/416.test.ts index f48ad6ad00..d081b08178 100644 --- a/packages/errors/test/http/416.test.ts +++ b/packages/errors/test/http/416.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { RangeNotSatisfiableError, E416 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/417.test.ts b/packages/errors/test/http/417.test.ts index 2e6ab05e19..9c99da2799 100644 --- a/packages/errors/test/http/417.test.ts +++ b/packages/errors/test/http/417.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { ExpectationFailedError, E417 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/418.test.ts b/packages/errors/test/http/418.test.ts index 1fc312607d..07a8e8e5be 100644 --- a/packages/errors/test/http/418.test.ts +++ b/packages/errors/test/http/418.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { ImATeapotError, E418 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/421.test.ts b/packages/errors/test/http/421.test.ts index f833b1ea34..ebecfdff41 100644 --- a/packages/errors/test/http/421.test.ts +++ b/packages/errors/test/http/421.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { MisdirectedRequestError, E421 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/422.test.ts b/packages/errors/test/http/422.test.ts index 370fcaf077..27bd22e22e 100644 --- a/packages/errors/test/http/422.test.ts +++ b/packages/errors/test/http/422.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { UnprocessableEntityError, E422 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/423.test.ts b/packages/errors/test/http/423.test.ts index 239312ddcf..885c02d1e5 100644 --- a/packages/errors/test/http/423.test.ts +++ b/packages/errors/test/http/423.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { LockedError, E423 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/424.test.ts b/packages/errors/test/http/424.test.ts index 2dc29aac16..47c6456984 100644 --- a/packages/errors/test/http/424.test.ts +++ b/packages/errors/test/http/424.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { FailedDependencyError, E424 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/425.test.ts b/packages/errors/test/http/425.test.ts index a3e87bafef..553727083a 100644 --- a/packages/errors/test/http/425.test.ts +++ b/packages/errors/test/http/425.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { UnorderedCollectionError, E425 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/426.test.ts b/packages/errors/test/http/426.test.ts index 507fb0d2fe..255416f14f 100644 --- a/packages/errors/test/http/426.test.ts +++ b/packages/errors/test/http/426.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { UpgradeRequiredError, E426 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/428.test.ts b/packages/errors/test/http/428.test.ts index cc76936977..cd75786ff4 100644 --- a/packages/errors/test/http/428.test.ts +++ b/packages/errors/test/http/428.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { PreconditionRequiredError, E428 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/429.test.ts b/packages/errors/test/http/429.test.ts index 646c78bac3..52f59123d8 100644 --- a/packages/errors/test/http/429.test.ts +++ b/packages/errors/test/http/429.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { TooManyRequestsError, E429 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/431.test.ts b/packages/errors/test/http/431.test.ts index 01916f434a..624ca96978 100644 --- a/packages/errors/test/http/431.test.ts +++ b/packages/errors/test/http/431.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { RequestHeaderFieldsTooLargeError, E431 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/451.test.ts b/packages/errors/test/http/451.test.ts index f5f4d3f75a..265bbfee22 100644 --- a/packages/errors/test/http/451.test.ts +++ b/packages/errors/test/http/451.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { UnavailableForLegalReasonsError, E451 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/500.test.ts b/packages/errors/test/http/500.test.ts index c5891e3fa4..b0a43849b1 100644 --- a/packages/errors/test/http/500.test.ts +++ b/packages/errors/test/http/500.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { InternalServerError, E500 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/501.test.ts b/packages/errors/test/http/501.test.ts index 7e5ec7755c..e5c3d6789b 100644 --- a/packages/errors/test/http/501.test.ts +++ b/packages/errors/test/http/501.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { NotImplementedError, E501 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/502.test.ts b/packages/errors/test/http/502.test.ts index 0c1a0a04ce..daabd5108b 100644 --- a/packages/errors/test/http/502.test.ts +++ b/packages/errors/test/http/502.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { BadGatewayError, E502 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/503.test.ts b/packages/errors/test/http/503.test.ts index f6c6199688..6daa3d50de 100644 --- a/packages/errors/test/http/503.test.ts +++ b/packages/errors/test/http/503.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { ServiceUnavailableError, E503 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/504.test.ts b/packages/errors/test/http/504.test.ts index 02577aae01..610062522b 100644 --- a/packages/errors/test/http/504.test.ts +++ b/packages/errors/test/http/504.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { GatewayTimeoutError, E504 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/505.test.ts b/packages/errors/test/http/505.test.ts index 07d27ad550..3c73394db7 100644 --- a/packages/errors/test/http/505.test.ts +++ b/packages/errors/test/http/505.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { HTTPVersionNotSupportedError, E505 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/506.test.ts b/packages/errors/test/http/506.test.ts index e49923dde8..028d4f232d 100644 --- a/packages/errors/test/http/506.test.ts +++ b/packages/errors/test/http/506.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { VariantAlsoNegotiatesError, E506 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/507.test.ts b/packages/errors/test/http/507.test.ts index 2026382c80..4ea9260910 100644 --- a/packages/errors/test/http/507.test.ts +++ b/packages/errors/test/http/507.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { InsufficientStorageError, E507 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/508.test.ts b/packages/errors/test/http/508.test.ts index 8d196119a5..636a23232f 100644 --- a/packages/errors/test/http/508.test.ts +++ b/packages/errors/test/http/508.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { LoopDetectedError, E508 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/509.test.ts b/packages/errors/test/http/509.test.ts index 340bd3680d..591c7229fd 100644 --- a/packages/errors/test/http/509.test.ts +++ b/packages/errors/test/http/509.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { BandwidthLimitExceededError, E509 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/510.test.ts b/packages/errors/test/http/510.test.ts index 8e9a3bd911..18b7362b85 100644 --- a/packages/errors/test/http/510.test.ts +++ b/packages/errors/test/http/510.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { NotExtendedError, E510 } from '../../src/index.ts'; diff --git a/packages/errors/test/http/511.test.ts b/packages/errors/test/http/511.test.ts index dd575bde29..138a3fdeb9 100644 --- a/packages/errors/test/http/511.test.ts +++ b/packages/errors/test/http/511.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { NetworkAuthenticationRequiredError, E511 } from '../../src/index.ts'; diff --git a/packages/errors/test/index.test.ts b/packages/errors/test/index.test.ts index 7b9366047c..271ca2cb69 100644 --- a/packages/errors/test/index.test.ts +++ b/packages/errors/test/index.test.ts @@ -1,4 +1,4 @@ -import { test, expect } from 'vitest'; +import { test, expect } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/packages/errors/tsdown.config.ts b/packages/errors/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/packages/errors/tsdown.config.ts +++ b/packages/errors/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/packages/errors/vite.config.ts b/packages/errors/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/packages/errors/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/packages/extend2/test/index.test.ts b/packages/extend2/test/index.test.ts index 58d3bbd70f..ad0185954f 100644 --- a/packages/extend2/test/index.test.ts +++ b/packages/extend2/test/index.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import extend from '../src/index.js'; diff --git a/packages/extend2/tsdown.config.ts b/packages/extend2/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/packages/extend2/tsdown.config.ts +++ b/packages/extend2/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/packages/extend2/vite.config.ts b/packages/extend2/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/packages/extend2/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/packages/koa-static-cache/test/index.test.ts b/packages/koa-static-cache/test/index.test.ts index 0ef2eb12e8..bc9de8a053 100644 --- a/packages/koa-static-cache/test/index.test.ts +++ b/packages/koa-static-cache/test/index.test.ts @@ -7,7 +7,7 @@ import { scheduler } from 'node:timers/promises'; import { Application as Koa } from '@eggjs/koa'; import { request } from '@eggjs/supertest'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { LRU } from 'ylru'; import { staticCache } from '../src/index.ts'; diff --git a/packages/koa-static-cache/tsdown.config.ts b/packages/koa-static-cache/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/packages/koa-static-cache/tsdown.config.ts +++ b/packages/koa-static-cache/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/packages/koa-static-cache/vite.config.ts b/packages/koa-static-cache/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/packages/koa-static-cache/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/packages/koa/test/application/context.test.ts b/packages/koa/test/application/context.test.ts index a4ec32729b..274dcee550 100644 --- a/packages/koa/test/application/context.test.ts +++ b/packages/koa/test/application/context.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { Application, Context } from '../../src/index.ts'; diff --git a/packages/koa/test/application/currentContext.test.ts b/packages/koa/test/application/currentContext.test.ts index db421d990d..41ee482d2d 100644 --- a/packages/koa/test/application/currentContext.test.ts +++ b/packages/koa/test/application/currentContext.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa from '../../src/index.ts'; diff --git a/packages/koa/test/application/index.test.ts b/packages/koa/test/application/index.test.ts index 05bd3ed030..2562aac219 100644 --- a/packages/koa/test/application/index.test.ts +++ b/packages/koa/test/application/index.test.ts @@ -4,7 +4,7 @@ import type { ServerResponse, IncomingMessage } from 'node:http'; import { request } from '@eggjs/supertest'; import createHttpError, { HttpError } from 'http-errors'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa from '../../src/index.ts'; diff --git a/packages/koa/test/application/inspect.test.ts b/packages/koa/test/application/inspect.test.ts index c8b1b77edb..ae5ab1ca31 100644 --- a/packages/koa/test/application/inspect.test.ts +++ b/packages/koa/test/application/inspect.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import util from 'node:util'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa from '../../src/index.ts'; diff --git a/packages/koa/test/application/onerror.test.ts b/packages/koa/test/application/onerror.test.ts index 231ce58b07..401df7df22 100644 --- a/packages/koa/test/application/onerror.test.ts +++ b/packages/koa/test/application/onerror.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import { runInNewContext } from 'node:vm'; import { mm } from 'mm'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import Koa from '../../src/index.ts'; diff --git a/packages/koa/test/application/request.test.ts b/packages/koa/test/application/request.test.ts index 320f2573d9..90b1fbbac9 100644 --- a/packages/koa/test/application/request.test.ts +++ b/packages/koa/test/application/request.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa from '../../src/index.ts'; diff --git a/packages/koa/test/application/respond.test.ts b/packages/koa/test/application/respond.test.ts index a514d1d6f8..b2c65bac3b 100644 --- a/packages/koa/test/application/respond.test.ts +++ b/packages/koa/test/application/respond.test.ts @@ -5,7 +5,7 @@ import { scheduler } from 'node:timers/promises'; import { request } from '@eggjs/supertest'; import statuses from 'statuses'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa from '../../src/index.ts'; diff --git a/packages/koa/test/application/response.test.ts b/packages/koa/test/application/response.test.ts index 2beedf289f..eab334e923 100644 --- a/packages/koa/test/application/response.test.ts +++ b/packages/koa/test/application/response.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa from '../../src/index.ts'; diff --git a/packages/koa/test/application/toJSON.test.ts b/packages/koa/test/application/toJSON.test.ts index ac17d0d75f..df4828fda9 100644 --- a/packages/koa/test/application/toJSON.test.ts +++ b/packages/koa/test/application/toJSON.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa from '../../src/index.ts'; diff --git a/packages/koa/test/application/use.test.ts b/packages/koa/test/application/use.test.ts index 8d85ceb534..2026e3ac10 100644 --- a/packages/koa/test/application/use.test.ts +++ b/packages/koa/test/application/use.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa, { type MiddlewareFunc } from '../../src/index.ts'; diff --git a/packages/koa/test/context/assert.test.ts b/packages/koa/test/context/assert.test.ts index 7d3fa83bea..56e5e387f5 100644 --- a/packages/koa/test/context/assert.test.ts +++ b/packages/koa/test/context/assert.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/context/cookies.test.ts b/packages/koa/test/context/cookies.test.ts index f39db0e087..65bc72d6b3 100644 --- a/packages/koa/test/context/cookies.test.ts +++ b/packages/koa/test/context/cookies.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa, { type Context } from '../../src/index.ts'; diff --git a/packages/koa/test/context/inspect.test.ts b/packages/koa/test/context/inspect.test.ts index 7ad05c5dd5..e3cdf2f1d9 100644 --- a/packages/koa/test/context/inspect.test.ts +++ b/packages/koa/test/context/inspect.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import util from 'node:util'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/context/onerror.test.ts b/packages/koa/test/context/onerror.test.ts index fe8f44ede3..0158ae7ba4 100644 --- a/packages/koa/test/context/onerror.test.ts +++ b/packages/koa/test/context/onerror.test.ts @@ -4,7 +4,7 @@ import type { ServerResponse } from 'node:http'; import { runInNewContext } from 'node:vm'; import { request } from '@eggjs/supertest'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa, { type Context } from '../../src/index.ts'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/context/state.test.ts b/packages/koa/test/context/state.test.ts index bc556cbf4e..189bbf4e3d 100644 --- a/packages/koa/test/context/state.test.ts +++ b/packages/koa/test/context/state.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa from '../../src/index.ts'; diff --git a/packages/koa/test/context/throw.test.ts b/packages/koa/test/context/throw.test.ts index 97aad7092c..a9294ef6ba 100644 --- a/packages/koa/test/context/throw.test.ts +++ b/packages/koa/test/context/throw.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import type { HttpError } from 'http-errors'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/context/toJSON.test.ts b/packages/koa/test/context/toJSON.test.ts index 029c59fb18..6f62ee0b47 100644 --- a/packages/koa/test/context/toJSON.test.ts +++ b/packages/koa/test/context/toJSON.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/index.test.ts b/packages/koa/test/index.test.ts index 5e821a4717..88b80add85 100644 --- a/packages/koa/test/index.test.ts +++ b/packages/koa/test/index.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { test, expect } from 'vitest'; +import { test, expect } from 'vite-plus/test'; // oxlint-disable-next-line no-namespace import Koa, * as KoaModule from '../src/index.ts'; diff --git a/packages/koa/test/request/accept.test.ts b/packages/koa/test/request/accept.test.ts index 2e97d30c70..f1d465e6ee 100644 --- a/packages/koa/test/request/accept.test.ts +++ b/packages/koa/test/request/accept.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import accepts from 'accepts'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context, { request as createRequest } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/accepts.test.ts b/packages/koa/test/request/accepts.test.ts index 10a9cc93f8..63d32a144a 100644 --- a/packages/koa/test/request/accepts.test.ts +++ b/packages/koa/test/request/accepts.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/acceptsCharsets.test.ts b/packages/koa/test/request/acceptsCharsets.test.ts index 5834f9db31..98031b9f20 100644 --- a/packages/koa/test/request/acceptsCharsets.test.ts +++ b/packages/koa/test/request/acceptsCharsets.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/acceptsEncodings.test.ts b/packages/koa/test/request/acceptsEncodings.test.ts index 26e522aae8..3eaf141d27 100644 --- a/packages/koa/test/request/acceptsEncodings.test.ts +++ b/packages/koa/test/request/acceptsEncodings.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/acceptsLanguages.test.ts b/packages/koa/test/request/acceptsLanguages.test.ts index f147b8644a..dfcd7cd0dc 100644 --- a/packages/koa/test/request/acceptsLanguages.test.ts +++ b/packages/koa/test/request/acceptsLanguages.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/charset.test.ts b/packages/koa/test/request/charset.test.ts index 538797222b..fb05c549a8 100644 --- a/packages/koa/test/request/charset.test.ts +++ b/packages/koa/test/request/charset.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { request } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/fresh.test.ts b/packages/koa/test/request/fresh.test.ts index 951623fbb3..3174258e61 100644 --- a/packages/koa/test/request/fresh.test.ts +++ b/packages/koa/test/request/fresh.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/get.test.ts b/packages/koa/test/request/get.test.ts index e06cf6583e..c77f88a5fb 100644 --- a/packages/koa/test/request/get.test.ts +++ b/packages/koa/test/request/get.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/header.test.ts b/packages/koa/test/request/header.test.ts index a955386325..a09dbf44c1 100644 --- a/packages/koa/test/request/header.test.ts +++ b/packages/koa/test/request/header.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { request } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/headers.test.ts b/packages/koa/test/request/headers.test.ts index 0b5b2f99e6..7095362093 100644 --- a/packages/koa/test/request/headers.test.ts +++ b/packages/koa/test/request/headers.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { request } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/host.test.ts b/packages/koa/test/request/host.test.ts index 2140c49754..19f8bd95de 100644 --- a/packages/koa/test/request/host.test.ts +++ b/packages/koa/test/request/host.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { request } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/hostname.test.ts b/packages/koa/test/request/hostname.test.ts index 530622524d..eb0cb1ca5c 100644 --- a/packages/koa/test/request/hostname.test.ts +++ b/packages/koa/test/request/hostname.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { request } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/href.test.ts b/packages/koa/test/request/href.test.ts index 3eb77aeb01..8e45f44510 100644 --- a/packages/koa/test/request/href.test.ts +++ b/packages/koa/test/request/href.test.ts @@ -1,9 +1,10 @@ import assert from 'node:assert/strict'; import Stream from 'node:stream'; + // import http from 'node:http'; // import type { AddressInfo } from 'node:net'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; // import Koa from '../../src/index.ts'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/idempotent.test.ts b/packages/koa/test/request/idempotent.test.ts index ffbbd3685a..961d3f2e3c 100644 --- a/packages/koa/test/request/idempotent.test.ts +++ b/packages/koa/test/request/idempotent.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { request } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/inspect.test.ts b/packages/koa/test/request/inspect.test.ts index b8e9185463..3f4cb7c847 100644 --- a/packages/koa/test/request/inspect.test.ts +++ b/packages/koa/test/request/inspect.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import util from 'node:util'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/ip.test.ts b/packages/koa/test/request/ip.test.ts index 37580ce6f7..b149fb879d 100644 --- a/packages/koa/test/request/ip.test.ts +++ b/packages/koa/test/request/ip.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import Stream from 'node:stream'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa from '../../src/index.ts'; import { request as createRequest } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/ips.test.ts b/packages/koa/test/request/ips.test.ts index e1410f5f0c..8e6967811e 100644 --- a/packages/koa/test/request/ips.test.ts +++ b/packages/koa/test/request/ips.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { request } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/is.test.ts b/packages/koa/test/request/is.test.ts index 0cf10683e6..e417b01227 100644 --- a/packages/koa/test/request/is.test.ts +++ b/packages/koa/test/request/is.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/length.test.ts b/packages/koa/test/request/length.test.ts index 64a8e1457d..3ede379f99 100644 --- a/packages/koa/test/request/length.test.ts +++ b/packages/koa/test/request/length.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { request } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/origin.test.ts b/packages/koa/test/request/origin.test.ts index 4ba5b7c17f..9f02ad958f 100644 --- a/packages/koa/test/request/origin.test.ts +++ b/packages/koa/test/request/origin.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import Stream from 'node:stream'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/path.test.ts b/packages/koa/test/request/path.test.ts index 5536380f44..a68a2ec53b 100644 --- a/packages/koa/test/request/path.test.ts +++ b/packages/koa/test/request/path.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import parseurl from 'parseurl'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/protocol.test.ts b/packages/koa/test/request/protocol.test.ts index cd2db23a14..d5e77d1bf7 100644 --- a/packages/koa/test/request/protocol.test.ts +++ b/packages/koa/test/request/protocol.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { request } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/query.test.ts b/packages/koa/test/request/query.test.ts index 4452ec7ef1..c2183f37c9 100644 --- a/packages/koa/test/request/query.test.ts +++ b/packages/koa/test/request/query.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/querystring.test.ts b/packages/koa/test/request/querystring.test.ts index 802d338a58..29830da901 100644 --- a/packages/koa/test/request/querystring.test.ts +++ b/packages/koa/test/request/querystring.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import parseurl from 'parseurl'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/search.test.ts b/packages/koa/test/request/search.test.ts index bf717880d1..534b66d54f 100644 --- a/packages/koa/test/request/search.test.ts +++ b/packages/koa/test/request/search.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/secure.test.ts b/packages/koa/test/request/secure.test.ts index cd8d0ababb..101a394fdf 100644 --- a/packages/koa/test/request/secure.test.ts +++ b/packages/koa/test/request/secure.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { request } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/stale.test.ts b/packages/koa/test/request/stale.test.ts index 4990dd8952..d70682ebeb 100644 --- a/packages/koa/test/request/stale.test.ts +++ b/packages/koa/test/request/stale.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/subdomains.test.ts b/packages/koa/test/request/subdomains.test.ts index 24b05d3c01..405e4dc695 100644 --- a/packages/koa/test/request/subdomains.test.ts +++ b/packages/koa/test/request/subdomains.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { request } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/type.test.ts b/packages/koa/test/request/type.test.ts index 0692f56a61..d2bbffc11f 100644 --- a/packages/koa/test/request/type.test.ts +++ b/packages/koa/test/request/type.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { request } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/request/whatwg-url.test.ts b/packages/koa/test/request/whatwg-url.test.ts index 7cd89cc6b3..af160758ec 100644 --- a/packages/koa/test/request/whatwg-url.test.ts +++ b/packages/koa/test/request/whatwg-url.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { request } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/append.test.ts b/packages/koa/test/response/append.test.ts index ab76f94140..efbb9ef6f7 100644 --- a/packages/koa/test/response/append.test.ts +++ b/packages/koa/test/response/append.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/attachment.test.ts b/packages/koa/test/response/attachment.test.ts index 6df47d6413..f0a5b7971f 100644 --- a/packages/koa/test/response/attachment.test.ts +++ b/packages/koa/test/response/attachment.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa from '../../src/index.ts'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/body.test.ts b/packages/koa/test/response/body.test.ts index e27a9b20a6..c982f1cd5a 100644 --- a/packages/koa/test/response/body.test.ts +++ b/packages/koa/test/response/body.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import fs from 'node:fs'; import Stream from 'node:stream'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { response } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/etag.test.ts b/packages/koa/test/response/etag.test.ts index 23cdd65e93..bf880a3618 100644 --- a/packages/koa/test/response/etag.test.ts +++ b/packages/koa/test/response/etag.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { response } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/flushHeaders.test.ts b/packages/koa/test/response/flushHeaders.test.ts index 2494c0460e..6a009976cf 100644 --- a/packages/koa/test/response/flushHeaders.test.ts +++ b/packages/koa/test/response/flushHeaders.test.ts @@ -5,7 +5,7 @@ import type { AddressInfo } from 'node:net'; import { PassThrough } from 'node:stream'; import { request } from '@eggjs/supertest'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa, { type Context } from '../../src/index.ts'; diff --git a/packages/koa/test/response/has.test.ts b/packages/koa/test/response/has.test.ts index 55fc882813..0c4f22c7aa 100644 --- a/packages/koa/test/response/has.test.ts +++ b/packages/koa/test/response/has.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/header.test.ts b/packages/koa/test/response/header.test.ts index 9f4a752781..9c9d637ad7 100644 --- a/packages/koa/test/response/header.test.ts +++ b/packages/koa/test/response/header.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa from '../../src/index.ts'; import { response } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/headers.test.ts b/packages/koa/test/response/headers.test.ts index 55aa6470f3..aa9dc5b31f 100644 --- a/packages/koa/test/response/headers.test.ts +++ b/packages/koa/test/response/headers.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { response } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/inspect.test.ts b/packages/koa/test/response/inspect.test.ts index 29df798b28..43fe065ac5 100644 --- a/packages/koa/test/response/inspect.test.ts +++ b/packages/koa/test/response/inspect.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import util from 'node:util'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { response } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/is.test.ts b/packages/koa/test/response/is.test.ts index de52be34ae..30e32128e4 100644 --- a/packages/koa/test/response/is.test.ts +++ b/packages/koa/test/response/is.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/last-modified.test.ts b/packages/koa/test/response/last-modified.test.ts index d68cdceb23..e4f7e2d60f 100644 --- a/packages/koa/test/response/last-modified.test.ts +++ b/packages/koa/test/response/last-modified.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { response } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/length.test.ts b/packages/koa/test/response/length.test.ts index 3f3a3caec3..fcbe39d28a 100644 --- a/packages/koa/test/response/length.test.ts +++ b/packages/koa/test/response/length.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import fs from 'node:fs'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { response } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/message.test.ts b/packages/koa/test/response/message.test.ts index 13507952b3..809c8bb405 100644 --- a/packages/koa/test/response/message.test.ts +++ b/packages/koa/test/response/message.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { response } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/redirect.test.ts b/packages/koa/test/response/redirect.test.ts index e1e1dbb012..3e11e34dd4 100644 --- a/packages/koa/test/response/redirect.test.ts +++ b/packages/koa/test/response/redirect.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa from '../../src/index.ts'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/remove.test.ts b/packages/koa/test/response/remove.test.ts index f325d71eb2..abb88cb8f2 100644 --- a/packages/koa/test/response/remove.test.ts +++ b/packages/koa/test/response/remove.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/set.test.ts b/packages/koa/test/response/set.test.ts index e7ab437004..6746e6fc3b 100644 --- a/packages/koa/test/response/set.test.ts +++ b/packages/koa/test/response/set.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/socket.test.ts b/packages/koa/test/response/socket.test.ts index 0dac8263b7..a95ac2d32e 100644 --- a/packages/koa/test/response/socket.test.ts +++ b/packages/koa/test/response/socket.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import Stream from 'node:stream'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { response } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/status.test.ts b/packages/koa/test/response/status.test.ts index d4aaeae0cf..3f75e09a9c 100644 --- a/packages/koa/test/response/status.test.ts +++ b/packages/koa/test/response/status.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import { request } from '@eggjs/supertest'; import statuses from 'statuses'; -import { describe, it, beforeEach } from 'vitest'; +import { describe, it, beforeEach } from 'vite-plus/test'; import Koa from '../../src/index.ts'; import { response } from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/type.test.ts b/packages/koa/test/response/type.test.ts index bec9942fe5..f5f01c5978 100644 --- a/packages/koa/test/response/type.test.ts +++ b/packages/koa/test/response/type.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/vary.test.ts b/packages/koa/test/response/vary.test.ts index 55bf421416..1b417b2b68 100644 --- a/packages/koa/test/response/vary.test.ts +++ b/packages/koa/test/response/vary.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import context from '../test-helpers/context.ts'; diff --git a/packages/koa/test/response/writable.test.ts b/packages/koa/test/response/writable.test.ts index 3d6452fbcf..2594d39d2e 100644 --- a/packages/koa/test/response/writable.test.ts +++ b/packages/koa/test/response/writable.test.ts @@ -3,7 +3,7 @@ import type { Server } from 'node:http'; import net, { type AddressInfo } from 'node:net'; import { setTimeout as sleep } from 'node:timers/promises'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import Koa from '../../src/index.ts'; diff --git a/packages/koa/tsdown.config.ts b/packages/koa/tsdown.config.ts index bae23779bb..55d5396421 100644 --- a/packages/koa/tsdown.config.ts +++ b/packages/koa/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/packages/koa/vite.config.ts b/packages/koa/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/packages/koa/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/packages/path-matching/test/index.test.ts b/packages/path-matching/test/index.test.ts index 31c774338f..318135422f 100644 --- a/packages/path-matching/test/index.test.ts +++ b/packages/path-matching/test/index.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import { pathMatching as match } from '../src/index.ts'; diff --git a/packages/path-matching/tsdown.config.ts b/packages/path-matching/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/packages/path-matching/tsdown.config.ts +++ b/packages/path-matching/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/packages/path-matching/vite.config.ts b/packages/path-matching/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/packages/path-matching/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/packages/router/test/EggRouter.test.ts b/packages/router/test/EggRouter.test.ts index c41b6737a7..7c4ada5635 100644 --- a/packages/router/test/EggRouter.test.ts +++ b/packages/router/test/EggRouter.test.ts @@ -1,7 +1,7 @@ import { Application } from '@eggjs/koa'; import request from '@eggjs/supertest'; import is from 'is-type-of'; -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import { EggRouter } from '../src/index.ts'; diff --git a/packages/router/test/Layer.test.ts b/packages/router/test/Layer.test.ts index 49b9e98f11..45b3647319 100644 --- a/packages/router/test/Layer.test.ts +++ b/packages/router/test/Layer.test.ts @@ -1,6 +1,6 @@ import { Application } from '@eggjs/koa'; import request from '@eggjs/supertest'; -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import { Layer } from '../src/Layer.ts'; import { Router } from '../src/Router.ts'; diff --git a/packages/router/test/Router.test.ts b/packages/router/test/Router.test.ts index a7588edf90..f38da0fff6 100644 --- a/packages/router/test/Router.test.ts +++ b/packages/router/test/Router.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs'; import { Application as Koa } from '@eggjs/koa'; import request from '@eggjs/supertest'; import methods from 'methods'; -import { describe, it, expect, beforeAll, beforeEach } from 'vitest'; +import { describe, it, expect, beforeAll, beforeEach } from 'vite-plus/test'; import Router from '../src/index.ts'; import type { Next } from '../src/types.ts'; diff --git a/packages/router/test/index.test.ts b/packages/router/test/index.test.ts index 0e29a09201..4ff0895985 100644 --- a/packages/router/test/index.test.ts +++ b/packages/router/test/index.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import Router, { KoaRouter, EggRouter } from '../src/index.ts'; diff --git a/packages/router/tsdown.config.ts b/packages/router/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/packages/router/tsdown.config.ts +++ b/packages/router/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/packages/router/vite.config.ts b/packages/router/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/packages/router/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/packages/supertest/test/supertest.test.ts b/packages/supertest/test/supertest.test.ts index 78d907dfe3..cfdb4c5f64 100644 --- a/packages/supertest/test/supertest.test.ts +++ b/packages/supertest/test/supertest.test.ts @@ -8,7 +8,7 @@ import path from 'node:path'; import bodyParser from 'body-parser'; import cookieParser from 'cookie-parser'; import express, { type Express } from 'express'; -import { describe, it, beforeEach, beforeAll, expect } from 'vitest'; +import { describe, it, beforeEach, beforeAll, expect } from 'vite-plus/test'; import request, { Test } from '../src/index.ts'; import { throwError } from './throwError.ts'; diff --git a/packages/supertest/tsdown.config.ts b/packages/supertest/tsdown.config.ts index b24d94411b..f0ae20840b 100644 --- a/packages/supertest/tsdown.config.ts +++ b/packages/supertest/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/packages/supertest/vite.config.ts b/packages/supertest/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/packages/supertest/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/packages/tsconfig/test/index.test.ts b/packages/tsconfig/test/index.test.ts index 3101478354..f63d51308c 100644 --- a/packages/tsconfig/test/index.test.ts +++ b/packages/tsconfig/test/index.test.ts @@ -2,7 +2,7 @@ import fs from 'node:fs/promises'; import path from 'node:path'; import coffee from 'coffee'; -import { test, expect } from 'vitest'; +import { test, expect } from 'vite-plus/test'; test('should tsc build work', async () => { const tsc = path.join(import.meta.dirname, '..', 'node_modules', 'typescript', 'bin', 'tsc'); diff --git a/packages/tsconfig/tsdown.config.ts b/packages/tsconfig/tsdown.config.ts index 0f466e9c72..0429868320 100644 --- a/packages/tsconfig/tsdown.config.ts +++ b/packages/tsconfig/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ // export nothing diff --git a/packages/tsconfig/vite.config.ts b/packages/tsconfig/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/packages/tsconfig/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/packages/utils/test/framework.test.ts b/packages/utils/test/framework.test.ts index 2a7f305728..9a1073c43f 100644 --- a/packages/utils/test/framework.test.ts +++ b/packages/utils/test/framework.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs'; import path from 'node:path'; import { restore, mm } from 'mm'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { getFrameworkPath } from '../src/index.js'; import { getFilepath, testDir } from './helper.js'; diff --git a/packages/utils/test/getFrameworkOrEggPath.test.ts b/packages/utils/test/getFrameworkOrEggPath.test.ts index 6d1e21fef9..dd3af8a576 100644 --- a/packages/utils/test/getFrameworkOrEggPath.test.ts +++ b/packages/utils/test/getFrameworkOrEggPath.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import utils from '../src/index.js'; import { getFilepath } from './helper.js'; diff --git a/packages/utils/test/import.test.ts b/packages/utils/test/import.test.ts index 93b760e7b3..27993d0a9e 100644 --- a/packages/utils/test/import.test.ts +++ b/packages/utils/test/import.test.ts @@ -2,7 +2,7 @@ import { strict as assert } from 'node:assert'; import path from 'node:path'; import coffee from 'coffee'; -import { describe, it, expect, vi } from 'vitest'; +import { describe, it, expect, vi } from 'vite-plus/test'; import { importResolve, importModule, ImportResolveError, isESM, isSupportTypeScript } from '../src/index.ts'; import { getFilepath } from './helper.ts'; diff --git a/packages/utils/test/index.test.ts b/packages/utils/test/index.test.ts index 6a5f43092c..f3dba128f1 100644 --- a/packages/utils/test/index.test.ts +++ b/packages/utils/test/index.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import { detectType, EggType } from '../src/index.ts'; import * as all from '../src/index.ts'; diff --git a/packages/utils/test/plugin.test.ts b/packages/utils/test/plugin.test.ts index eeb5d804f6..93ddd817ec 100644 --- a/packages/utils/test/plugin.test.ts +++ b/packages/utils/test/plugin.test.ts @@ -6,7 +6,7 @@ import path from 'node:path'; import coffee from 'coffee'; import { runscript } from 'runscript'; -import { describe, it, beforeEach, afterEach } from 'vitest'; +import { describe, it, beforeEach, afterEach } from 'vite-plus/test'; import utils from '../src/index.js'; import { getFilepath } from './helper.js'; diff --git a/packages/utils/tsdown.config.ts b/packages/utils/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/packages/utils/tsdown.config.ts +++ b/packages/utils/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/packages/utils/vite.config.ts b/packages/utils/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/packages/utils/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/packages/utils/vitest.config.ts b/packages/utils/vitest.config.ts index 2b417434e4..25d3443fe1 100644 --- a/packages/utils/vitest.config.ts +++ b/packages/utils/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject } from 'vitest/config'; +import { defineProject } from 'vite-plus'; export default defineProject({ test: { diff --git a/plugins/development/test/absolute.test.ts b/plugins/development/test/absolute.test.ts index bef3f50259..b97aa3fea8 100755 --- a/plugins/development/test/absolute.test.ts +++ b/plugins/development/test/absolute.test.ts @@ -3,7 +3,7 @@ import path from 'node:path'; import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeAll, afterAll, it, describe } from 'vitest'; +import { beforeAll, afterAll, it, describe } from 'vite-plus/test'; import { getFilepath } from './utils.ts'; diff --git a/plugins/development/test/custom.test.ts b/plugins/development/test/custom.test.ts index fc8bedeffa..c5459902bd 100755 --- a/plugins/development/test/custom.test.ts +++ b/plugins/development/test/custom.test.ts @@ -2,7 +2,7 @@ import fs from 'node:fs/promises'; import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeAll, afterAll, it, describe } from 'vitest'; +import { beforeAll, afterAll, it, describe } from 'vite-plus/test'; import { getFilepath } from './utils.ts'; diff --git a/plugins/development/test/development-ts.test.ts b/plugins/development/test/development-ts.test.ts index 37fea331c8..ed268c8d13 100755 --- a/plugins/development/test/development-ts.test.ts +++ b/plugins/development/test/development-ts.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs/promises'; import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeEach, afterEach, it, describe, expect } from 'vitest'; +import { beforeEach, afterEach, it, describe, expect } from 'vite-plus/test'; import { escape, getFilepath, DELAY } from './utils.ts'; diff --git a/plugins/development/test/development.test.ts b/plugins/development/test/development.test.ts index 1837f63371..0d94e2a851 100755 --- a/plugins/development/test/development.test.ts +++ b/plugins/development/test/development.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs/promises'; import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeAll, afterAll, it, describe, afterEach } from 'vitest'; +import { beforeAll, afterAll, it, describe, afterEach } from 'vite-plus/test'; import { escape, getFilepath, DELAY } from './utils.ts'; diff --git a/plugins/development/test/fast_ready_false.test.ts b/plugins/development/test/fast_ready_false.test.ts index 7508a3f0fd..6ac8941355 100644 --- a/plugins/development/test/fast_ready_false.test.ts +++ b/plugins/development/test/fast_ready_false.test.ts @@ -1,7 +1,7 @@ import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeEach, afterEach, it, describe } from 'vitest'; +import { beforeEach, afterEach, it, describe } from 'vite-plus/test'; import { getFilepath } from './utils.ts'; diff --git a/plugins/development/test/not-reload.test.ts b/plugins/development/test/not-reload.test.ts index 14cbdd8afb..c494406836 100755 --- a/plugins/development/test/not-reload.test.ts +++ b/plugins/development/test/not-reload.test.ts @@ -2,7 +2,7 @@ import fs from 'node:fs/promises'; import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeAll, afterAll, it, describe } from 'vitest'; +import { beforeAll, afterAll, it, describe } from 'vite-plus/test'; import { escape, getFilepath, DELAY } from './utils.ts'; diff --git a/plugins/development/test/override.test.ts b/plugins/development/test/override.test.ts index c177224158..d9e3763a3c 100755 --- a/plugins/development/test/override.test.ts +++ b/plugins/development/test/override.test.ts @@ -2,7 +2,7 @@ import fs from 'node:fs/promises'; import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeAll, afterAll, it, describe } from 'vitest'; +import { beforeAll, afterAll, it, describe } from 'vite-plus/test'; import { escape, getFilepath } from './utils.ts'; diff --git a/plugins/development/test/process_mode_single.test.ts b/plugins/development/test/process_mode_single.test.ts index 2df5b2c53f..17deee41ca 100644 --- a/plugins/development/test/process_mode_single.test.ts +++ b/plugins/development/test/process_mode_single.test.ts @@ -5,7 +5,7 @@ import { scheduler } from 'node:timers/promises'; import { mm } from '@eggjs/mock'; import { request } from '@eggjs/supertest'; import { start, Application } from 'egg'; -import { beforeAll, afterAll, it, describe } from 'vitest'; +import { beforeAll, afterAll, it, describe } from 'vite-plus/test'; import developmentPlugin from '../src/index.ts'; import { getFilepath } from './utils.ts'; diff --git a/plugins/development/test/timing.test.ts b/plugins/development/test/timing.test.ts index d5d1b32f13..c0f4e86971 100644 --- a/plugins/development/test/timing.test.ts +++ b/plugins/development/test/timing.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeAll, afterAll, it, describe } from 'vitest'; +import { beforeAll, afterAll, it, describe } from 'vite-plus/test'; import { getFilepath } from './utils.ts'; diff --git a/plugins/development/vitest.config.ts b/plugins/development/vitest.config.ts index 2beb22f404..41e9d64df4 100644 --- a/plugins/development/vitest.config.ts +++ b/plugins/development/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject, type UserWorkspaceConfig } from 'vitest/config'; +import { defineProject, type UserWorkspaceConfig } from 'vite-plus'; const config: UserWorkspaceConfig = defineProject({ test: { diff --git a/plugins/i18n/test/i18n.test.ts b/plugins/i18n/test/i18n.test.ts index 4c346f7551..ded03e0f28 100644 --- a/plugins/i18n/test/i18n.test.ts +++ b/plugins/i18n/test/i18n.test.ts @@ -1,7 +1,7 @@ import path from 'node:path'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vite-plus/test'; function getFixtures(name: string) { return path.join(import.meta.dirname, 'fixtures', name); diff --git a/plugins/i18n/test/utils.test.ts b/plugins/i18n/test/utils.test.ts index 23e56430d7..8d97acffe6 100644 --- a/plugins/i18n/test/utils.test.ts +++ b/plugins/i18n/test/utils.test.ts @@ -1,4 +1,4 @@ -import { test, expect } from 'vitest'; +import { test, expect } from 'vite-plus/test'; import { formatLocale } from '../src/utils.ts'; diff --git a/plugins/jsonp/test/jsonp.test.ts b/plugins/jsonp/test/jsonp.test.ts index 30b2efa28e..2430b0eacb 100644 --- a/plugins/jsonp/test/jsonp.test.ts +++ b/plugins/jsonp/test/jsonp.test.ts @@ -2,7 +2,7 @@ import { strict as assert } from 'node:assert'; import path from 'node:path'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; describe('test/jsonp.test.ts', () => { let app: MockApplication; diff --git a/plugins/logrotator/test/clean_log.test.ts b/plugins/logrotator/test/clean_log.test.ts index 2f8647eb04..4527b58684 100644 --- a/plugins/logrotator/test/clean_log.test.ts +++ b/plugins/logrotator/test/clean_log.test.ts @@ -6,7 +6,7 @@ import { mm, type MockApplication } from '@eggjs/mock'; import { FileTransport } from 'egg-logger'; import { glob } from 'glob'; import moment from 'moment'; -import { describe, it, beforeEach, afterEach, expect } from 'vitest'; +import { describe, it, beforeEach, afterEach, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/logrotator/test/index.test.ts b/plugins/logrotator/test/index.test.ts index 8b06e11dcd..fb184b4b8e 100644 --- a/plugins/logrotator/test/index.test.ts +++ b/plugins/logrotator/test/index.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import { LogRotator } from '../src/index.ts'; diff --git a/plugins/logrotator/test/logrotator.test.ts b/plugins/logrotator/test/logrotator.test.ts index 77af43f9cb..cf25eb0733 100644 --- a/plugins/logrotator/test/logrotator.test.ts +++ b/plugins/logrotator/test/logrotator.test.ts @@ -5,7 +5,7 @@ import { createUnzip } from 'node:zlib'; import { mm, type MockApplication } from '@eggjs/mock'; import moment from 'moment'; -import { describe, it, beforeEach, afterEach, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, beforeEach, afterEach, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/logrotator/test/rotate_by_day.test.ts b/plugins/logrotator/test/rotate_by_day.test.ts index 3fca9f1ea5..9b95252801 100644 --- a/plugins/logrotator/test/rotate_by_day.test.ts +++ b/plugins/logrotator/test/rotate_by_day.test.ts @@ -6,7 +6,7 @@ import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; import { glob } from 'glob'; import moment from 'moment'; -import { describe, it, afterEach, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterEach, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/logrotator/test/rotate_by_size.test.ts b/plugins/logrotator/test/rotate_by_size.test.ts index 28c7bf6492..426bf77363 100644 --- a/plugins/logrotator/test/rotate_by_size.test.ts +++ b/plugins/logrotator/test/rotate_by_size.test.ts @@ -4,7 +4,7 @@ import path from 'node:path'; import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeEach, afterEach, expect } from 'vitest'; +import { describe, it, beforeEach, afterEach, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/logrotator/vitest.config.ts b/plugins/logrotator/vitest.config.ts index d34001c8b2..12a05b8c6b 100644 --- a/plugins/logrotator/vitest.config.ts +++ b/plugins/logrotator/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject } from 'vitest/config'; +import { defineProject } from 'vite-plus'; export default defineProject({ test: { diff --git a/plugins/mock/test/agent.test.ts b/plugins/mock/test/agent.test.ts index b860d8d9f0..a5bdf096be 100644 --- a/plugins/mock/test/agent.test.ts +++ b/plugins/mock/test/agent.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/app.test.ts b/plugins/mock/test/app.test.ts index 15f3d6d20d..3faa3e0eeb 100644 --- a/plugins/mock/test/app.test.ts +++ b/plugins/mock/test/app.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/app/middleware/cluster_app_mock.test.ts b/plugins/mock/test/app/middleware/cluster_app_mock.test.ts index 6fb3de2a1f..6b954d799c 100644 --- a/plugins/mock/test/app/middleware/cluster_app_mock.test.ts +++ b/plugins/mock/test/app/middleware/cluster_app_mock.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../../../src/index.ts'; import { getFixtures } from '../../helper.ts'; diff --git a/plugins/mock/test/app_event.test.ts b/plugins/mock/test/app_event.test.ts index 31fcbc8197..1b20d6c3af 100644 --- a/plugins/mock/test/app_event.test.ts +++ b/plugins/mock/test/app_event.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert'; import { once } from 'node:events'; import { scheduler } from 'node:timers/promises'; -import { describe, it, beforeAll, afterAll, afterEach, beforeEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach, beforeEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/app_proxy.test.ts b/plugins/mock/test/app_proxy.test.ts index f10b1b5d25..0aaf9f8918 100644 --- a/plugins/mock/test/app_proxy.test.ts +++ b/plugins/mock/test/app_proxy.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { scheduler } from 'node:timers/promises'; -import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/bootstrap-plugin.test.ts b/plugins/mock/test/bootstrap-plugin.test.ts index c3ba9d2e21..cd3e9b5d7f 100644 --- a/plugins/mock/test/bootstrap-plugin.test.ts +++ b/plugins/mock/test/bootstrap-plugin.test.ts @@ -1,6 +1,6 @@ import coffee from 'coffee'; import { mock, restore } from 'mm'; -import { describe, it, afterAll } from 'vitest'; +import { describe, it, afterAll } from 'vite-plus/test'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/bootstrap.test.ts b/plugins/mock/test/bootstrap.test.ts index 7ccf33a20f..271e85438b 100644 --- a/plugins/mock/test/bootstrap.test.ts +++ b/plugins/mock/test/bootstrap.test.ts @@ -2,7 +2,7 @@ import path from 'node:path'; import { importResolve } from '@eggjs/utils'; import coffee from 'coffee'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/cluster-worker_threads.test.ts b/plugins/mock/test/cluster-worker_threads.test.ts index 197120d5f2..c19c2d2238 100644 --- a/plugins/mock/test/cluster-worker_threads.test.ts +++ b/plugins/mock/test/cluster-worker_threads.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { scheduler } from 'node:timers/promises'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import mm, { type MockClusterApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/cluster.test.ts b/plugins/mock/test/cluster.test.ts index f107eb651a..28f147bc81 100644 --- a/plugins/mock/test/cluster.test.ts +++ b/plugins/mock/test/cluster.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { detectPort } from 'detect-port'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/ctx.test.ts b/plugins/mock/test/ctx.test.ts index f0c880f987..9430138028 100644 --- a/plugins/mock/test/ctx.test.ts +++ b/plugins/mock/test/ctx.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import path from 'node:path'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/fixtures/apps/helloworld/test/helloworld.test.js b/plugins/mock/test/fixtures/apps/helloworld/test/helloworld.test.js index 8b8078cbcc..051f1e5158 100644 --- a/plugins/mock/test/fixtures/apps/helloworld/test/helloworld.test.js +++ b/plugins/mock/test/fixtures/apps/helloworld/test/helloworld.test.js @@ -1,4 +1,4 @@ -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { app } from '../../../../../dist/esm/bootstrap.js'; diff --git a/plugins/mock/test/format_options.test.ts b/plugins/mock/test/format_options.test.ts index 307e6fc204..753d82293f 100644 --- a/plugins/mock/test/format_options.test.ts +++ b/plugins/mock/test/format_options.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import path from 'node:path'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import mm from '../src/index.ts'; import { formatOptions } from '../src/lib/format_options.ts'; diff --git a/plugins/mock/test/inject_ctx.test.ts b/plugins/mock/test/inject_ctx.test.ts index 7f367c9b5e..3215423c33 100644 --- a/plugins/mock/test/inject_ctx.test.ts +++ b/plugins/mock/test/inject_ctx.test.ts @@ -3,7 +3,7 @@ import path from 'node:path'; import { importResolve } from '@eggjs/utils'; import coffee from 'coffee'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mm.test.ts b/plugins/mock/test/mm.test.ts index 86eb2954ba..6716851292 100644 --- a/plugins/mock/test/mm.test.ts +++ b/plugins/mock/test/mm.test.ts @@ -1,8 +1,9 @@ import { strict as assert } from 'node:assert'; import path from 'node:path'; + // import fs from 'node:fs'; -import { describe, it, beforeEach, afterEach, afterAll, beforeAll } from 'vitest'; +import { describe, it, beforeEach, afterEach, afterAll, beforeAll } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_agent_httpclient.test.ts b/plugins/mock/test/mock_agent_httpclient.test.ts index 8e4dbcda04..a19d125d30 100644 --- a/plugins/mock/test/mock_agent_httpclient.test.ts +++ b/plugins/mock/test/mock_agent_httpclient.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_cluster_extend.test.ts b/plugins/mock/test/mock_cluster_extend.test.ts index 75b93683c7..2c8fad11fb 100644 --- a/plugins/mock/test/mock_cluster_extend.test.ts +++ b/plugins/mock/test/mock_cluster_extend.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_cluster_restore.test.ts b/plugins/mock/test/mock_cluster_restore.test.ts index 545361a344..18f41570c3 100644 --- a/plugins/mock/test/mock_cluster_restore.test.ts +++ b/plugins/mock/test/mock_cluster_restore.test.ts @@ -2,7 +2,7 @@ // import fs from 'node:fs'; // import { scheduler } from 'node:timers/promises'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_cluster_without_security_plugin.test.ts b/plugins/mock/test/mock_cluster_without_security_plugin.test.ts index 21c1bda1f0..0cf92bb792 100644 --- a/plugins/mock/test/mock_cluster_without_security_plugin.test.ts +++ b/plugins/mock/test/mock_cluster_without_security_plugin.test.ts @@ -1,4 +1,4 @@ -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_context.test.ts b/plugins/mock/test/mock_context.test.ts index b50c4c94db..06a134670a 100644 --- a/plugins/mock/test/mock_context.test.ts +++ b/plugins/mock/test/mock_context.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_cookies.test.ts b/plugins/mock/test/mock_cookies.test.ts index 3068f5aa20..59198b6dc4 100644 --- a/plugins/mock/test/mock_cookies.test.ts +++ b/plugins/mock/test/mock_cookies.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_csrf.test.ts b/plugins/mock/test/mock_csrf.test.ts index 5968c6a463..4b71bcbdda 100644 --- a/plugins/mock/test/mock_csrf.test.ts +++ b/plugins/mock/test/mock_csrf.test.ts @@ -1,4 +1,4 @@ -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_custom_loader.test.ts b/plugins/mock/test/mock_custom_loader.test.ts index 10f5f4167d..74d434358f 100644 --- a/plugins/mock/test/mock_custom_loader.test.ts +++ b/plugins/mock/test/mock_custom_loader.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_env.test.ts b/plugins/mock/test/mock_env.test.ts index 490b522a8c..2ca791f732 100644 --- a/plugins/mock/test/mock_env.test.ts +++ b/plugins/mock/test/mock_env.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { scheduler } from 'node:timers/promises'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_headers.test.ts b/plugins/mock/test/mock_headers.test.ts index 553eebf6d4..8c80f408f1 100644 --- a/plugins/mock/test/mock_headers.test.ts +++ b/plugins/mock/test/mock_headers.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { request } from '@eggjs/supertest'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_httpclient_next.test.ts b/plugins/mock/test/mock_httpclient_next.test.ts index b123135251..3900568c2c 100644 --- a/plugins/mock/test/mock_httpclient_next.test.ts +++ b/plugins/mock/test/mock_httpclient_next.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs'; import { Server, type AddressInfo } from 'node:net'; import { request } from '@eggjs/supertest'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_httpclient_next_h2.test.ts b/plugins/mock/test/mock_httpclient_next_h2.test.ts index fafe95378e..229c206123 100644 --- a/plugins/mock/test/mock_httpclient_next_h2.test.ts +++ b/plugins/mock/test/mock_httpclient_next_h2.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs'; import { Server, type AddressInfo } from 'node:net'; import { request } from '@eggjs/supertest'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_request.test.ts b/plugins/mock/test/mock_request.test.ts index cf7e47491b..924fb2fe08 100644 --- a/plugins/mock/test/mock_request.test.ts +++ b/plugins/mock/test/mock_request.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_service.test.ts b/plugins/mock/test/mock_service.test.ts index 77937abee7..65c811f367 100644 --- a/plugins/mock/test/mock_service.test.ts +++ b/plugins/mock/test/mock_service.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_service_async.test.ts b/plugins/mock/test/mock_service_async.test.ts index 83dff85ba4..e150917bf1 100644 --- a/plugins/mock/test/mock_service_async.test.ts +++ b/plugins/mock/test/mock_service_async.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_service_cluster.test.ts b/plugins/mock/test/mock_service_cluster.test.ts index ccced26e74..3eb194f473 100644 --- a/plugins/mock/test/mock_service_cluster.test.ts +++ b/plugins/mock/test/mock_service_cluster.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/mock_session.test.ts b/plugins/mock/test/mock_session.test.ts index d4e47d246e..ea9e3b4d19 100644 --- a/plugins/mock/test/mock_session.test.ts +++ b/plugins/mock/test/mock_session.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; import mm, { type MockApplication } from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/test/parallel.test.ts b/plugins/mock/test/parallel.test.ts index 19e48daefe..15eb258b10 100644 --- a/plugins/mock/test/parallel.test.ts +++ b/plugins/mock/test/parallel.test.ts @@ -1,4 +1,4 @@ -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { getFixtures } from './helper.js'; diff --git a/plugins/mock/test/parallel_hook.test.ts b/plugins/mock/test/parallel_hook.test.ts index ea9941e22f..5f41c0a083 100644 --- a/plugins/mock/test/parallel_hook.test.ts +++ b/plugins/mock/test/parallel_hook.test.ts @@ -1,6 +1,6 @@ import { importResolve } from '@eggjs/utils'; import coffee from 'coffee'; -import { describe, it, afterAll } from 'vitest'; +import { describe, it, afterAll } from 'vite-plus/test'; import mm from '../src/index.ts'; import { getFixtures } from './helper.ts'; diff --git a/plugins/mock/tsdown.config.ts b/plugins/mock/tsdown.config.ts index 5513e574b9..d72e06ef3d 100644 --- a/plugins/mock/tsdown.config.ts +++ b/plugins/mock/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ external: ['mocha'], diff --git a/plugins/mock/vite.config.ts b/plugins/mock/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/plugins/mock/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/plugins/mock/vitest.config.ts b/plugins/mock/vitest.config.ts index c5aec38ed9..8f2669184e 100644 --- a/plugins/mock/vitest.config.ts +++ b/plugins/mock/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject, type UserWorkspaceConfig } from 'vitest/config'; +import { defineProject, type UserWorkspaceConfig } from 'vite-plus'; const config: UserWorkspaceConfig = defineProject({ test: { diff --git a/plugins/multipart/test/dynamic-option.test.ts b/plugins/multipart/test/dynamic-option.test.ts index 770e8e15a5..4984cca752 100644 --- a/plugins/multipart/test/dynamic-option.test.ts +++ b/plugins/multipart/test/dynamic-option.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs/promises'; import { mm, type MockApplication } from '@eggjs/mock'; import formstream from 'formstream'; import urllib from 'urllib'; -import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vitest'; +import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/multipart/test/enable-pathToRegexpModule.test.ts b/plugins/multipart/test/enable-pathToRegexpModule.test.ts index 88b2ffe543..5ca00944a1 100644 --- a/plugins/multipart/test/enable-pathToRegexpModule.test.ts +++ b/plugins/multipart/test/enable-pathToRegexpModule.test.ts @@ -5,7 +5,7 @@ import path from 'node:path'; import { mm, type MockApplication } from '@eggjs/mock'; import formstream from 'formstream'; import urllib from 'urllib'; -import { beforeAll, afterAll, beforeEach, afterEach, describe, it } from 'vitest'; +import { beforeAll, afterAll, beforeEach, afterEach, describe, it } from 'vite-plus/test'; describe.skip('test/enable-pathToRegexpModule.test.ts', () => { let app: MockApplication; diff --git a/plugins/multipart/test/file-mode-limit-filesize-per-request.test.ts b/plugins/multipart/test/file-mode-limit-filesize-per-request.test.ts index 9f82f78f4a..40aace3d4c 100644 --- a/plugins/multipart/test/file-mode-limit-filesize-per-request.test.ts +++ b/plugins/multipart/test/file-mode-limit-filesize-per-request.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs/promises'; import { mm, type MockApplication } from '@eggjs/mock'; import formstream from 'formstream'; import urllib from 'urllib'; -import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vitest'; +import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/multipart/test/file-mode.test.ts b/plugins/multipart/test/file-mode.test.ts index f419482052..f73c2aa63f 100644 --- a/plugins/multipart/test/file-mode.test.ts +++ b/plugins/multipart/test/file-mode.test.ts @@ -7,7 +7,7 @@ import { mm, mock, type MockApplication } from '@eggjs/mock'; import dayjs from 'dayjs'; import formstream from 'formstream'; import urllib from 'urllib'; -import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vitest'; +import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/multipart/test/multipart-for-await.test.ts b/plugins/multipart/test/multipart-for-await.test.ts index e50d822688..983ce06b8d 100644 --- a/plugins/multipart/test/multipart-for-await.test.ts +++ b/plugins/multipart/test/multipart-for-await.test.ts @@ -1,7 +1,7 @@ import { mm, type MockApplication } from '@eggjs/mock'; import formstream from 'formstream'; import urllib from 'urllib'; -import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vitest'; +import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/multipart/test/multipart.test.ts b/plugins/multipart/test/multipart.test.ts index 864567b54f..eae18c0d9e 100644 --- a/plugins/multipart/test/multipart.test.ts +++ b/plugins/multipart/test/multipart.test.ts @@ -4,7 +4,7 @@ import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; import formstream from 'formstream'; import urllib from 'urllib'; -import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vitest'; +import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/multipart/test/stream-mode-with-filematch-glob.test.ts b/plugins/multipart/test/stream-mode-with-filematch-glob.test.ts index cae967574f..0be0fd26f3 100644 --- a/plugins/multipart/test/stream-mode-with-filematch-glob.test.ts +++ b/plugins/multipart/test/stream-mode-with-filematch-glob.test.ts @@ -4,7 +4,7 @@ import { fileURLToPath } from 'node:url'; import { mm, type MockApplication } from '@eggjs/mock'; import formstream from 'formstream'; import urllib from 'urllib'; -import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vitest'; +import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/multipart/test/stream-mode-with-filematch.test.ts b/plugins/multipart/test/stream-mode-with-filematch.test.ts index 7dd35e67e3..d26aa9ffc2 100644 --- a/plugins/multipart/test/stream-mode-with-filematch.test.ts +++ b/plugins/multipart/test/stream-mode-with-filematch.test.ts @@ -4,7 +4,7 @@ import { fileURLToPath } from 'node:url'; import { mm, type MockApplication } from '@eggjs/mock'; import formstream from 'formstream'; import urllib from 'urllib'; -import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vitest'; +import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/multipart/test/ts.test.ts b/plugins/multipart/test/ts.test.ts index 487db2366e..e2cadbb624 100644 --- a/plugins/multipart/test/ts.test.ts +++ b/plugins/multipart/test/ts.test.ts @@ -4,7 +4,7 @@ import { fileURLToPath } from 'node:url'; import { mm, type MockApplication } from '@eggjs/mock'; import formstream from 'formstream'; import urllib from 'urllib'; -import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vitest'; +import { beforeAll, afterAll, beforeEach, afterEach, describe, it, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/multipart/test/wrong-mode.test.ts b/plugins/multipart/test/wrong-mode.test.ts index 5c0f248a03..0bb607b2d5 100644 --- a/plugins/multipart/test/wrong-mode.test.ts +++ b/plugins/multipart/test/wrong-mode.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach, expect } from 'vitest'; +import { describe, it, afterEach, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/multipart/vitest.config.ts b/plugins/multipart/vitest.config.ts index ac1b789fe4..7b4d6f835f 100644 --- a/plugins/multipart/vitest.config.ts +++ b/plugins/multipart/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject } from 'vitest/config'; +import { defineProject } from 'vite-plus'; export default defineProject({ test: { diff --git a/plugins/onerror/test/onerror.test.ts b/plugins/onerror/test/onerror.test.ts index 40961496e1..50d8d765ea 100644 --- a/plugins/onerror/test/onerror.test.ts +++ b/plugins/onerror/test/onerror.test.ts @@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url'; import { mm, type MockApplication } from '@eggjs/mock'; import { type Context } from 'egg'; -import { describe, it, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach } from 'vite-plus/test'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); diff --git a/plugins/onerror/tsdown.config.ts b/plugins/onerror/tsdown.config.ts index a05ee5ecad..298e3d1e76 100644 --- a/plugins/onerror/tsdown.config.ts +++ b/plugins/onerror/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ copy: [ diff --git a/plugins/onerror/vite.config.ts b/plugins/onerror/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/plugins/onerror/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/plugins/onerror/vitest.config.ts b/plugins/onerror/vitest.config.ts index d34001c8b2..12a05b8c6b 100644 --- a/plugins/onerror/vitest.config.ts +++ b/plugins/onerror/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject } from 'vitest/config'; +import { defineProject } from 'vite-plus'; export default defineProject({ test: { diff --git a/plugins/redis/test/redis.test.ts b/plugins/redis/test/redis.test.ts index 74efbecac2..1b0817070f 100644 --- a/plugins/redis/test/redis.test.ts +++ b/plugins/redis/test/redis.test.ts @@ -3,7 +3,7 @@ import path from 'node:path'; import { mm, type MockApplication } from '@eggjs/mock'; import { detectPort } from 'detect-port'; -import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vite-plus/test'; function getFixtures(name: string) { return path.resolve(import.meta.dirname, 'fixtures', name); diff --git a/plugins/redis/vitest.config.ts b/plugins/redis/vitest.config.ts index fc3e04eaf6..bb537108f5 100644 --- a/plugins/redis/vitest.config.ts +++ b/plugins/redis/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineConfig, type UserWorkspaceConfig } from 'vitest/config'; +import { defineConfig, type UserWorkspaceConfig } from 'vite-plus'; const config: UserWorkspaceConfig = defineConfig({ test: { diff --git a/plugins/schedule/test/all.test.ts b/plugins/schedule/test/all.test.ts index 3a99ea10e7..95846d2337 100644 --- a/plugins/schedule/test/all.test.ts +++ b/plugins/schedule/test/all.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { contains, getFixtures, getLogContent, getScheduleLogContent } from './utils.ts'; diff --git a/plugins/schedule/test/cronError.test.ts b/plugins/schedule/test/cronError.test.ts index 4a358e3605..93dcd8c07f 100644 --- a/plugins/schedule/test/cronError.test.ts +++ b/plugins/schedule/test/cronError.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll } from 'vitest'; +import { describe, it, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/schedule/test/customDirectory.test.ts b/plugins/schedule/test/customDirectory.test.ts index 63020a185c..c2a8708ebc 100644 --- a/plugins/schedule/test/customDirectory.test.ts +++ b/plugins/schedule/test/customDirectory.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures, getLogContent, contains, getScheduleLogContent } from './utils.ts'; diff --git a/plugins/schedule/test/customType.test.ts b/plugins/schedule/test/customType.test.ts index 3a8c92b3d6..f3c6332daf 100644 --- a/plugins/schedule/test/customType.test.ts +++ b/plugins/schedule/test/customType.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures, getLogContent, contains } from './utils.ts'; diff --git a/plugins/schedule/test/customTypeError.test.ts b/plugins/schedule/test/customTypeError.test.ts index 9adee88674..700b8561a3 100644 --- a/plugins/schedule/test/customTypeError.test.ts +++ b/plugins/schedule/test/customTypeError.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures, getLogContent, contains } from './utils.ts'; diff --git a/plugins/schedule/test/customTypeParams.test.ts b/plugins/schedule/test/customTypeParams.test.ts index 206a803c72..b84e35591d 100644 --- a/plugins/schedule/test/customTypeParams.test.ts +++ b/plugins/schedule/test/customTypeParams.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures, contains, getLogContent } from './utils.ts'; diff --git a/plugins/schedule/test/customTypePlugin.test.ts b/plugins/schedule/test/customTypePlugin.test.ts index b08146a59d..3208bacf78 100644 --- a/plugins/schedule/test/customTypePlugin.test.ts +++ b/plugins/schedule/test/customTypePlugin.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures, getLogContent, contains } from './utils.ts'; diff --git a/plugins/schedule/test/customTypeWithoutStart.test.ts b/plugins/schedule/test/customTypeWithoutStart.test.ts index f94f0c9d7c..856a01b679 100644 --- a/plugins/schedule/test/customTypeWithoutStart.test.ts +++ b/plugins/schedule/test/customTypeWithoutStart.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures, getLogContent, contains } from './utils.ts'; diff --git a/plugins/schedule/test/detect-error.test.ts b/plugins/schedule/test/detect-error.test.ts index 6cc6504aef..ea9aca665b 100644 --- a/plugins/schedule/test/detect-error.test.ts +++ b/plugins/schedule/test/detect-error.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures, getScheduleLogContent, contains } from './utils.ts'; diff --git a/plugins/schedule/test/dynamic.test.ts b/plugins/schedule/test/dynamic.test.ts index 6128a02544..99d8130864 100644 --- a/plugins/schedule/test/dynamic.test.ts +++ b/plugins/schedule/test/dynamic.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { contains, getFixtures, getLogContent } from './utils.ts'; diff --git a/plugins/schedule/test/env.test.ts b/plugins/schedule/test/env.test.ts index 29c0572357..14b9faf881 100644 --- a/plugins/schedule/test/env.test.ts +++ b/plugins/schedule/test/env.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures, getCoreLogContent, contains, getScheduleLogContent } from './utils.ts'; diff --git a/plugins/schedule/test/executeError-task-generator.test.ts b/plugins/schedule/test/executeError-task-generator.test.ts index 68a34acb92..2874e7945b 100644 --- a/plugins/schedule/test/executeError-task-generator.test.ts +++ b/plugins/schedule/test/executeError-task-generator.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll } from 'vitest'; +import { describe, it, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/schedule/test/executeError.test.ts b/plugins/schedule/test/executeError.test.ts index 12f6011464..92e016d109 100644 --- a/plugins/schedule/test/executeError.test.ts +++ b/plugins/schedule/test/executeError.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { contains, getFixtures, getScheduleLogContent } from './utils.ts'; diff --git a/plugins/schedule/test/immediate.test.ts b/plugins/schedule/test/immediate.test.ts index 0843b5fde9..ca540958ac 100644 --- a/plugins/schedule/test/immediate.test.ts +++ b/plugins/schedule/test/immediate.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { contains, getFixtures, getLogContent } from './utils.ts'; diff --git a/plugins/schedule/test/safe-timers.test.ts b/plugins/schedule/test/safe-timers.test.ts index 9048ecee74..06f002a87f 100644 --- a/plugins/schedule/test/safe-timers.test.ts +++ b/plugins/schedule/test/safe-timers.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { contains, getAgentLogContent, getFixtures, getLogContent } from './utils.ts'; diff --git a/plugins/schedule/test/schedule-plugin.test.ts b/plugins/schedule/test/schedule-plugin.test.ts index 051f6590ee..db70f1fb08 100644 --- a/plugins/schedule/test/schedule-plugin.test.ts +++ b/plugins/schedule/test/schedule-plugin.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures, getLogContent, contains } from './utils.ts'; diff --git a/plugins/schedule/test/schedule-type-worker1.test.ts b/plugins/schedule/test/schedule-type-worker1.test.ts index 4493fa575b..a78fd4495f 100644 --- a/plugins/schedule/test/schedule-type-worker1.test.ts +++ b/plugins/schedule/test/schedule-type-worker1.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { contains, getFixtures, getLogContent, getScheduleLogContent } from './utils.ts'; diff --git a/plugins/schedule/test/schedule-type-worker2.test.ts b/plugins/schedule/test/schedule-type-worker2.test.ts index 8cd7d326c0..f161ab8f41 100644 --- a/plugins/schedule/test/schedule-type-worker2.test.ts +++ b/plugins/schedule/test/schedule-type-worker2.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures, getLogContent } from './utils.ts'; diff --git a/plugins/schedule/test/schedule.test.ts b/plugins/schedule/test/schedule.test.ts index 67ff54ece2..46e4af8edb 100644 --- a/plugins/schedule/test/schedule.test.ts +++ b/plugins/schedule/test/schedule.test.ts @@ -4,7 +4,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; import { importResolve } from '@eggjs/utils'; -import { describe, it, afterEach, expect } from 'vitest'; +import { describe, it, afterEach, expect } from 'vite-plus/test'; import { contains, getFixtures, getLogContent } from './utils.ts'; diff --git a/plugins/schedule/test/scheduleError.test.ts b/plugins/schedule/test/scheduleError.test.ts index b307f681be..cb9f706fa7 100644 --- a/plugins/schedule/test/scheduleError.test.ts +++ b/plugins/schedule/test/scheduleError.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll } from 'vitest'; +import { describe, it, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/schedule/test/stop.test.ts b/plugins/schedule/test/stop.test.ts index 06b1c20e3d..edfef452aa 100644 --- a/plugins/schedule/test/stop.test.ts +++ b/plugins/schedule/test/stop.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { contains, getFixtures, getLogContent } from './utils.ts'; diff --git a/plugins/schedule/test/subscription.test.ts b/plugins/schedule/test/subscription.test.ts index 85c41a651e..958180586b 100644 --- a/plugins/schedule/test/subscription.test.ts +++ b/plugins/schedule/test/subscription.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { contains, getFixtures, getLogContent } from './utils.ts'; diff --git a/plugins/schedule/test/typeUndefined.test.ts b/plugins/schedule/test/typeUndefined.test.ts index 37b8a9fba1..07baf2d0f3 100644 --- a/plugins/schedule/test/typeUndefined.test.ts +++ b/plugins/schedule/test/typeUndefined.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll } from 'vitest'; +import { describe, it, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/schedule/test/unknown.test.ts b/plugins/schedule/test/unknown.test.ts index 3f87f3773d..d63564f8e9 100644 --- a/plugins/schedule/test/unknown.test.ts +++ b/plugins/schedule/test/unknown.test.ts @@ -1,7 +1,7 @@ import { setTimeout as sleep } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures, getScheduleLogContent } from './utils.ts'; diff --git a/plugins/schedule/vitest.config.ts b/plugins/schedule/vitest.config.ts index d34001c8b2..12a05b8c6b 100644 --- a/plugins/schedule/vitest.config.ts +++ b/plugins/schedule/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject } from 'vitest/config'; +import { defineProject } from 'vite-plus'; export default defineProject({ test: { diff --git a/plugins/security/test/app/extends/cliFilter.test.ts b/plugins/security/test/app/extends/cliFilter.test.ts index e042ba2ad1..046a0ae70a 100644 --- a/plugins/security/test/app/extends/cliFilter.test.ts +++ b/plugins/security/test/app/extends/cliFilter.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeAll, afterAll, describe, it } from 'vitest'; +import { beforeAll, afterAll, describe, it } from 'vite-plus/test'; import { getFixtures } from '../../utils.ts'; diff --git a/plugins/security/test/app/extends/escapeShellArg.test.ts b/plugins/security/test/app/extends/escapeShellArg.test.ts index a1515e7559..5e35fe98e5 100644 --- a/plugins/security/test/app/extends/escapeShellArg.test.ts +++ b/plugins/security/test/app/extends/escapeShellArg.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeAll, afterAll, describe, it } from 'vitest'; +import { beforeAll, afterAll, describe, it } from 'vite-plus/test'; import { getFixtures } from '../../utils.ts'; diff --git a/plugins/security/test/app/extends/escapeShellCmd.test.ts b/plugins/security/test/app/extends/escapeShellCmd.test.ts index a30f2a5f00..ce29496150 100644 --- a/plugins/security/test/app/extends/escapeShellCmd.test.ts +++ b/plugins/security/test/app/extends/escapeShellCmd.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeAll, afterAll, describe, it } from 'vitest'; +import { beforeAll, afterAll, describe, it } from 'vite-plus/test'; import { getFixtures } from '../../utils.ts'; diff --git a/plugins/security/test/app/extends/helper.test.ts b/plugins/security/test/app/extends/helper.test.ts index b6cdff61dd..ff93a5b74a 100644 --- a/plugins/security/test/app/extends/helper.test.ts +++ b/plugins/security/test/app/extends/helper.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'node:assert'; import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeAll, afterAll, describe, it } from 'vitest'; +import { beforeAll, afterAll, describe, it } from 'vite-plus/test'; import { getFixtures } from '../../utils.ts'; diff --git a/plugins/security/test/app/extends/sjs.test.ts b/plugins/security/test/app/extends/sjs.test.ts index ff1a4ce3f0..37e5116a70 100644 --- a/plugins/security/test/app/extends/sjs.test.ts +++ b/plugins/security/test/app/extends/sjs.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeAll, afterAll, describe, it } from 'vitest'; +import { beforeAll, afterAll, describe, it } from 'vite-plus/test'; import { getFixtures } from '../../utils.ts'; diff --git a/plugins/security/test/app/extends/sjson.test.ts b/plugins/security/test/app/extends/sjson.test.ts index 830f7314c4..1084499938 100644 --- a/plugins/security/test/app/extends/sjson.test.ts +++ b/plugins/security/test/app/extends/sjson.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeAll, afterAll, describe, it } from 'vitest'; +import { beforeAll, afterAll, describe, it } from 'vite-plus/test'; import { getFixtures } from '../../utils.ts'; diff --git a/plugins/security/test/app/extends/spath.test.ts b/plugins/security/test/app/extends/spath.test.ts index 8329b02542..82f93ae7de 100644 --- a/plugins/security/test/app/extends/spath.test.ts +++ b/plugins/security/test/app/extends/spath.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { beforeAll, afterAll, describe, it } from 'vitest'; +import { beforeAll, afterAll, describe, it } from 'vite-plus/test'; import { getFixtures } from '../../utils.ts'; diff --git a/plugins/security/test/config/config.default.test.ts b/plugins/security/test/config/config.default.test.ts index 7f1ad8bd37..1770367458 100644 --- a/plugins/security/test/config/config.default.test.ts +++ b/plugins/security/test/config/config.default.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import config from '../../src/config/config.default.ts'; diff --git a/plugins/security/test/context.test.ts b/plugins/security/test/context.test.ts index b33bef6df1..4131b3c5ae 100644 --- a/plugins/security/test/context.test.ts +++ b/plugins/security/test/context.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, expect, afterAll, beforeAll } from 'vitest'; +import { describe, it, expect, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/csp.test.ts b/plugins/security/test/csp.test.ts index 380a2a3f60..6fbf6cb3a2 100644 --- a/plugins/security/test/csp.test.ts +++ b/plugins/security/test/csp.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, expect, afterAll, beforeAll } from 'vitest'; +import { describe, it, expect, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/csrf.test.ts b/plugins/security/test/csrf.test.ts index 08877a80f7..760239910b 100644 --- a/plugins/security/test/csrf.test.ts +++ b/plugins/security/test/csrf.test.ts @@ -1,6 +1,6 @@ import { mm, type MockApplication } from '@eggjs/mock'; import { TestAgent } from '@eggjs/supertest'; -import { describe, it, expect, afterAll, beforeAll, afterEach } from 'vitest'; +import { describe, it, expect, afterAll, beforeAll, afterEach } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/csrf_cookieDomain.test.ts b/plugins/security/test/csrf_cookieDomain.test.ts index bf32c75e7b..c6631f8fef 100644 --- a/plugins/security/test/csrf_cookieDomain.test.ts +++ b/plugins/security/test/csrf_cookieDomain.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll } from 'vitest'; +import { describe, it, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/dta.test.ts b/plugins/security/test/dta.test.ts index 1ab48592c7..f0968d0de5 100644 --- a/plugins/security/test/dta.test.ts +++ b/plugins/security/test/dta.test.ts @@ -1,7 +1,7 @@ import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, expect, afterAll, beforeAll } from 'vitest'; +import { describe, it, expect, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/hsts.test.ts b/plugins/security/test/hsts.test.ts index d86a5e87bc..3fc25601a0 100755 --- a/plugins/security/test/hsts.test.ts +++ b/plugins/security/test/hsts.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, expect, afterAll, beforeAll } from 'vitest'; +import { describe, it, expect, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/inject.test.ts b/plugins/security/test/inject.test.ts index 57c86e714d..9a3cbfa195 100644 --- a/plugins/security/test/inject.test.ts +++ b/plugins/security/test/inject.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, expect, afterAll, beforeAll } from 'vitest'; +import { describe, it, expect, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/lib/helper/surl.test.ts b/plugins/security/test/lib/helper/surl.test.ts index d39778977a..50d41391a9 100644 --- a/plugins/security/test/lib/helper/surl.test.ts +++ b/plugins/security/test/lib/helper/surl.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, expect } from 'vite-plus/test'; import { getFixtures } from '../../utils.ts'; diff --git a/plugins/security/test/method_not_allow.test.ts b/plugins/security/test/method_not_allow.test.ts index 350bd97fa8..5ffdb599d5 100644 --- a/plugins/security/test/method_not_allow.test.ts +++ b/plugins/security/test/method_not_allow.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll } from 'vitest'; +import { describe, it, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/noopen.test.ts b/plugins/security/test/noopen.test.ts index 984150103c..209e579f85 100644 --- a/plugins/security/test/noopen.test.ts +++ b/plugins/security/test/noopen.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, expect, afterAll, beforeAll } from 'vitest'; +import { describe, it, expect, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/nosniff.test.ts b/plugins/security/test/nosniff.test.ts index 83bb852049..1801e31e6e 100644 --- a/plugins/security/test/nosniff.test.ts +++ b/plugins/security/test/nosniff.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, expect, afterAll, beforeAll } from 'vitest'; +import { describe, it, expect, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/referrer.test.ts b/plugins/security/test/referrer.test.ts index c5af1f7618..90ca62f6da 100644 --- a/plugins/security/test/referrer.test.ts +++ b/plugins/security/test/referrer.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll } from 'vitest'; +import { describe, it, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/safe_redirect.test.ts b/plugins/security/test/safe_redirect.test.ts index 314f7b88c2..88d2aa0cc0 100644 --- a/plugins/security/test/safe_redirect.test.ts +++ b/plugins/security/test/safe_redirect.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll } from 'vitest'; +import { describe, it, afterAll, beforeAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/security.test.ts b/plugins/security/test/security.test.ts index 89ed50bd52..04b42e24c7 100644 --- a/plugins/security/test/security.test.ts +++ b/plugins/security/test/security.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/ssrf.test.ts b/plugins/security/test/ssrf.test.ts index e0e9346354..b994aaa186 100644 --- a/plugins/security/test/ssrf.test.ts +++ b/plugins/security/test/ssrf.test.ts @@ -1,7 +1,7 @@ import dns from 'node:dns'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect, afterEach } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect, afterEach } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/utils.test.ts b/plugins/security/test/utils.test.ts index 03c7e18c40..0808bbb2bd 100644 --- a/plugins/security/test/utils.test.ts +++ b/plugins/security/test/utils.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, expect, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, expect, afterEach } from 'vite-plus/test'; import * as utils from '../src/lib/utils.ts'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/xframe.test.ts b/plugins/security/test/xframe.test.ts index 6a249e3c16..dee230cc5c 100644 --- a/plugins/security/test/xframe.test.ts +++ b/plugins/security/test/xframe.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/test/xss.test.ts b/plugins/security/test/xss.test.ts index 3b59094909..0edec034aa 100644 --- a/plugins/security/test/xss.test.ts +++ b/plugins/security/test/xss.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/security/vitest.config.ts b/plugins/security/vitest.config.ts index d34001c8b2..12a05b8c6b 100644 --- a/plugins/security/vitest.config.ts +++ b/plugins/security/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject } from 'vitest/config'; +import { defineProject } from 'vite-plus'; export default defineProject({ test: { diff --git a/plugins/session/test/app/middleware/session.test.ts b/plugins/session/test/app/middleware/session.test.ts index 1a6e548b15..9cad6740fe 100644 --- a/plugins/session/test/app/middleware/session.test.ts +++ b/plugins/session/test/app/middleware/session.test.ts @@ -3,7 +3,7 @@ import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; import { request, TestAgent } from '@eggjs/supertest'; -import { describe, it, beforeEach, afterEach, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, beforeEach, afterEach, beforeAll, afterAll, expect } from 'vite-plus/test'; function getFixtures(name: string) { return path.join(import.meta.dirname, '../../fixtures', name); diff --git a/plugins/static/test/static.test.ts b/plugins/static/test/static.test.ts index 9905a2f153..640d1f89fc 100644 --- a/plugins/static/test/static.test.ts +++ b/plugins/static/test/static.test.ts @@ -2,7 +2,7 @@ import fs from 'node:fs/promises'; import path from 'node:path'; import { mock, type MockApplication } from '@eggjs/mock'; -import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { describe, it, expect, beforeAll, afterAll } from 'vite-plus/test'; export function getFixtures(filename: string): string { return path.join(import.meta.dirname, 'fixtures', filename); diff --git a/plugins/tracer/test/error.tracer.test.ts b/plugins/tracer/test/error.tracer.test.ts index 3d6f7371e3..496c6c8026 100644 --- a/plugins/tracer/test/error.tracer.test.ts +++ b/plugins/tracer/test/error.tracer.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/tracer/test/index.test.ts b/plugins/tracer/test/index.test.ts index c129d0aaa3..171aa77571 100644 --- a/plugins/tracer/test/index.test.ts +++ b/plugins/tracer/test/index.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import { Tracer } from '../src/index.ts'; diff --git a/plugins/tracer/test/plugin.test.ts b/plugins/tracer/test/plugin.test.ts index 0f431535cf..7bef6d9d6a 100644 --- a/plugins/tracer/test/plugin.test.ts +++ b/plugins/tracer/test/plugin.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/plugins/tracer/test/tracer.test.ts b/plugins/tracer/test/tracer.test.ts index 1b6f9bf151..714ee85a59 100644 --- a/plugins/tracer/test/tracer.test.ts +++ b/plugins/tracer/test/tracer.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, expect } from 'vite-plus/test'; import { isReady } from '../src/app/extend/application.ts'; import { getFixtures } from './utils.ts'; diff --git a/plugins/typebox-validate/test/index.test.ts b/plugins/typebox-validate/test/index.test.ts index 4b0904370e..67d0415f86 100644 --- a/plugins/typebox-validate/test/index.test.ts +++ b/plugins/typebox-validate/test/index.test.ts @@ -1,7 +1,7 @@ import path from 'node:path'; import { mock } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vite-plus/test'; import { Ajv } from '../src/index.ts'; diff --git a/plugins/view-nunjucks/test/index.test.ts b/plugins/view-nunjucks/test/index.test.ts index 798e39dc00..a593b99b95 100644 --- a/plugins/view-nunjucks/test/index.test.ts +++ b/plugins/view-nunjucks/test/index.test.ts @@ -1,4 +1,4 @@ -import { test, expect } from 'vitest'; +import { test, expect } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/plugins/view-nunjucks/test/view/cache.test.ts b/plugins/view-nunjucks/test/view/cache.test.ts index 6f35815883..f8c16fbe44 100644 --- a/plugins/view-nunjucks/test/view/cache.test.ts +++ b/plugins/view-nunjucks/test/view/cache.test.ts @@ -2,7 +2,7 @@ import fs from 'node:fs'; import path from 'node:path'; import { mock, mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, expect, beforeEach, afterEach } from 'vitest'; +import { describe, it, expect, beforeEach, afterEach } from 'vite-plus/test'; import { getFixtures } from '../utils.ts'; diff --git a/plugins/view-nunjucks/test/view/custom.test.ts b/plugins/view-nunjucks/test/view/custom.test.ts index 3f0e07f86d..ea3a23766a 100644 --- a/plugins/view-nunjucks/test/view/custom.test.ts +++ b/plugins/view-nunjucks/test/view/custom.test.ts @@ -1,7 +1,7 @@ import path from 'node:path'; import { mock, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vite-plus/test'; function getFixtures(name: string): string { return path.join(import.meta.dirname, '../fixtures', name); diff --git a/plugins/view-nunjucks/test/view/helper.test.ts b/plugins/view-nunjucks/test/view/helper.test.ts index 60157a647d..cbbd85c8c4 100644 --- a/plugins/view-nunjucks/test/view/helper.test.ts +++ b/plugins/view-nunjucks/test/view/helper.test.ts @@ -2,7 +2,7 @@ import path from 'node:path'; import { mock, type MockApplication } from '@eggjs/mock'; import { stripIndent } from 'common-tags'; -import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vite-plus/test'; function getFixtures(name: string): string { return path.join(import.meta.dirname, '../fixtures', name); diff --git a/plugins/view-nunjucks/test/view/security.test.ts b/plugins/view-nunjucks/test/view/security.test.ts index 177a321b5d..e14b09adc3 100644 --- a/plugins/view-nunjucks/test/view/security.test.ts +++ b/plugins/view-nunjucks/test/view/security.test.ts @@ -3,7 +3,7 @@ import path from 'node:path'; import { mock, type MockApplication } from '@eggjs/mock'; import { load } from 'cheerio'; import { stripIndent } from 'common-tags'; -import { describe, it, expect, beforeAll, afterAll, afterEach } from 'vitest'; +import { describe, it, expect, beforeAll, afterAll, afterEach } from 'vite-plus/test'; function getFixtures(name: string): string { return path.join(import.meta.dirname, '../fixtures', name); diff --git a/plugins/view-nunjucks/test/view/view.test.ts b/plugins/view-nunjucks/test/view/view.test.ts index 5c4b5e98b6..722961e9c1 100644 --- a/plugins/view-nunjucks/test/view/view.test.ts +++ b/plugins/view-nunjucks/test/view/view.test.ts @@ -1,5 +1,5 @@ import { mock, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vite-plus/test'; import { getFixtures } from '../utils.ts'; diff --git a/plugins/view-nunjucks/vitest.config.ts b/plugins/view-nunjucks/vitest.config.ts index 60eaf9856d..ab6954ec8d 100644 --- a/plugins/view-nunjucks/vitest.config.ts +++ b/plugins/view-nunjucks/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject, type UserWorkspaceConfig } from 'vitest/config'; +import { defineProject, type UserWorkspaceConfig } from 'vite-plus'; const config: UserWorkspaceConfig = defineProject({ test: { diff --git a/plugins/view/test/view.test.ts b/plugins/view/test/view.test.ts index 446c53d0b8..78dded29e7 100644 --- a/plugins/view/test/view.test.ts +++ b/plugins/view/test/view.test.ts @@ -2,7 +2,7 @@ import fs from 'node:fs/promises'; import path from 'node:path'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, afterEach, expect } from 'vite-plus/test'; import { ViewEngineBase } from '../src/index.ts'; diff --git a/plugins/view/vitest.config.ts b/plugins/view/vitest.config.ts index d34001c8b2..12a05b8c6b 100644 --- a/plugins/view/vitest.config.ts +++ b/plugins/view/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject } from 'vitest/config'; +import { defineProject } from 'vite-plus'; export default defineProject({ test: { diff --git a/plugins/watcher/test/development.test.ts b/plugins/watcher/test/development.test.ts index 3b98826c18..cb6de988a5 100644 --- a/plugins/watcher/test/development.test.ts +++ b/plugins/watcher/test/development.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs'; import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeEach, afterEach } from 'vitest'; +import { describe, it, beforeEach, afterEach } from 'vite-plus/test'; import { getFilePath } from './utils.js'; diff --git a/plugins/watcher/test/development_cluster.test.ts b/plugins/watcher/test/development_cluster.test.ts index f08371bbda..28c08c8126 100644 --- a/plugins/watcher/test/development_cluster.test.ts +++ b/plugins/watcher/test/development_cluster.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs'; import { scheduler } from 'node:timers/promises'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, beforeEach, afterEach } from 'vitest'; +import { describe, it, beforeEach, afterEach } from 'vite-plus/test'; import { getFilePath } from './utils.js'; diff --git a/plugins/watcher/test/index.test.ts b/plugins/watcher/test/index.test.ts index 411bda6e6a..784e518cdc 100644 --- a/plugins/watcher/test/index.test.ts +++ b/plugins/watcher/test/index.test.ts @@ -1,4 +1,4 @@ -import { test, expect } from 'vitest'; +import { test, expect } from 'vite-plus/test'; import * as watcher from '../src/index.ts'; diff --git a/plugins/watcher/test/watcher.test.ts b/plugins/watcher/test/watcher.test.ts index 347c64300c..4fcd20ae26 100644 --- a/plugins/watcher/test/watcher.test.ts +++ b/plugins/watcher/test/watcher.test.ts @@ -2,7 +2,7 @@ import { strict as assert } from 'node:assert'; import fs from 'node:fs'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import type { ChangeInfo } from '../src/index.ts'; import { getFilePath } from './utils.ts'; diff --git a/plugins/watcher/vitest.config.ts b/plugins/watcher/vitest.config.ts index d34001c8b2..12a05b8c6b 100644 --- a/plugins/watcher/vitest.config.ts +++ b/plugins/watcher/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject } from 'vitest/config'; +import { defineProject } from 'vite-plus'; export default defineProject({ test: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 08d4bb1ca6..0cfd52fc1c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -456,15 +456,6 @@ catalogs: oxc-minify: specifier: ^0.105.0 version: 0.105.0 - oxfmt: - specifier: ^0.20.0 - version: 0.20.0 - oxlint: - specifier: ^1.32.0 - version: 1.32.0 - oxlint-tsgolint: - specifier: ^0.11.0 - version: 0.11.0 parseurl: specifier: ^1.3.3 version: 1.3.3 @@ -540,9 +531,6 @@ catalogs: tsconfig-paths: specifier: ^4.2.0 version: 4.2.0 - tsdown: - specifier: ^0.18.2 - version: 0.18.2 tsx: specifier: 4.20.6 version: 4.20.6 @@ -570,15 +558,15 @@ catalogs: vary: specifier: ^1.1.2 version: 1.1.2 + vite-plus: + specifier: latest + version: 0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761 vitepress: specifier: 2.0.0-alpha.15 version: 2.0.0-alpha.15 vitepress-plugin-llms: specifier: ^1.10.0 version: 1.10.0 - vitest: - specifier: ^4.0.15 - version: 4.0.15 xss: specifier: ^1.0.15 version: 1.0.15 @@ -594,7 +582,8 @@ catalogs: version: 1.9.0 overrides: - vite: npm:rolldown-vite@^7.1.13 + vite: npm:@voidzero-dev/vite-plus-core@latest + vitest: npm:@voidzero-dev/vite-plus-test@latest importers: @@ -617,10 +606,10 @@ importers: version: 7.0.0-dev.20251223.1 '@vitest/coverage-v8': specifier: 'catalog:' - version: 4.0.15(vitest@4.0.15) + version: 4.0.15(@voidzero-dev/vite-plus-test@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761) '@vitest/ui': specifier: 'catalog:' - version: 4.0.15(vitest@4.0.15) + version: 4.0.15(@voidzero-dev/vite-plus-test@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761) c8: specifier: 'catalog:' version: 10.1.3 @@ -636,15 +625,6 @@ importers: mocha: specifier: 'catalog:' version: 11.7.5 - oxfmt: - specifier: 'catalog:' - version: 0.20.0 - oxlint: - specifier: 'catalog:' - version: 1.32.0(oxlint-tsgolint@0.11.0) - oxlint-tsgolint: - specifier: 'catalog:' - version: 0.11.0 publint: specifier: 'catalog:' version: 0.3.16 @@ -654,9 +634,6 @@ importers: semver: specifier: 'catalog:' version: 7.7.3 - tsdown: - specifier: 'catalog:' - version: 0.18.2(@typescript/native-preview@7.0.0-dev.20251223.1)(oxc-resolver@11.10.0)(publint@0.3.16)(typescript@5.9.3)(unplugin-unused@0.5.4) tsx: specifier: 'catalog:' version: 4.20.6 @@ -666,9 +643,12 @@ importers: urllib: specifier: 'catalog:' version: 4.8.2 - vitest: + vite-plus: specifier: 'catalog:' - version: 4.0.15(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2) + version: 0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2) + vitest: + specifier: npm:@voidzero-dev/vite-plus-test@latest + version: '@voidzero-dev/vite-plus-test@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2)' examples/helloworld-commonjs: dependencies: @@ -701,15 +681,15 @@ importers: '@eggjs/tsconfig': specifier: workspace:* version: link:../../packages/tsconfig - tsdown: - specifier: 'catalog:' - version: 0.18.2(@typescript/native-preview@7.0.0-dev.20251223.1)(oxc-resolver@11.10.0)(publint@0.3.16)(typescript@5.9.3)(unplugin-unused@0.5.4) typescript: specifier: 'catalog:' version: 5.9.3 - vitest: + vite-plus: specifier: 'catalog:' - version: 4.0.15(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2) + version: 0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2) + vitest: + specifier: npm:@voidzero-dev/vite-plus-test@latest + version: '@voidzero-dev/vite-plus-test@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2)' examples/helloworld-typescript: dependencies: @@ -732,15 +712,15 @@ importers: '@eggjs/tsconfig': specifier: workspace:* version: link:../../packages/tsconfig - tsdown: - specifier: 'catalog:' - version: 0.18.2(@typescript/native-preview@7.0.0-dev.20251223.1)(oxc-resolver@11.10.0)(publint@0.3.16)(typescript@5.9.3)(unplugin-unused@0.5.4) typescript: specifier: 'catalog:' version: 5.9.3 - vitest: + vite-plus: specifier: 'catalog:' - version: 4.0.15(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2) + version: 0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2) + vitest: + specifier: npm:@voidzero-dev/vite-plus-test@latest + version: '@voidzero-dev/vite-plus-test@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2)' packages/cluster: dependencies: @@ -796,18 +776,18 @@ importers: coffee: specifier: 'catalog:' version: 5.5.1 - tsdown: - specifier: 'catalog:' - version: 0.18.2(@typescript/native-preview@7.0.0-dev.20251223.1)(oxc-resolver@11.10.0)(publint@0.3.16)(typescript@5.9.3)(unplugin-unused@0.5.4) typescript: specifier: 'catalog:' version: 5.9.3 urllib: specifier: 'catalog:' version: 4.8.2 - vitest: + vite-plus: specifier: 'catalog:' - version: 4.0.15(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2) + version: 0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2) + vitest: + specifier: npm:@voidzero-dev/vite-plus-test@latest + version: '@voidzero-dev/vite-plus-test@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2)' packages/cookies: dependencies: @@ -1983,7 +1963,7 @@ importers: dependencies: vitepress: specifier: 'catalog:' - version: 2.0.0-alpha.15(@types/node@24.10.2)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(nprogress@0.2.0)(oxc-minify@0.105.0)(postcss@8.5.6)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.2) + version: 2.0.0-alpha.15(@types/node@24.10.2)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(nprogress@0.2.0)(oxc-minify@0.105.0)(postcss@8.5.6)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2) vitepress-plugin-llms: specifier: 'catalog:' version: 1.10.0 @@ -3358,25 +3338,21 @@ importers: mm: specifier: 'catalog:' version: 4.0.2 - tsdown: - specifier: 'catalog:' - version: 0.18.2(@typescript/native-preview@7.0.0-dev.20251223.1)(oxc-resolver@11.10.0)(publint@0.3.16)(typescript@5.9.3)(unplugin-unused@0.5.4) typescript: specifier: 'catalog:' version: 5.9.3 urllib: specifier: 'catalog:' version: 4.8.2 - vitest: + vite-plus: specifier: 'catalog:' - version: 4.0.15(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2) + version: 0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2) + vitest: + specifier: npm:@voidzero-dev/vite-plus-test@latest + version: '@voidzero-dev/vite-plus-test@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2)' packages: - '@babel/generator@7.28.5': - resolution: {integrity: sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.27.1': resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} @@ -4014,15 +3990,12 @@ packages: cpu: [x64] os: [win32] - '@oxc-project/runtime@0.101.0': - resolution: {integrity: sha512-t3qpfVZIqSiLQ5Kqt/MC4Ge/WCOGrrcagAdzTcDaggupjiGxUx4nJF2v6wUCXWSzWHn5Ns7XLv13fCJEwCOERQ==} + '@oxc-project/runtime@0.108.0': + resolution: {integrity: sha512-J1cESY4anMO4i9KtCPmCfQAzAR00Uw4SWsDPFP10CIwDMugkh34UrTKByuYKuPaHy0XAk8LlJiZJq2OLMfbuIQ==} engines: {node: ^20.19.0 || >=22.12.0} - '@oxc-project/types@0.101.0': - resolution: {integrity: sha512-nuFhqlUzJX+gVIPPfuE6xurd4lST3mdcWOhyK/rZO0B9XWMKm79SuszIQEnSMmmDhq1DC8WWVYGVd+6F93o1gQ==} - - '@oxc-project/types@0.103.0': - resolution: {integrity: sha512-bkiYX5kaXWwUessFRSoXFkGIQTmc6dLGdxuRTrC+h8PSnIdZyuXHHlLAeTmOue5Br/a0/a7dHH0Gca6eXn9MKg==} + '@oxc-project/types@0.108.0': + resolution: {integrity: sha512-7lf13b2IA/kZO6xgnIZA88sq3vwrxWk+2vxf6cc+omwYCRTiA5e63Beqf3fz/v8jEviChWWmFYBwzfSeyrsj7Q==} '@oxc-resolver/binding-android-arm-eabi@11.10.0': resolution: {integrity: sha512-qvSSjeeBvYh3KlpMwDbLr0m/bmEfEzaAv2yW4RnYDGrsFVgTHlNc3WzQSji0+Bf2g3kLgyZ5pwylaJpS9baUIA==} @@ -4127,77 +4100,77 @@ packages: cpu: [x64] os: [win32] - '@oxfmt/darwin-arm64@0.20.0': - resolution: {integrity: sha512-bjR5dqvrd9gxKYfYR0ljUu3/T3+TuDVWcwA7d+tsfmx9lqidlw3zhgBTblnjF1mrd1zkPMoc5zzq86GeSEt1cA==} + '@oxfmt/darwin-arm64@0.16.0': + resolution: {integrity: sha512-I+Unj7wePcUTK7p/YKtgbm4yer6dw7dTlmCJa0UilFZyge5uD4rwCSfSDx3A+a6Z3A60/SqXMbNR2UyidWF4Cg==} cpu: [arm64] os: [darwin] - '@oxfmt/darwin-x64@0.20.0': - resolution: {integrity: sha512-esUDes8FlJX3IY4TVjFLgZrnZlIIyPDlhkCaHgGR3+z2eHFZOvQu68kTSpZLCEJmGXdSpU5rlveycQ6n8tk9ew==} + '@oxfmt/darwin-x64@0.16.0': + resolution: {integrity: sha512-EfiXFKEOV5gXgEatFK89OOoSmd8E9Xq83TcjPLWQNFBO4cgaQsfKmctpgJmJjQnoUwD7nQsm0ruj3ae7Gva8QA==} cpu: [x64] os: [darwin] - '@oxfmt/linux-arm64-gnu@0.20.0': - resolution: {integrity: sha512-irE0RO9B0R6ziQE6kUVZtZ6IuTdRyuumn1cPWhDfpa0XUa5sE0ly8pjVsvJbj/J9qerVtidU05txeXBB5CirQg==} + '@oxfmt/linux-arm64-gnu@0.16.0': + resolution: {integrity: sha512-ydcNY9Fn/8TjVswANhdSh+zdgD3tiikNQA68bgXbENHuV3RyYql1qoOM1eGv5xeIVJfkPJme17MKQz3OwMFS4A==} cpu: [arm64] os: [linux] libc: [glibc] - '@oxfmt/linux-arm64-musl@0.20.0': - resolution: {integrity: sha512-eXPBLwYJm26DCmwMwhelEwQMRwuGNaYhYZOhd+CYYsmVoF+h6L6dtjwj0Ovuu0Gqh18EL8vfsaoUvb+jr3vEBg==} + '@oxfmt/linux-arm64-musl@0.16.0': + resolution: {integrity: sha512-I9WeYe1/YnrfXgXVaKkZITZzil0G0g9IknS2KJbq1lOnpTw3dwViXZ7XMa2cq6Mv7S+4SoDImb7fLQ59AfVX/w==} cpu: [arm64] os: [linux] libc: [musl] - '@oxfmt/linux-x64-gnu@0.20.0': - resolution: {integrity: sha512-dTPW38Hjgb7LoD2mNgyQGBaJ1hu5YgPrxImhl5Eb04eiws+ETCM0wrb2TWGduA+Nv3rHKn3vZEkMTEjklZXgRw==} + '@oxfmt/linux-x64-gnu@0.16.0': + resolution: {integrity: sha512-Szg9lJtZdN5FoCnNbl3N/2pJv8d056NUmk51m60E2tZV7rvwRTrNC8HPc2sVdb1Ti5ogsicpZDYSWA3cwIrJIQ==} cpu: [x64] os: [linux] libc: [glibc] - '@oxfmt/linux-x64-musl@0.20.0': - resolution: {integrity: sha512-b4duw9JGDK/kZoqrPNU9tBOOZQdUW8KJPZ7gW7z54X1eGSqCJ1PT0XLNmZ7SOA1BzQwQ0a3qmQWfFVOsH3a5bw==} + '@oxfmt/linux-x64-musl@0.16.0': + resolution: {integrity: sha512-5koN8nl21ZxOADaMxXHT+mt3YjfXe1nsa23Fanf9aY7B0hcQ6rXYCZ7r5vmpoTtzW/US3aaVcRFZE1cyof+lKw==} cpu: [x64] os: [linux] libc: [musl] - '@oxfmt/win32-arm64@0.20.0': - resolution: {integrity: sha512-XAzvBhw4K+Fe16dBaFgYAdob9WaM8RYEXl0ibbm5NlNaQEq+5bH9xwc0oaYlHFnLfcgXWmn9ceTAYqNlONQRNA==} + '@oxfmt/win32-arm64@0.16.0': + resolution: {integrity: sha512-Jaesn+FYn+MudSmWJMPGBAa0PhQXo52Z0ZYeNfzbQP7v2GFbZBI3Cb87+K0aHGlpqK3VEJKXeIaASaTWlkgO1Q==} cpu: [arm64] os: [win32] - '@oxfmt/win32-x64@0.20.0': - resolution: {integrity: sha512-fkJqHbJaoOMRmrjHSljyb4/7BgXO3xPLBsJSFGtm3mpfW0HHFbAKvd4/6njhqJz9KY+b3RWP1WssjFshcqQQ4w==} + '@oxfmt/win32-x64@0.16.0': + resolution: {integrity: sha512-1obVSlb5blwBKgSsE1mNxvcq1pK9I6aXpZDy5d6jjGdrru33dHrH1ASChrcxwCukkToH2SxwYmnzAto0xeuZlw==} cpu: [x64] os: [win32] - '@oxlint-tsgolint/darwin-arm64@0.11.0': - resolution: {integrity: sha512-F67T8dXgYIrgv6wpd52fKQFdmieSOHaxBkscgso64YdtEHrV3s52ASiZGNzw62TKihn9Ox9ek3PYx9XsxIJDUw==} + '@oxlint-tsgolint/darwin-arm64@0.8.6': + resolution: {integrity: sha512-khvQiNpPVNkyz6vmN50v5j1X6r9anRDXy3htDBpObx4V5bp33BK94onh46e91GTEbBevmeUG/Zm/U3+np4gehw==} cpu: [arm64] os: [darwin] - '@oxlint-tsgolint/darwin-x64@0.11.0': - resolution: {integrity: sha512-z44LO7+3z2mtcBxA9T66yEy/otp/2r5ypbkx7EYlPwbEqBAIDRt/8hqQ9/BUC//1qE549P1cBU6NjhgeyuXjYQ==} + '@oxlint-tsgolint/darwin-x64@0.8.6': + resolution: {integrity: sha512-AardvXBLB0m05BGcubXTqWSpNv2aD68QyY7BB/u2AqKzMoEtvzSB710FL06vOTPpaVpl3GvSVHCFw2juo35lTQ==} cpu: [x64] os: [darwin] - '@oxlint-tsgolint/linux-arm64@0.11.0': - resolution: {integrity: sha512-IeIjmpPi2j2Dn1CRizGikysyLp9B0q3jqiAalv9ewRyb8hqQW5YeMlsswo8pHd0Hz3KyFfone0NkvBt77Ex2pg==} + '@oxlint-tsgolint/linux-arm64@0.8.6': + resolution: {integrity: sha512-oSgMIilQBUVSOGdWIm4/5GJV4QmqwBQYpsGtRUpTAd3BZTWVuo40//n/ogJFnlCVd+i4yhsGLtwexd/7YlJ9sw==} cpu: [arm64] os: [linux] - '@oxlint-tsgolint/linux-x64@0.11.0': - resolution: {integrity: sha512-fpYGYU2pXjaXYnKgWrihFXE8zJiTRjYKSHAaBaVI056oqKjKGEoU2BfFbddpBrKgz9TmSOX/NGftrJnyMn1wXQ==} + '@oxlint-tsgolint/linux-x64@0.8.6': + resolution: {integrity: sha512-EhR2TejCW5gBPEs6ASgfFFgdveHvpKOHQC2zbO3HoFT/xNU0DvYbEsScKM8SUDWFMQlHU67A7bynNGRY2kFSSg==} cpu: [x64] os: [linux] - '@oxlint-tsgolint/win32-arm64@0.11.0': - resolution: {integrity: sha512-37nzks9eqBt7NYE6okquu51vaqMruF5voX475L16Y8asJVCGpO/2VSy3ulYAXhZ+5Kdc8ZgrljVViJOjfPEPaA==} + '@oxlint-tsgolint/win32-arm64@0.8.6': + resolution: {integrity: sha512-PQeV8YitT2HR/uJV8ugERIpA4WHDem7i5TuPtgYrp7wvKS98G9ILpnPgATrOup/VdBMIzCDl02c23z4+I5NSTw==} cpu: [arm64] os: [win32] - '@oxlint-tsgolint/win32-x64@0.11.0': - resolution: {integrity: sha512-TsK4C61+mjmbkUJ3Q3E9Ev3VFbeI6prPEAm9FAOq8VsfUGEiIUBBjrZ8ysGoQXNiU3dCKpmu012ptVUZTk5/eg==} + '@oxlint-tsgolint/win32-x64@0.8.6': + resolution: {integrity: sha512-JDlyJSOnJXahee9xL55gT02kmQGSP0hR/5OP5asXvr7q6dj9t4skltcwYiA+D4HthF04oaW1F0+6pJnNTfDE0w==} cpu: [x64] os: [win32] @@ -4347,180 +4320,9 @@ packages: resolution: {integrity: sha512-S+9ANAvUmjutrshV4jZjaiG8XQyuJIZ8a4utWmN/vW1sgQ9IfBnPndwkmQYw53QmouOIytT874u65HEmu6H5jw==} engines: {node: '>=18'} - '@quansync/fs@1.0.0': - resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==} - - '@rolldown/binding-android-arm64@1.0.0-beta.53': - resolution: {integrity: sha512-Ok9V8o7o6YfSdTTYA/uHH30r3YtOxLD6G3wih/U9DO0ucBBFq8WPt/DslU53OgfteLRHITZny9N/qCUxMf9kjQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [android] - - '@rolldown/binding-android-arm64@1.0.0-beta.55': - resolution: {integrity: sha512-5cPpHdO+zp+klznZnIHRO1bMHDq5hS9cqXodEKAaa/dQTPDjnE91OwAsy3o1gT2x4QaY8NzdBXAvutYdaw0WeA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [android] - - '@rolldown/binding-darwin-arm64@1.0.0-beta.53': - resolution: {integrity: sha512-yIsKqMz0CtRnVa6x3Pa+mzTihr4Ty+Z6HfPbZ7RVbk1Uxnco4+CUn7Qbm/5SBol1JD/7nvY8rphAgyAi7Lj6Vg==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [darwin] - - '@rolldown/binding-darwin-arm64@1.0.0-beta.55': - resolution: {integrity: sha512-l0887CGU2SXZr0UJmeEcXSvtDCOhDTTYXuoWbhrEJ58YQhQk24EVhDhHMTyjJb1PBRniUgNc1G0T51eF8z+TWw==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [darwin] - - '@rolldown/binding-darwin-x64@1.0.0-beta.53': - resolution: {integrity: sha512-GTXe+mxsCGUnJOFMhfGWmefP7Q9TpYUseHvhAhr21nCTgdS8jPsvirb0tJwM3lN0/u/cg7bpFNa16fQrjKrCjQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [darwin] - - '@rolldown/binding-darwin-x64@1.0.0-beta.55': - resolution: {integrity: sha512-d7qP2AVYzN0tYIP4vJ7nmr26xvmlwdkLD/jWIc9Z9dqh5y0UGPigO3m5eHoHq9BNazmwdD9WzDHbQZyXFZjgtA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [darwin] - - '@rolldown/binding-freebsd-x64@1.0.0-beta.53': - resolution: {integrity: sha512-9Tmp7bBvKqyDkMcL4e089pH3RsjD3SUungjmqWtyhNOxoQMh0fSmINTyYV8KXtE+JkxYMPWvnEt+/mfpVCkk8w==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [freebsd] - - '@rolldown/binding-freebsd-x64@1.0.0-beta.55': - resolution: {integrity: sha512-j311E4NOB0VMmXHoDDZhrWidUf7L/Sa6bu/+i2cskvHKU40zcUNPSYeD2YiO2MX+hhDFa5bJwhliYfs+bTrSZw==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [freebsd] - - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.53': - resolution: {integrity: sha512-a1y5fiB0iovuzdbjUxa7+Zcvgv+mTmlGGC4XydVIsyl48eoxgaYkA3l9079hyTyhECsPq+mbr0gVQsFU11OJAQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm] - os: [linux] - - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.55': - resolution: {integrity: sha512-lAsaYWhfNTW2A/9O7zCpb5eIJBrFeNEatOS/DDOZ5V/95NHy50g4b/5ViCqchfyFqRb7MKUR18/+xWkIcDkeIw==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm] - os: [linux] - - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.53': - resolution: {integrity: sha512-bpIGX+ov9PhJYV+wHNXl9rzq4F0QvILiURn0y0oepbQx+7stmQsKA0DhPGwmhfvF856wq+gbM8L92SAa/CBcLg==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.55': - resolution: {integrity: sha512-2x6ffiVLZrQv7Xii9+JdtyT1U3bQhKj59K3eRnYlrXsKyjkjfmiDUVx2n+zSyijisUqD62fcegmx2oLLfeTkCA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.53': - resolution: {integrity: sha512-bGe5EBB8FVjHBR1mOLOPEFg1Lp3//7geqWkU5NIhxe+yH0W8FVrQ6WRYOap4SUTKdklD/dC4qPLREkMMQ855FA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.55': - resolution: {integrity: sha512-QbNncvqAXziya5wleI+OJvmceEE15vE4yn4qfbI/hwT/+8ZcqxyfRZOOh62KjisXxp4D0h3JZspycXYejxAU3w==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.53': - resolution: {integrity: sha512-qL+63WKVQs1CMvFedlPt0U9PiEKJOAL/bsHMKUDS6Vp2Q+YAv/QLPu8rcvkfIMvQ0FPU2WL0aX4eWwF6e/GAnA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.55': - resolution: {integrity: sha512-YZCTZZM+rujxwVc6A+QZaNMJXVtmabmFYLG2VGQTKaBfYGvBKUgtbMEttnp/oZ88BMi2DzadBVhOmfQV8SuHhw==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@rolldown/binding-linux-x64-musl@1.0.0-beta.53': - resolution: {integrity: sha512-VGl9JIGjoJh3H8Mb+7xnVqODajBmrdOOb9lxWXdcmxyI+zjB2sux69br0hZJDTyLJfvBoYm439zPACYbCjGRmw==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [linux] - libc: [musl] - - '@rolldown/binding-linux-x64-musl@1.0.0-beta.55': - resolution: {integrity: sha512-28q9OQ/DDpFh2keS4BVAlc3N65/wiqKbk5K1pgLdu/uWbKa8hgUJofhXxqO+a+Ya2HVTUuYHneWsI2u+eu3N5Q==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [linux] - libc: [musl] - - '@rolldown/binding-openharmony-arm64@1.0.0-beta.53': - resolution: {integrity: sha512-B4iIserJXuSnNzA5xBLFUIjTfhNy7d9sq4FUMQY3GhQWGVhS2RWWzzDnkSU6MUt7/aHUrep0CdQfXUJI9D3W7A==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [openharmony] - - '@rolldown/binding-openharmony-arm64@1.0.0-beta.55': - resolution: {integrity: sha512-LiCA4BjCnm49B+j1lFzUtlC+4ZphBv0d0g5VqrEJua/uyv9Ey1v9tiaMql1C8c0TVSNDUmrkfHQ71vuQC7YfpQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [openharmony] - - '@rolldown/binding-wasm32-wasi@1.0.0-beta.53': - resolution: {integrity: sha512-BUjAEgpABEJXilGq/BPh7jeU3WAJ5o15c1ZEgHaDWSz3LB881LQZnbNJHmUiM4d1JQWMYYyR1Y490IBHi2FPJg==} - engines: {node: '>=14.0.0'} - cpu: [wasm32] - - '@rolldown/binding-wasm32-wasi@1.0.0-beta.55': - resolution: {integrity: sha512-nZ76tY7T0Oe8vamz5Cv5CBJvrqeQxwj1WaJ2GxX8Msqs0zsQMMcvoyxOf0glnJlxxgKjtoBxAOxaAU8ERbW6Tg==} - engines: {node: '>=14.0.0'} - cpu: [wasm32] - - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.53': - resolution: {integrity: sha512-s27uU7tpCWSjHBnxyVXHt3rMrQdJq5MHNv3BzsewCIroIw3DJFjMH1dzCPPMUFxnh1r52Nf9IJ/eWp6LDoyGcw==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [win32] - - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.55': - resolution: {integrity: sha512-TFVVfLfhL1G+pWspYAgPK/FSqjiBtRKYX9hixfs508QVEZPQlubYAepHPA7kEa6lZXYj5ntzF87KC6RNhxo+ew==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [win32] - - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.53': - resolution: {integrity: sha512-cjWL/USPJ1g0en2htb4ssMjIycc36RvdQAx1WlXnS6DpULswiUTVXPDesTifSKYSyvx24E0YqQkEm0K/M2Z/AA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [win32] - - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.55': - resolution: {integrity: sha512-j1WBlk0p+ISgLzMIgl0xHp1aBGXenoK2+qWYc/wil2Vse7kVOdFq9aeQ8ahK6/oxX2teQ5+eDvgjdywqTL+daA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [win32] - '@rolldown/pluginutils@1.0.0-beta.29': resolution: {integrity: sha512-NIJgOsMjbxAXvoGq/X0gD7VPMQ8j9g0BiDaNjVNVjvl+iKXxL3Jre0v31RmBYeLEmkbj2s02v8vFTbUXi5XS2Q==} - '@rolldown/pluginutils@1.0.0-beta.53': - resolution: {integrity: sha512-vENRlFU4YbrwVqNDZ7fLvy+JR1CRkyr01jhSiDpE1u6py3OMzQfztQU2jxykW3ALNxO4kSlqIDeYyD0Y9RcQeQ==} - - '@rolldown/pluginutils@1.0.0-beta.55': - resolution: {integrity: sha512-vajw/B3qoi7aYnnD4BQ4VoCcXQWnF0roSwE2iynbNxgW4l9mFwtLmLmUhpDdcTBfKyZm1p/T0D13qG94XBLohA==} - '@sec-ant/readable-stream@0.4.1': resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} @@ -4575,9 +4377,6 @@ packages: resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} engines: {node: '>=18'} - '@standard-schema/spec@1.0.0': - resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==} - '@swc-node/core@1.14.1': resolution: {integrity: sha512-jrt5GUaZUU6cmMS+WTJEvGvaB6j1YNKPHPzC2PUi2BjaFbtxURHj6641Az6xN7b665hNniAIdvjxWcRml5yCnw==} engines: {node: '>= 10'} @@ -4982,39 +4781,123 @@ packages: '@vitest/browser': optional: true - '@vitest/expect@4.0.15': - resolution: {integrity: sha512-Gfyva9/GxPAWXIWjyGDli9O+waHDC0Q0jaLdFP1qPAUUfo1FEXPXUfUkp3eZA0sSq340vPycSyOlYUeM15Ft1w==} + '@vitest/pretty-format@4.0.15': + resolution: {integrity: sha512-SWdqR8vEv83WtZcrfLNqlqeQXlQLh2iilO1Wk1gv4eiHKjEzvgHb2OVc3mIPyhZE6F+CtfYjNlDJwP5MN6Km7A==} + + '@vitest/ui@4.0.15': + resolution: {integrity: sha512-sxSyJMaKp45zI0u+lHrPuZM1ZJQ8FaVD35k+UxVrha1yyvQ+TZuUYllUixwvQXlB7ixoDc7skf3lQPopZIvaQw==} + peerDependencies: + vitest: 4.0.15 + + '@vitest/utils@4.0.15': + resolution: {integrity: sha512-HXjPW2w5dxhTD0dLwtYHDnelK3j8sR8cWIaLxr22evTyY6q8pRCjZSmhRWVjBaOVXChQd6AwMzi9pucorXCPZA==} - '@vitest/mocker@4.0.15': - resolution: {integrity: sha512-CZ28GLfOEIFkvCFngN8Sfx5h+Se0zN+h4B7yOsPVCcgtiO7t5jt9xQh2E1UkFep+eb9fjyMfuC5gBypwb07fvQ==} + '@voidzero-dev/vite-plus-core@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761': + resolution: {integrity: sha512-cRVakC7WFEpenonyCWNz0FAidYYDvuL7sTCWx4RYYB6oqWkn1Gsb3vRPM0QOlZWDTw6BGKVhdkVRV8Hgt9sj3Q==} + engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: - msw: ^2.4.9 - vite: ^6.0.0 || ^7.0.0-0 + '@arethetypeswrong/core': ^0.18.1 + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': '*' + esbuild: ^0.25.0 + jiti: '>=1.21.0' + less: ^4.0.0 + publint: ^0.3.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + typescript: ^5.0.0 + unplugin-lightningcss: ^0.4.0 + unplugin-unused: ^0.5.0 + yaml: ^2.4.2 peerDependenciesMeta: - msw: + '@arethetypeswrong/core': optional: true - vite: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + publint: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + typescript: + optional: true + unplugin-lightningcss: + optional: true + unplugin-unused: + optional: true + yaml: optional: true - '@vitest/pretty-format@4.0.15': - resolution: {integrity: sha512-SWdqR8vEv83WtZcrfLNqlqeQXlQLh2iilO1Wk1gv4eiHKjEzvgHb2OVc3mIPyhZE6F+CtfYjNlDJwP5MN6Km7A==} - - '@vitest/runner@4.0.15': - resolution: {integrity: sha512-+A+yMY8dGixUhHmNdPUxOh0la6uVzun86vAbuMT3hIDxMrAOmn5ILBHm8ajrqHE0t8R9T1dGnde1A5DTnmi3qw==} + '@voidzero-dev/vite-plus-darwin-arm64@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761': + resolution: {integrity: sha512-0hD92eezm2g7dTeXFgdENVkiIFMTQ1o1lK6GQuFnzg+RVETlVRO4DT8bkI3aiuQQY/QkfRpdiDkgdCkH6g2nPQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] - '@vitest/snapshot@4.0.15': - resolution: {integrity: sha512-A7Ob8EdFZJIBjLjeO0DZF4lqR6U7Ydi5/5LIZ0xcI+23lYlsYJAfGn8PrIWTYdZQRNnSRlzhg0zyGu37mVdy5g==} + '@voidzero-dev/vite-plus-linux-arm64-gnu@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761': + resolution: {integrity: sha512-k3VA3AvfRSszHXTgL5kDxuJ++rdcKikIhiTKUnX7+AMk1fW+nP3Gm3VXBFbj7lcAMj8VG2g9KRuX3yWOJLm0xw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] - '@vitest/spy@4.0.15': - resolution: {integrity: sha512-+EIjOJmnY6mIfdXtE/bnozKEvTC4Uczg19yeZ2vtCz5Yyb0QQ31QWVQ8hswJ3Ysx/K2EqaNsVanjr//2+P3FHw==} + '@voidzero-dev/vite-plus-linux-x64-gnu@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761': + resolution: {integrity: sha512-lokxNOOJkKpls9mPI2y8b6t1dIlEmDA7lNNysT6NSrZ3vt/Rl4hAsCQ5DSvriDXd64nWfm21Up2PNIJSD0exhg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] - '@vitest/ui@4.0.15': - resolution: {integrity: sha512-sxSyJMaKp45zI0u+lHrPuZM1ZJQ8FaVD35k+UxVrha1yyvQ+TZuUYllUixwvQXlB7ixoDc7skf3lQPopZIvaQw==} + '@voidzero-dev/vite-plus-test@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761': + resolution: {integrity: sha512-HukJSLPOM0hHksdYnJhx57BFHU49cdANLNea73x1r1Ccm3C89wpEqCTksBUIw1EtxY/wyBapkCiGanJTuMVqbw==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} peerDependencies: - vitest: 4.0.15 + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 + '@vitest/ui': 4.0.16 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true - '@vitest/utils@4.0.15': - resolution: {integrity: sha512-HXjPW2w5dxhTD0dLwtYHDnelK3j8sR8cWIaLxr22evTyY6q8pRCjZSmhRWVjBaOVXChQd6AwMzi9pucorXCPZA==} + '@voidzero-dev/vite-plus-win32-x64-msvc@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761': + resolution: {integrity: sha512-LSHwFNt5xUBDMjEzoDS85fix+Wk6h+bHAFFG8aNv/b500uTH+zOjbDSX+OeElbuQ3PNpki+cD8E4DQDmxymSEA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] '@vue/compiler-core@3.5.25': resolution: {integrity: sha512-vay5/oQJdsNHmliWoZfHPoVZZRmnSWhug0BYT34njkYTPqClh3DNWLkZNJBVSjsNMrg0CCrBfoKkjZQPM/QVUw==} @@ -5204,10 +5087,6 @@ packages: resolution: {integrity: sha512-0qWUglt9JEqLFr3w1I1pbrChn1grhaiAR2ocX1PP/flRmxgtwTzPFFFnfIlD6aMOLQZgSuCRlidD70lvx8yhzg==} engines: {node: '>=14'} - ansis@4.2.0: - resolution: {integrity: sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig==} - engines: {node: '>=14'} - any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} @@ -5267,10 +5146,6 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - ast-kit@2.2.0: - resolution: {integrity: sha512-m1Q/RaVOnTp9JxPX+F+Zn7IcLYMzM8kZofDImfsKZd8MbR+ikdOzTeztStWqfrqIxZnYWryyI9ePm3NGjnZgGw==} - engines: {node: '>=20.19.0'} - ast-v8-to-istanbul@0.3.8: resolution: {integrity: sha512-szgSZqUxI5T8mLKvS7WTjF9is+MVbOeLADU73IseOcrqhxr/VAvy6wfoVE39KnKzA7JRhjF5eUagNlHwvZPlKQ==} @@ -5328,9 +5203,6 @@ packages: birpc@2.8.0: resolution: {integrity: sha512-Bz2a4qD/5GRhiHSwj30c/8kC8QGj12nNDwz3D4ErQ4Xhy35dsSDvF+RA/tWpjyU0pdGtSDiEk6B5fBGE1qNVhw==} - birpc@4.0.0: - resolution: {integrity: sha512-LShSxJP0KTmd101b6DRyGBj57LZxSDYWKitQNW/mi8GRMvZb078Uf9+pveax1DrVL89vm7mWe+TovdI/UDOuPw==} - black-hole-stream@0.0.1: resolution: {integrity: sha512-FQSWhFQZmddoqWkwPMFeR5hJo9waZE796MuO7b0poStaPrm0Qr2em9FT4/TF1+0rOA1dRFabX+88rdX8YHxDTA==} @@ -5446,10 +5318,6 @@ packages: resolution: {integrity: sha512-J7u2GSj77TRvJmEfBL4ln5TROEka6X5tEOKF6qe6kritcltmrbmeiP2p9A2EA1dGOxR5UX7H804ByzIZAM+Nqg==} engines: {node: '>= 18.19.0'} - chai@6.2.1: - resolution: {integrity: sha512-p4Z49OGG5W/WBCPSS/dH3jQ73kD6tiMmUM+bckNK6Jr5JHMG3k9bg/BvKR8lKmtVBKmOiuVaV2ws8s9oSbwysg==} - engines: {node: '>=18'} - chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -5824,9 +5692,6 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} - defu@6.1.4: - resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} - delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} @@ -5906,15 +5771,6 @@ packages: dot-case@2.1.1: resolution: {integrity: sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==} - dts-resolver@2.1.3: - resolution: {integrity: sha512-bihc7jPC90VrosXNzK0LTE2cuLP6jr0Ro8jk+kMugHReJVLIpHz/xadeq3MhuwyO4TD4OA3L1Q8pBBFRc08Tsw==} - engines: {node: '>=20.19.0'} - peerDependencies: - oxc-resolver: '>=11.0.0' - peerDependenciesMeta: - oxc-resolver: - optional: true - dunder-proto@1.0.1: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} @@ -5970,10 +5826,6 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - empathic@2.0.0: - resolution: {integrity: sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==} - engines: {node: '>=14'} - encodeurl@1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} @@ -6099,10 +5951,6 @@ packages: resolution: {integrity: sha512-jpWzZ1ZhwUmeWRhS7Qv3mhpOhLfwI+uAX4e5fOcXqwMR7EcJ0pj2kV1CVzHVMX/LphnKWD3LObjZCoJ71lKpHw==} engines: {node: ^18.19.0 || >=20.5.0} - expect-type@1.3.0: - resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} - engines: {node: '>=12.0.0'} - exponential-backoff@3.1.3: resolution: {integrity: sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==} @@ -6416,9 +6264,6 @@ packages: hookable@5.5.3: resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} - hookable@6.0.1: - resolution: {integrity: sha512-uKGyY8BuzN/a5gvzvA+3FVWo0+wUjgtfSdnmjtrOVwQCZPHpHDH2WRO3VZSOeluYrHoDCiXFffZXs8Dj1ULWtw==} - hosted-git-info@4.1.0: resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} engines: {node: '>=10'} @@ -6517,10 +6362,6 @@ packages: immutable@5.1.4: resolution: {integrity: sha512-p6u1bG3YSnINT5RQmx/yRZBpenIl30kVxkTLDyHLIMk0gict704Q9n+thfDI7lTRm9vXdDYutVzXhzcThxTnXA==} - import-without-cache@0.2.5: - resolution: {integrity: sha512-B6Lc2s6yApwnD2/pMzFh/d5AVjdsDXjgkeJ766FmFuJELIGHNycKRj+l3A39yZPM4CchqNCB4RITEAYB1KUM6A==} - engines: {node: '>=20.19.0'} - imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -6821,11 +6662,6 @@ packages: resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} hasBin: true - jsesc@3.1.0: - resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} - engines: {node: '>=6'} - hasBin: true - json-parse-even-better-errors@3.0.2: resolution: {integrity: sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -7657,13 +7493,13 @@ packages: oxc-resolver@11.10.0: resolution: {integrity: sha512-LNJkji0qsBvZ7+yze3S1qsWufZ3VBcyU1wAnC5bBP0QzHsKf4rrNhG5I4c0RIDQGKsKDpVWh8vhUAGE3cb53kA==} - oxfmt@0.20.0: - resolution: {integrity: sha512-+7f8eV8iaK3tENN/FUVxZM1g78HjPehybN8/+/dvEA1O893Dcvk6O7/Q1wTQOHMD7wvdwWdujKl+Uo8QMiKDrQ==} + oxfmt@0.16.0: + resolution: {integrity: sha512-uRnnBAN0zH07FXSfvSKbIw+Jrohv4Px2RwNiZOGI4/pvns4sx0+k4WSt+tqwd7bDeoWaXiGmhZgnbK63hi6hVQ==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true - oxlint-tsgolint@0.11.0: - resolution: {integrity: sha512-fGYb7z/cljC0Rjtbxh7mIe8vtF/M9TShLvniwc2rdcqNG3Z9g3nM01cr2kWRb1DZdbY4/kItvIsrV4uhaMifyQ==} + oxlint-tsgolint@0.8.6: + resolution: {integrity: sha512-DC9rqwFyEb5RlxOjvXdqaqxM5PwK01002oh/fcdC05mNPiI04d6CPWtReHqX6Ig1dc5LYuVeh3wuPrrp6WTjtw==} hasBin: true oxlint@1.32.0: @@ -7858,6 +7694,10 @@ packages: resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} engines: {node: '>= 6'} + pixelmatch@7.1.0: + resolution: {integrity: sha512-1wrVzJ2STrpmONHKBy228LM1b84msXDUoAzVEl0R8Mz4Ce6EPr+IVtxm8+yvrqLYMHswREkjYFaMxnyGnaY3Ng==} + hasBin: true + pkg-types@2.3.0: resolution: {integrity: sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==} @@ -7872,6 +7712,10 @@ packages: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} engines: {node: '>=4'} + pngjs@7.0.0: + resolution: {integrity: sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==} + engines: {node: '>=14.19.0'} + possible-typed-array-names@1.1.0: resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} engines: {node: '>= 0.4'} @@ -7947,9 +7791,6 @@ packages: resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==} engines: {node: '>=0.6'} - quansync@1.0.0: - resolution: {integrity: sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA==} - queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -8101,75 +7942,6 @@ packages: rndm@1.2.0: resolution: {integrity: sha512-fJhQQI5tLrQvYIYFpOnFinzv9dwmR7hRnUz1XqP3OJ1jIweTNOd6aTO4jwQSgcBSFUB+/KHJxuGneime+FdzOw==} - rolldown-plugin-dts@0.19.1: - resolution: {integrity: sha512-6z501zDTGq6ZrIEdk57qNUwq7kBRGzv3I3SAN2HMJ2KFYjHLnAuPYOmvfiwdxbRZMJ0iMdkV9rYdC3GjurT2cg==} - engines: {node: '>=20.19.0'} - peerDependencies: - '@ts-macro/tsc': ^0.3.6 - '@typescript/native-preview': '>=7.0.0-dev.20250601.1' - rolldown: ^1.0.0-beta.55 - typescript: ^5.0.0 - vue-tsc: ~3.1.0 - peerDependenciesMeta: - '@ts-macro/tsc': - optional: true - '@typescript/native-preview': - optional: true - typescript: - optional: true - vue-tsc: - optional: true - - rolldown-vite@7.3.0: - resolution: {integrity: sha512-5hI5NCJwKBGtzWtdKB3c2fOEpI77Iaa0z4mSzZPU1cJ/OqrGbFafm90edVCd7T9Snz+Sh09TMAv4EQqyVLzuEg==} - engines: {node: ^20.19.0 || >=22.12.0} - hasBin: true - peerDependencies: - '@types/node': ^20.19.0 || >=22.12.0 - esbuild: ^0.27.0 - jiti: '>=1.21.0' - less: ^4.0.0 - sass: ^1.70.0 - sass-embedded: ^1.70.0 - stylus: '>=0.54.8' - sugarss: ^5.0.0 - terser: ^5.16.0 - tsx: ^4.8.1 - yaml: ^2.4.2 - peerDependenciesMeta: - '@types/node': - optional: true - esbuild: - optional: true - jiti: - optional: true - less: - optional: true - sass: - optional: true - sass-embedded: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - tsx: - optional: true - yaml: - optional: true - - rolldown@1.0.0-beta.53: - resolution: {integrity: sha512-Qd9c2p0XKZdgT5AYd+KgAMggJ8ZmCs3JnS9PTMWkyUfteKlfmKtxJbWTHkVakxwXs1Ub7jrRYVeFeF7N0sQxyw==} - engines: {node: ^20.19.0 || >=22.12.0} - hasBin: true - - rolldown@1.0.0-beta.55: - resolution: {integrity: sha512-r8Ws43aYCnfO07ao0SvQRz4TBAtZJjGWNvScRBOHuiNHvjfECOJBIqJv0nUkL1GYcltjvvHswRilDF1ocsC0+g==} - engines: {node: ^20.19.0 || >=22.12.0} - hasBin: true - run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -8305,9 +8077,6 @@ packages: resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} engines: {node: '>= 0.4'} - siginfo@2.0.0: - resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -8408,9 +8177,6 @@ packages: stack-trace@0.0.10: resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==} - stackback@0.0.2: - resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - standard-as-callback@2.1.0: resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==} @@ -8593,10 +8359,6 @@ packages: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} - tinypool@2.0.0: - resolution: {integrity: sha512-/RX9RzeH2xU5ADE7n2Ykvmi9ED3FBGPAjw9u3zucrNNaEBIO0HPSYgL0NT7+3p147ojeSdaVu08F6hjpv31HJg==} - engines: {node: ^20.0.0 || >=22.0.0} - tinyrainbow@3.0.3: resolution: {integrity: sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==} engines: {node: '>=14.0.0'} @@ -8619,10 +8381,6 @@ packages: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} - tree-kill@1.2.2: - resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} - hasBin: true - treeverse@3.0.0: resolution: {integrity: sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -8651,31 +8409,6 @@ packages: resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} engines: {node: '>=6'} - tsdown@0.18.2: - resolution: {integrity: sha512-2o6p/9WjcQrgKnz5/VppOstsqXdTER6G6gPe5yhuP57AueIr2y/NQFKdFPHuqMqZpxRLVjm7MP/dXWG7EJpehg==} - engines: {node: '>=20.19.0'} - hasBin: true - peerDependencies: - '@arethetypeswrong/core': ^0.18.1 - '@vitejs/devtools': '*' - publint: ^0.3.0 - typescript: ^5.0.0 - unplugin-lightningcss: ^0.4.0 - unplugin-unused: ^0.5.0 - peerDependenciesMeta: - '@arethetypeswrong/core': - optional: true - '@vitejs/devtools': - optional: true - publint: - optional: true - typescript: - optional: true - unplugin-lightningcss: - optional: true - unplugin-unused: - optional: true - tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -8730,9 +8463,6 @@ packages: resolution: {integrity: sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==} engines: {node: '>= 0.8'} - unconfig-core@7.4.2: - resolution: {integrity: sha512-VgPCvLWugINbXvMQDf8Jh0mlbvNjNC6eSUziHsBCMpxR05OPrNrvDnyatdMjRgcHaaNsCqz+wjNXxNw1kRLHUg==} - undici-types@7.16.0: resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} @@ -8805,16 +8535,6 @@ packages: resolution: {integrity: sha512-6NCPkv1ClwH+/BGE9QeoTIl09nuiAt0gS28nn1PvYXsGKRwM2TCbFA2QiilmehPDTXIe684k4rZI1yl3A1PCUw==} engines: {node: '>=18.12.0'} - unrun@0.2.20: - resolution: {integrity: sha512-YhobStTk93HYRN/4iBs3q3/sd7knvju1XrzwwrVVfRujyTG1K88hGONIxCoJN0PWBuO+BX7fFiHH0sVDfE3MWw==} - engines: {node: '>=20.19.0'} - hasBin: true - peerDependencies: - synckit: ^0.11.11 - peerDependenciesMeta: - synckit: - optional: true - upper-case-first@1.1.2: resolution: {integrity: sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ==} @@ -8878,6 +8598,11 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} + vite-plus@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761: + resolution: {integrity: sha512-XyYAeAsjbFokjBJtkr3o/3AEgcFglnFBK4M6jgITicEvnbAbO9+zH0ds6VJy+xM4h9D922zI6UOZHiNtVcO9xQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + vitepress-plugin-llms@1.10.0: resolution: {integrity: sha512-dgD5KV8D9vXlQtAf/KUjSgr3QymH1fHT7XkQ/UuIqvIjnKdzZI+0gT3puGxUBuqgvlFjYWA6f8k80tXl6gwWkw==} @@ -8896,40 +8621,6 @@ packages: postcss: optional: true - vitest@4.0.15: - resolution: {integrity: sha512-n1RxDp8UJm6N0IbJLQo+yzLZ2sQCDyl1o0LeugbPWf8+8Fttp29GghsQBjYJVmWq3gBFfe9Hs1spR44vovn2wA==} - engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@opentelemetry/api': ^1.9.0 - '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 4.0.15 - '@vitest/browser-preview': 4.0.15 - '@vitest/browser-webdriverio': 4.0.15 - '@vitest/ui': 4.0.15 - happy-dom: '*' - jsdom: '*' - peerDependenciesMeta: - '@edge-runtime/vm': - optional: true - '@opentelemetry/api': - optional: true - '@types/node': - optional: true - '@vitest/browser-playwright': - optional: true - '@vitest/browser-preview': - optional: true - '@vitest/browser-webdriverio': - optional: true - '@vitest/ui': - optional: true - happy-dom: - optional: true - jsdom: - optional: true - vue@3.5.25: resolution: {integrity: sha512-YLVdgv2K13WJ6n+kD5owehKtEXwdwXuj2TTyJMsO7pSeKw2bfRNZGjhB7YzrpbMYj5b5QsUebHpOqR3R3ziy/g==} peerDependencies: @@ -8989,11 +8680,6 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} hasBin: true - why-is-node-running@2.3.0: - resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} - engines: {node: '>=8'} - hasBin: true - wide-align@1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} @@ -9037,6 +8723,18 @@ packages: resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + ws@8.19.0: + resolution: {integrity: sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + xss@1.0.15: resolution: {integrity: sha512-FVdlVVC67WOIPvfOwhoMETV72f6GbW7aOabBC3WxN/oUdoEMDyLz4OgRv5/gck2ZeNqEQu+Tb0kloovXOfpYVg==} engines: {node: '>= 0.10.0'} @@ -9098,19 +8796,11 @@ packages: zod@3.25.76: resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} - zwitch@2.0.4: - resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} - -snapshots: - - '@babel/generator@7.28.5': - dependencies: - '@babel/parser': 7.28.5 - '@babel/types': 7.28.5 - '@jridgewell/gen-mapping': 0.3.13 - '@jridgewell/trace-mapping': 0.3.31 - jsesc: 3.1.0 - + zwitch@2.0.4: + resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + +snapshots: + '@babel/helper-string-parser@7.27.1': {} '@babel/helper-validator-identifier@7.28.5': {} @@ -9401,6 +9091,7 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 '@jridgewell/trace-mapping': 0.3.31 + optional: true '@jridgewell/remapping@2.3.5': dependencies: @@ -9642,11 +9333,9 @@ snapshots: '@oxc-minify/binding-win32-x64-msvc@0.105.0': optional: true - '@oxc-project/runtime@0.101.0': {} + '@oxc-project/runtime@0.108.0': {} - '@oxc-project/types@0.101.0': {} - - '@oxc-project/types@0.103.0': {} + '@oxc-project/types@0.108.0': {} '@oxc-resolver/binding-android-arm-eabi@11.10.0': optional: true @@ -9707,46 +9396,46 @@ snapshots: '@oxc-resolver/binding-win32-x64-msvc@11.10.0': optional: true - '@oxfmt/darwin-arm64@0.20.0': + '@oxfmt/darwin-arm64@0.16.0': optional: true - '@oxfmt/darwin-x64@0.20.0': + '@oxfmt/darwin-x64@0.16.0': optional: true - '@oxfmt/linux-arm64-gnu@0.20.0': + '@oxfmt/linux-arm64-gnu@0.16.0': optional: true - '@oxfmt/linux-arm64-musl@0.20.0': + '@oxfmt/linux-arm64-musl@0.16.0': optional: true - '@oxfmt/linux-x64-gnu@0.20.0': + '@oxfmt/linux-x64-gnu@0.16.0': optional: true - '@oxfmt/linux-x64-musl@0.20.0': + '@oxfmt/linux-x64-musl@0.16.0': optional: true - '@oxfmt/win32-arm64@0.20.0': + '@oxfmt/win32-arm64@0.16.0': optional: true - '@oxfmt/win32-x64@0.20.0': + '@oxfmt/win32-x64@0.16.0': optional: true - '@oxlint-tsgolint/darwin-arm64@0.11.0': + '@oxlint-tsgolint/darwin-arm64@0.8.6': optional: true - '@oxlint-tsgolint/darwin-x64@0.11.0': + '@oxlint-tsgolint/darwin-x64@0.8.6': optional: true - '@oxlint-tsgolint/linux-arm64@0.11.0': + '@oxlint-tsgolint/linux-arm64@0.8.6': optional: true - '@oxlint-tsgolint/linux-x64@0.11.0': + '@oxlint-tsgolint/linux-x64@0.8.6': optional: true - '@oxlint-tsgolint/win32-arm64@0.11.0': + '@oxlint-tsgolint/win32-arm64@0.8.6': optional: true - '@oxlint-tsgolint/win32-x64@0.11.0': + '@oxlint-tsgolint/win32-x64@0.8.6': optional: true '@oxlint/darwin-arm64@1.32.0': @@ -9845,98 +9534,8 @@ snapshots: '@publint/pack@0.1.2': {} - '@quansync/fs@1.0.0': - dependencies: - quansync: 1.0.0 - - '@rolldown/binding-android-arm64@1.0.0-beta.53': - optional: true - - '@rolldown/binding-android-arm64@1.0.0-beta.55': - optional: true - - '@rolldown/binding-darwin-arm64@1.0.0-beta.53': - optional: true - - '@rolldown/binding-darwin-arm64@1.0.0-beta.55': - optional: true - - '@rolldown/binding-darwin-x64@1.0.0-beta.53': - optional: true - - '@rolldown/binding-darwin-x64@1.0.0-beta.55': - optional: true - - '@rolldown/binding-freebsd-x64@1.0.0-beta.53': - optional: true - - '@rolldown/binding-freebsd-x64@1.0.0-beta.55': - optional: true - - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.53': - optional: true - - '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.55': - optional: true - - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.53': - optional: true - - '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.55': - optional: true - - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.53': - optional: true - - '@rolldown/binding-linux-arm64-musl@1.0.0-beta.55': - optional: true - - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.53': - optional: true - - '@rolldown/binding-linux-x64-gnu@1.0.0-beta.55': - optional: true - - '@rolldown/binding-linux-x64-musl@1.0.0-beta.53': - optional: true - - '@rolldown/binding-linux-x64-musl@1.0.0-beta.55': - optional: true - - '@rolldown/binding-openharmony-arm64@1.0.0-beta.53': - optional: true - - '@rolldown/binding-openharmony-arm64@1.0.0-beta.55': - optional: true - - '@rolldown/binding-wasm32-wasi@1.0.0-beta.53': - dependencies: - '@napi-rs/wasm-runtime': 1.1.0 - optional: true - - '@rolldown/binding-wasm32-wasi@1.0.0-beta.55': - dependencies: - '@napi-rs/wasm-runtime': 1.1.0 - optional: true - - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.53': - optional: true - - '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.55': - optional: true - - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.53': - optional: true - - '@rolldown/binding-win32-x64-msvc@1.0.0-beta.55': - optional: true - '@rolldown/pluginutils@1.0.0-beta.29': {} - '@rolldown/pluginutils@1.0.0-beta.53': {} - - '@rolldown/pluginutils@1.0.0-beta.55': {} - '@sec-ant/readable-stream@0.4.1': {} '@shikijs/core@3.15.0': @@ -10004,8 +9603,6 @@ snapshots: '@sindresorhus/merge-streams@4.0.0': {} - '@standard-schema/spec@1.0.0': {} - '@swc-node/core@1.14.1(@swc/core@1.15.3)(@swc/types@0.1.25)': dependencies: '@swc/core': 1.15.3 @@ -10372,13 +9969,13 @@ snapshots: '@ungap/structured-clone@1.3.0': {} - '@vitejs/plugin-vue@6.0.1(rolldown-vite@7.3.0(@types/node@24.10.2)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3))': + '@vitejs/plugin-vue@6.0.1(@voidzero-dev/vite-plus-core@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3))': dependencies: '@rolldown/pluginutils': 1.0.0-beta.29 - vite: rolldown-vite@7.3.0(@types/node@24.10.2)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2) + vite: '@voidzero-dev/vite-plus-core@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2)' vue: 3.5.25(typescript@5.9.3) - '@vitest/coverage-v8@4.0.15(vitest@4.0.15)': + '@vitest/coverage-v8@4.0.15(@voidzero-dev/vite-plus-test@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761)': dependencies: '@bcoe/v8-coverage': 1.0.2 '@vitest/utils': 4.0.15 @@ -10391,45 +9988,15 @@ snapshots: obug: 2.1.1 std-env: 3.10.0 tinyrainbow: 3.0.3 - vitest: 4.0.15(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2) + vitest: '@voidzero-dev/vite-plus-test@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2)' transitivePeerDependencies: - supports-color - '@vitest/expect@4.0.15': - dependencies: - '@standard-schema/spec': 1.0.0 - '@types/chai': 5.2.3 - '@vitest/spy': 4.0.15 - '@vitest/utils': 4.0.15 - chai: 6.2.1 - tinyrainbow: 3.0.3 - - '@vitest/mocker@4.0.15(rolldown-vite@7.3.0(@types/node@24.10.2)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2))': - dependencies: - '@vitest/spy': 4.0.15 - estree-walker: 3.0.3 - magic-string: 0.30.21 - optionalDependencies: - vite: rolldown-vite@7.3.0(@types/node@24.10.2)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2) - '@vitest/pretty-format@4.0.15': dependencies: tinyrainbow: 3.0.3 - '@vitest/runner@4.0.15': - dependencies: - '@vitest/utils': 4.0.15 - pathe: 2.0.3 - - '@vitest/snapshot@4.0.15': - dependencies: - '@vitest/pretty-format': 4.0.15 - magic-string: 0.30.21 - pathe: 2.0.3 - - '@vitest/spy@4.0.15': {} - - '@vitest/ui@4.0.15(vitest@4.0.15)': + '@vitest/ui@4.0.15(@voidzero-dev/vite-plus-test@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761)': dependencies: '@vitest/utils': 4.0.15 fflate: 0.8.2 @@ -10438,13 +10005,82 @@ snapshots: sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vitest: 4.0.15(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2) + vitest: '@voidzero-dev/vite-plus-test@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2)' '@vitest/utils@4.0.15': dependencies: '@vitest/pretty-format': 4.0.15 tinyrainbow: 3.0.3 + '@voidzero-dev/vite-plus-core@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2)': + dependencies: + '@oxc-project/runtime': 0.108.0 + '@oxc-project/types': 0.108.0 + lightningcss: 1.30.2 + postcss: 8.5.6 + optionalDependencies: + '@types/node': 24.10.2 + esbuild: 0.25.12 + fsevents: 2.3.3 + jiti: 2.6.1 + less: 4.4.2 + publint: 0.3.16 + sass: 1.93.2 + terser: 5.44.0 + tsx: 4.20.6 + typescript: 5.9.3 + unplugin-unused: 0.5.4 + yaml: 2.8.2 + + '@voidzero-dev/vite-plus-darwin-arm64@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761': + optional: true + + '@voidzero-dev/vite-plus-linux-arm64-gnu@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761': + optional: true + + '@voidzero-dev/vite-plus-linux-x64-gnu@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761': + optional: true + + '@voidzero-dev/vite-plus-test@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2)': + dependencies: + '@types/chai': 5.2.3 + '@voidzero-dev/vite-plus-core': 0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2) + es-module-lexer: 1.7.0 + obug: 2.1.1 + pixelmatch: 7.1.0 + pngjs: 7.0.0 + sirv: 3.0.2 + std-env: 3.10.0 + tinybench: 2.9.0 + tinyexec: 1.0.2 + tinyglobby: 0.2.15 + ws: 8.19.0 + optionalDependencies: + '@types/node': 24.10.2 + '@vitest/ui': 4.0.15(@voidzero-dev/vite-plus-test@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761) + transitivePeerDependencies: + - '@arethetypeswrong/core' + - '@vitejs/devtools' + - bufferutil + - esbuild + - jiti + - less + - publint + - sass + - sass-embedded + - stylus + - sugarss + - terser + - tsx + - typescript + - unplugin-lightningcss + - unplugin-unused + - utf-8-validate + - yaml + + '@voidzero-dev/vite-plus-win32-x64-msvc@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761': + optional: true + '@vue/compiler-core@3.5.25': dependencies: '@babel/parser': 7.28.5 @@ -10621,8 +10257,6 @@ snapshots: ansis@3.17.0: {} - ansis@4.2.0: {} - any-promise@1.3.0: {} anymatch@3.1.3: @@ -10670,11 +10304,6 @@ snapshots: assertion-error@2.0.1: {} - ast-kit@2.2.0: - dependencies: - '@babel/parser': 7.28.5 - pathe: 2.0.3 - ast-v8-to-istanbul@0.3.8: dependencies: '@jridgewell/trace-mapping': 0.3.31 @@ -10733,8 +10362,6 @@ snapshots: birpc@2.8.0: {} - birpc@4.0.0: {} - black-hole-stream@0.0.1: {} body-parser@1.20.3: @@ -10905,8 +10532,6 @@ snapshots: dependencies: utility: 2.5.0 - chai@6.2.1: {} - chalk@2.4.2: dependencies: ansi-styles: 3.2.1 @@ -11331,8 +10956,6 @@ snapshots: has-property-descriptors: 1.0.2 object-keys: 1.1.1 - defu@6.1.4: {} - delayed-stream@1.0.0: {} delegates@1.0.0: {} @@ -11397,10 +11020,6 @@ snapshots: dependencies: no-case: 2.3.2 - dts-resolver@2.1.3(oxc-resolver@11.10.0): - optionalDependencies: - oxc-resolver: 11.10.0 - dunder-proto@1.0.1: dependencies: call-bind-apply-helpers: 1.0.2 @@ -11462,8 +11081,6 @@ snapshots: emoji-regex@9.2.2: {} - empathic@2.0.0: {} - encodeurl@1.0.2: {} encodeurl@2.0.0: {} @@ -11650,8 +11267,6 @@ snapshots: strip-final-newline: 4.0.0 yoctocolors: 2.1.2 - expect-type@1.3.0: {} - exponential-backoff@3.1.3: {} express@4.21.2: @@ -12041,8 +11656,6 @@ snapshots: hookable@5.5.3: {} - hookable@6.0.1: {} - hosted-git-info@4.1.0: dependencies: lru-cache: 6.0.0 @@ -12146,8 +11759,6 @@ snapshots: immutable@5.1.4: optional: true - import-without-cache@0.2.5: {} - imurmurhash@0.1.4: {} indent-string@4.0.0: {} @@ -12426,8 +12037,6 @@ snapshots: dependencies: argparse: 2.0.1 - jsesc@3.1.0: {} - json-parse-even-better-errors@3.0.2: {} json-schema-traverse@1.0.0: {} @@ -13460,29 +13069,27 @@ snapshots: '@oxc-resolver/binding-win32-ia32-msvc': 11.10.0 '@oxc-resolver/binding-win32-x64-msvc': 11.10.0 - oxfmt@0.20.0: - dependencies: - tinypool: 2.0.0 + oxfmt@0.16.0: optionalDependencies: - '@oxfmt/darwin-arm64': 0.20.0 - '@oxfmt/darwin-x64': 0.20.0 - '@oxfmt/linux-arm64-gnu': 0.20.0 - '@oxfmt/linux-arm64-musl': 0.20.0 - '@oxfmt/linux-x64-gnu': 0.20.0 - '@oxfmt/linux-x64-musl': 0.20.0 - '@oxfmt/win32-arm64': 0.20.0 - '@oxfmt/win32-x64': 0.20.0 - - oxlint-tsgolint@0.11.0: + '@oxfmt/darwin-arm64': 0.16.0 + '@oxfmt/darwin-x64': 0.16.0 + '@oxfmt/linux-arm64-gnu': 0.16.0 + '@oxfmt/linux-arm64-musl': 0.16.0 + '@oxfmt/linux-x64-gnu': 0.16.0 + '@oxfmt/linux-x64-musl': 0.16.0 + '@oxfmt/win32-arm64': 0.16.0 + '@oxfmt/win32-x64': 0.16.0 + + oxlint-tsgolint@0.8.6: optionalDependencies: - '@oxlint-tsgolint/darwin-arm64': 0.11.0 - '@oxlint-tsgolint/darwin-x64': 0.11.0 - '@oxlint-tsgolint/linux-arm64': 0.11.0 - '@oxlint-tsgolint/linux-x64': 0.11.0 - '@oxlint-tsgolint/win32-arm64': 0.11.0 - '@oxlint-tsgolint/win32-x64': 0.11.0 - - oxlint@1.32.0(oxlint-tsgolint@0.11.0): + '@oxlint-tsgolint/darwin-arm64': 0.8.6 + '@oxlint-tsgolint/darwin-x64': 0.8.6 + '@oxlint-tsgolint/linux-arm64': 0.8.6 + '@oxlint-tsgolint/linux-x64': 0.8.6 + '@oxlint-tsgolint/win32-arm64': 0.8.6 + '@oxlint-tsgolint/win32-x64': 0.8.6 + + oxlint@1.32.0(oxlint-tsgolint@0.8.6): optionalDependencies: '@oxlint/darwin-arm64': 1.32.0 '@oxlint/darwin-x64': 1.32.0 @@ -13492,7 +13099,7 @@ snapshots: '@oxlint/linux-x64-musl': 1.32.0 '@oxlint/win32-arm64': 1.32.0 '@oxlint/win32-x64': 1.32.0 - oxlint-tsgolint: 0.11.0 + oxlint-tsgolint: 0.8.6 p-event@6.0.1: dependencies: @@ -13658,6 +13265,10 @@ snapshots: pirates@4.0.7: {} + pixelmatch@7.1.0: + dependencies: + pngjs: 7.0.0 + pkg-types@2.3.0: dependencies: confbox: 0.2.2 @@ -13671,6 +13282,8 @@ snapshots: pluralize@8.0.0: {} + pngjs@7.0.0: {} + possible-typed-array-names@1.1.0: {} postcss-selector-parser@6.1.2: @@ -13737,8 +13350,6 @@ snapshots: dependencies: side-channel: 1.1.0 - quansync@1.0.0: {} - queue-microtask@1.2.3: {} random-bytes@1.0.0: {} @@ -13908,81 +13519,6 @@ snapshots: rndm@1.2.0: {} - rolldown-plugin-dts@0.19.1(@typescript/native-preview@7.0.0-dev.20251223.1)(oxc-resolver@11.10.0)(rolldown@1.0.0-beta.55)(typescript@5.9.3): - dependencies: - '@babel/generator': 7.28.5 - '@babel/parser': 7.28.5 - '@babel/types': 7.28.5 - ast-kit: 2.2.0 - birpc: 4.0.0 - dts-resolver: 2.1.3(oxc-resolver@11.10.0) - get-tsconfig: 4.13.0 - obug: 2.1.1 - rolldown: 1.0.0-beta.55 - optionalDependencies: - '@typescript/native-preview': 7.0.0-dev.20251223.1 - typescript: 5.9.3 - transitivePeerDependencies: - - oxc-resolver - - rolldown-vite@7.3.0(@types/node@24.10.2)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2): - dependencies: - '@oxc-project/runtime': 0.101.0 - fdir: 6.5.0(picomatch@4.0.3) - lightningcss: 1.30.2 - picomatch: 4.0.3 - postcss: 8.5.6 - rolldown: 1.0.0-beta.53 - tinyglobby: 0.2.15 - optionalDependencies: - '@types/node': 24.10.2 - esbuild: 0.27.0 - fsevents: 2.3.3 - jiti: 2.6.1 - less: 4.4.2 - sass: 1.93.2 - terser: 5.44.0 - tsx: 4.20.6 - yaml: 2.8.2 - - rolldown@1.0.0-beta.53: - dependencies: - '@oxc-project/types': 0.101.0 - '@rolldown/pluginutils': 1.0.0-beta.53 - optionalDependencies: - '@rolldown/binding-android-arm64': 1.0.0-beta.53 - '@rolldown/binding-darwin-arm64': 1.0.0-beta.53 - '@rolldown/binding-darwin-x64': 1.0.0-beta.53 - '@rolldown/binding-freebsd-x64': 1.0.0-beta.53 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.53 - '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.53 - '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.53 - '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.53 - '@rolldown/binding-linux-x64-musl': 1.0.0-beta.53 - '@rolldown/binding-openharmony-arm64': 1.0.0-beta.53 - '@rolldown/binding-wasm32-wasi': 1.0.0-beta.53 - '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.53 - '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.53 - - rolldown@1.0.0-beta.55: - dependencies: - '@oxc-project/types': 0.103.0 - '@rolldown/pluginutils': 1.0.0-beta.55 - optionalDependencies: - '@rolldown/binding-android-arm64': 1.0.0-beta.55 - '@rolldown/binding-darwin-arm64': 1.0.0-beta.55 - '@rolldown/binding-darwin-x64': 1.0.0-beta.55 - '@rolldown/binding-freebsd-x64': 1.0.0-beta.55 - '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.55 - '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.55 - '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.55 - '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.55 - '@rolldown/binding-linux-x64-musl': 1.0.0-beta.55 - '@rolldown/binding-openharmony-arm64': 1.0.0-beta.55 - '@rolldown/binding-wasm32-wasi': 1.0.0-beta.55 - '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.55 - '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.55 - run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 @@ -14172,8 +13708,6 @@ snapshots: side-channel-map: 1.0.1 side-channel-weakmap: 1.0.2 - siginfo@2.0.0: {} - signal-exit@3.0.7: {} signal-exit@4.1.0: {} @@ -14271,8 +13805,6 @@ snapshots: stack-trace@0.0.10: {} - stackback@0.0.2: {} - standard-as-callback@2.1.0: {} statuses@1.5.0: {} @@ -14461,8 +13993,6 @@ snapshots: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 - tinypool@2.0.0: {} - tinyrainbow@3.0.3: {} title-case@2.1.1: @@ -14480,8 +14010,6 @@ snapshots: totalist@3.0.1: {} - tree-kill@1.2.2: {} - treeverse@3.0.0: {} trim-lines@3.0.1: {} @@ -14514,35 +14042,6 @@ snapshots: minimist: 1.2.8 strip-bom: 3.0.0 - tsdown@0.18.2(@typescript/native-preview@7.0.0-dev.20251223.1)(oxc-resolver@11.10.0)(publint@0.3.16)(typescript@5.9.3)(unplugin-unused@0.5.4): - dependencies: - ansis: 4.2.0 - cac: 6.7.14 - defu: 6.1.4 - empathic: 2.0.0 - hookable: 6.0.1 - import-without-cache: 0.2.5 - obug: 2.1.1 - picomatch: 4.0.3 - rolldown: 1.0.0-beta.55 - rolldown-plugin-dts: 0.19.1(@typescript/native-preview@7.0.0-dev.20251223.1)(oxc-resolver@11.10.0)(rolldown@1.0.0-beta.55)(typescript@5.9.3) - semver: 7.7.3 - tinyexec: 1.0.2 - tinyglobby: 0.2.15 - tree-kill: 1.2.2 - unconfig-core: 7.4.2 - unrun: 0.2.20 - optionalDependencies: - publint: 0.3.16 - typescript: 5.9.3 - unplugin-unused: 0.5.4 - transitivePeerDependencies: - - '@ts-macro/tsc' - - '@typescript/native-preview' - - oxc-resolver - - synckit - - vue-tsc - tslib@2.8.1: {} tsscmp@1.0.6: {} @@ -14595,11 +14094,6 @@ snapshots: dependencies: random-bytes: 1.0.0 - unconfig-core@7.4.2: - dependencies: - '@quansync/fs': 1.0.0 - quansync: 1.0.0 - undici-types@7.16.0: {} undici@5.29.0: @@ -14688,10 +14182,6 @@ snapshots: webpack-virtual-modules: 0.6.2 optional: true - unrun@0.2.20: - dependencies: - rolldown: 1.0.0-beta.55 - upper-case-first@1.1.2: dependencies: upper-case: 1.1.3 @@ -14775,6 +14265,46 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 + vite-plus@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2): + dependencies: + '@oxc-project/types': 0.108.0 + '@voidzero-dev/vite-plus-core': 0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2) + '@voidzero-dev/vite-plus-test': 0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2) + cac: 6.7.14 + oxfmt: 0.16.0 + oxlint: 1.32.0(oxlint-tsgolint@0.8.6) + oxlint-tsgolint: 0.8.6 + optionalDependencies: + '@voidzero-dev/vite-plus-darwin-arm64': 0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761 + '@voidzero-dev/vite-plus-linux-arm64-gnu': 0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761 + '@voidzero-dev/vite-plus-linux-x64-gnu': 0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761 + '@voidzero-dev/vite-plus-win32-x64-msvc': 0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761 + transitivePeerDependencies: + - '@arethetypeswrong/core' + - '@edge-runtime/vm' + - '@opentelemetry/api' + - '@types/node' + - '@vitejs/devtools' + - '@vitest/ui' + - bufferutil + - esbuild + - happy-dom + - jiti + - jsdom + - less + - publint + - sass + - sass-embedded + - stylus + - sugarss + - terser + - tsx + - typescript + - unplugin-lightningcss + - unplugin-unused + - utf-8-validate + - yaml + vitepress-plugin-llms@1.10.0: dependencies: gray-matter: 4.0.3 @@ -14794,7 +14324,7 @@ snapshots: transitivePeerDependencies: - supports-color - vitepress@2.0.0-alpha.15(@types/node@24.10.2)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(nprogress@0.2.0)(oxc-minify@0.105.0)(postcss@8.5.6)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(yaml@2.8.2): + vitepress@2.0.0-alpha.15(@types/node@24.10.2)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(nprogress@0.2.0)(oxc-minify@0.105.0)(postcss@8.5.6)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2): dependencies: '@docsearch/css': 4.3.2 '@docsearch/js': 4.3.2 @@ -14803,7 +14333,7 @@ snapshots: '@shikijs/transformers': 3.15.0 '@shikijs/types': 3.15.0 '@types/markdown-it': 14.1.2 - '@vitejs/plugin-vue': 6.0.1(rolldown-vite@7.3.0(@types/node@24.10.2)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3)) + '@vitejs/plugin-vue': 6.0.1(@voidzero-dev/vite-plus-core@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2))(vue@3.5.25(typescript@5.9.3)) '@vue/devtools-api': 8.0.5 '@vue/shared': 3.5.25 '@vueuse/core': 14.0.0(vue@3.5.25(typescript@5.9.3)) @@ -14812,13 +14342,15 @@ snapshots: mark.js: 8.11.1 minisearch: 7.2.0 shiki: 3.15.0 - vite: rolldown-vite@7.3.0(@types/node@24.10.2)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2) + vite: '@voidzero-dev/vite-plus-core@0.0.0-ab0b0858cb619f270f5e0a698fea3d6f5622a761(@types/node@24.10.2)(esbuild@0.25.12)(jiti@2.6.1)(less@4.4.2)(publint@0.3.16)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(typescript@5.9.3)(unplugin-unused@0.5.4)(yaml@2.8.2)' vue: 3.5.25(typescript@5.9.3) optionalDependencies: oxc-minify: 0.105.0 postcss: 8.5.6 transitivePeerDependencies: + - '@arethetypeswrong/core' - '@types/node' + - '@vitejs/devtools' - async-validator - axios - change-case @@ -14830,6 +14362,7 @@ snapshots: - jwt-decode - less - nprogress + - publint - qrcode - sass - sass-embedded @@ -14840,44 +14373,8 @@ snapshots: - tsx - typescript - universal-cookie - - yaml - - vitest@4.0.15(@types/node@24.10.2)(@vitest/ui@4.0.15)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2): - dependencies: - '@vitest/expect': 4.0.15 - '@vitest/mocker': 4.0.15(rolldown-vite@7.3.0(@types/node@24.10.2)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2)) - '@vitest/pretty-format': 4.0.15 - '@vitest/runner': 4.0.15 - '@vitest/snapshot': 4.0.15 - '@vitest/spy': 4.0.15 - '@vitest/utils': 4.0.15 - es-module-lexer: 1.7.0 - expect-type: 1.3.0 - magic-string: 0.30.21 - obug: 2.1.1 - pathe: 2.0.3 - picomatch: 4.0.3 - std-env: 3.10.0 - tinybench: 2.9.0 - tinyexec: 1.0.2 - tinyglobby: 0.2.15 - tinyrainbow: 3.0.3 - vite: rolldown-vite@7.3.0(@types/node@24.10.2)(esbuild@0.27.0)(jiti@2.6.1)(less@4.4.2)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.2) - why-is-node-running: 2.3.0 - optionalDependencies: - '@types/node': 24.10.2 - '@vitest/ui': 4.0.15(vitest@4.0.15) - transitivePeerDependencies: - - esbuild - - jiti - - less - - msw - - sass - - sass-embedded - - stylus - - sugarss - - terser - - tsx + - unplugin-lightningcss + - unplugin-unused - yaml vue@3.5.25(typescript@5.9.3): @@ -14946,11 +14443,6 @@ snapshots: dependencies: isexe: 2.0.0 - why-is-node-running@2.3.0: - dependencies: - siginfo: 2.0.0 - stackback: 0.0.2 - wide-align@1.1.5: dependencies: string-width: 4.2.3 @@ -15005,6 +14497,8 @@ snapshots: imurmurhash: 0.1.4 signal-exit: 4.1.0 + ws@8.19.0: {} + xss@1.0.15: dependencies: commander: 2.20.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 8b3061d56e..f3f0c712ff 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -172,9 +172,6 @@ catalog: on-finished: ^2.4.1 onelogger: ^1.0.1 oxc-minify: ^0.105.0 - oxfmt: ^0.20.0 - oxlint: ^1.32.0 - oxlint-tsgolint: ^0.11.0 parseurl: ^1.3.3 path-to-regexp: ^6.3.0 performance-ms: ^1.1.0 @@ -200,7 +197,6 @@ catalog: terminal-link: ^5.0.0 ts-node: ^10.9.2 tsconfig-paths: ^4.2.0 - tsdown: ^0.18.2 tsx: 4.20.6 type-fest: ^5.0.1 type-is: ^2.0.0 @@ -212,10 +208,12 @@ catalog: vary: ^1.1.2 vitepress: 2.0.0-alpha.15 vitepress-plugin-llms: ^1.10.0 - vitest: ^4.0.15 + vitest: npm:@voidzero-dev/vite-plus-test@latest xss: ^1.0.15 ylru: ^2.0.0 zod: ^3.24.1 + vite: npm:@voidzero-dev/vite-plus-core@latest + vite-plus: latest catalogMode: prefer @@ -247,6 +245,16 @@ minimumReleaseAgeExclude: - oxlint - oxc-minify - import-without-cache + - vite-plus + - '@voidzero-dev/*' overrides: - vite: npm:rolldown-vite@^7.1.13 + vite: 'catalog:' + vitest: 'catalog:' +peerDependencyRules: + allowAny: + - vite + - vitest + allowedVersions: + vite: '*' + vitest: '*' diff --git a/tegg/core/ajv-decorator/test/TransformEnum.test.ts b/tegg/core/ajv-decorator/test/TransformEnum.test.ts index 06b6f5ade2..f35563f5c4 100644 --- a/tegg/core/ajv-decorator/test/TransformEnum.test.ts +++ b/tegg/core/ajv-decorator/test/TransformEnum.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'node:assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { TransformEnum } from '../src/index.js'; diff --git a/tegg/core/ajv-decorator/test/index.test.ts b/tegg/core/ajv-decorator/test/index.test.ts index ddf7f1633a..b26a628c11 100644 --- a/tegg/core/ajv-decorator/test/index.test.ts +++ b/tegg/core/ajv-decorator/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/tegg/core/ajv-decorator/tsdown.config.ts b/tegg/core/ajv-decorator/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/ajv-decorator/tsdown.config.ts +++ b/tegg/core/ajv-decorator/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/ajv-decorator/vite.config.ts b/tegg/core/ajv-decorator/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/ajv-decorator/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/aop-decorator/test/AspectMetaBuilder.test.ts b/tegg/core/aop-decorator/test/AspectMetaBuilder.test.ts index 09d313d6be..170e0c78d5 100644 --- a/tegg/core/aop-decorator/test/AspectMetaBuilder.test.ts +++ b/tegg/core/aop-decorator/test/AspectMetaBuilder.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert'; import { PrototypeUtil } from '@eggjs/core-decorator'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { CrosscutAdviceFactory, AspectMetaBuilder } from '../src/index.ts'; import { diff --git a/tegg/core/aop-decorator/test/index.test.ts b/tegg/core/aop-decorator/test/index.test.ts index a02cd49a06..08e5b37990 100644 --- a/tegg/core/aop-decorator/test/index.test.ts +++ b/tegg/core/aop-decorator/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as types from '../src/index.js'; diff --git a/tegg/core/aop-decorator/tsdown.config.ts b/tegg/core/aop-decorator/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/aop-decorator/tsdown.config.ts +++ b/tegg/core/aop-decorator/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/aop-decorator/vite.config.ts b/tegg/core/aop-decorator/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/aop-decorator/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/aop-runtime/test/aop-runtime.test.ts b/tegg/core/aop-runtime/test/aop-runtime.test.ts index 5b4efef2c2..67bad06493 100644 --- a/tegg/core/aop-runtime/test/aop-runtime.test.ts +++ b/tegg/core/aop-runtime/test/aop-runtime.test.ts @@ -7,10 +7,7 @@ import { EggPrototypeLifecycleUtil, LoadUnitFactory, LoadUnitLifecycleUtil } fro import { CoreTestHelper, EggTestContext } from '@eggjs/module-test-util'; import { EggObjectLifecycleUtil, LoadUnitInstanceFactory } from '@eggjs/tegg-runtime'; import type { LoadUnitInstance } from '@eggjs/tegg-types'; -import { describe, beforeEach, afterEach, it } from 'vitest'; - -// must import before other imports -import { Hello } from './fixtures/modules/hello_succeed/Hello.js'; +import { describe, beforeEach, afterEach, it } from 'vite-plus/test'; import { crossCutGraphHook } from '../src/CrossCutGraphHook.js'; import { EggObjectAopHook } from '../src/EggObjectAopHook.js'; @@ -21,6 +18,8 @@ import { HelloConstructorInject } from './fixtures/modules/constructor_inject_ao import { CallTrace } from './fixtures/modules/hello_cross_cut/CallTrace.js'; import { crosscutAdviceParams } from './fixtures/modules/hello_cross_cut/HelloCrossCut.js'; import { pointcutAdviceParams } from './fixtures/modules/hello_point_cut/HelloPointCut.js'; +// must import before other imports +import { Hello } from './fixtures/modules/hello_succeed/Hello.js'; describe('test/aop-runtime.test.ts', () => { afterEach(() => { diff --git a/tegg/core/aop-runtime/test/index.test.ts b/tegg/core/aop-runtime/test/index.test.ts index a02cd49a06..08e5b37990 100644 --- a/tegg/core/aop-runtime/test/index.test.ts +++ b/tegg/core/aop-runtime/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as types from '../src/index.js'; diff --git a/tegg/core/aop-runtime/tsdown.config.ts b/tegg/core/aop-runtime/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/aop-runtime/tsdown.config.ts +++ b/tegg/core/aop-runtime/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/aop-runtime/vite.config.ts b/tegg/core/aop-runtime/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/aop-runtime/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/background-task/test/BackgroundTaskHelper.test.ts b/tegg/core/background-task/test/BackgroundTaskHelper.test.ts index 91567040e5..9798df18cb 100644 --- a/tegg/core/background-task/test/BackgroundTaskHelper.test.ts +++ b/tegg/core/background-task/test/BackgroundTaskHelper.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert'; import { TimerUtil } from '@eggjs/tegg-common-util'; -import { describe, it, beforeEach } from 'vitest'; +import { describe, it, beforeEach } from 'vite-plus/test'; import { BackgroundTaskHelper } from '../src/index.js'; diff --git a/tegg/core/background-task/test/index.test.ts b/tegg/core/background-task/test/index.test.ts index a02cd49a06..08e5b37990 100644 --- a/tegg/core/background-task/test/index.test.ts +++ b/tegg/core/background-task/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as types from '../src/index.js'; diff --git a/tegg/core/background-task/tsdown.config.ts b/tegg/core/background-task/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/background-task/tsdown.config.ts +++ b/tegg/core/background-task/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/background-task/vite.config.ts b/tegg/core/background-task/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/background-task/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/common-util/test/MapUtil.test.ts b/tegg/core/common-util/test/MapUtil.test.ts index c2aca5227a..b5ff2da4e9 100644 --- a/tegg/core/common-util/test/MapUtil.test.ts +++ b/tegg/core/common-util/test/MapUtil.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { MapUtil } from '../src/index.js'; diff --git a/tegg/core/common-util/test/ModuleConfig.test.ts b/tegg/core/common-util/test/ModuleConfig.test.ts index 3679c2ff4d..9e8dc4e9c2 100644 --- a/tegg/core/common-util/test/ModuleConfig.test.ts +++ b/tegg/core/common-util/test/ModuleConfig.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import path from 'node:path'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { ModuleConfigUtil } from '../src/index.js'; diff --git a/tegg/core/common-util/test/NameUtil.test.ts b/tegg/core/common-util/test/NameUtil.test.ts index bf07e41d90..4507e7be59 100644 --- a/tegg/core/common-util/test/NameUtil.test.ts +++ b/tegg/core/common-util/test/NameUtil.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { NameUtil } from '../src/index.js'; diff --git a/tegg/core/common-util/test/ObjectUtil.test.ts b/tegg/core/common-util/test/ObjectUtil.test.ts index 96892e6575..846492dd90 100644 --- a/tegg/core/common-util/test/ObjectUtil.test.ts +++ b/tegg/core/common-util/test/ObjectUtil.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { ObjectUtils } from '../src/index.js'; diff --git a/tegg/core/common-util/test/ProtoGraph.test.ts b/tegg/core/common-util/test/ProtoGraph.test.ts index 9e4691d67c..4cf292a5b9 100644 --- a/tegg/core/common-util/test/ProtoGraph.test.ts +++ b/tegg/core/common-util/test/ProtoGraph.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import type { GraphNodeObj } from '@eggjs/tegg-types'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { GraphNode, Graph } from '../src/index.js'; diff --git a/tegg/core/common-util/test/StackUtil.test.ts b/tegg/core/common-util/test/StackUtil.test.ts index cb1af1e8fe..89ca628d21 100644 --- a/tegg/core/common-util/test/StackUtil.test.ts +++ b/tegg/core/common-util/test/StackUtil.test.ts @@ -1,4 +1,4 @@ -import { describe, expect, it } from 'vitest'; +import { describe, expect, it } from 'vite-plus/test'; import { StackUtil } from '../src/index.ts'; diff --git a/tegg/core/common-util/test/TimerUtil.test.ts b/tegg/core/common-util/test/TimerUtil.test.ts index c751db740e..37ff54408c 100644 --- a/tegg/core/common-util/test/TimerUtil.test.ts +++ b/tegg/core/common-util/test/TimerUtil.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { TimerUtil } from '../src/index.js'; diff --git a/tegg/core/common-util/test/index.test.ts b/tegg/core/common-util/test/index.test.ts index a02cd49a06..08e5b37990 100644 --- a/tegg/core/common-util/test/index.test.ts +++ b/tegg/core/common-util/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as types from '../src/index.js'; diff --git a/tegg/core/common-util/tsdown.config.ts b/tegg/core/common-util/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/common-util/tsdown.config.ts +++ b/tegg/core/common-util/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/common-util/vite.config.ts b/tegg/core/common-util/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/common-util/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/controller-decorator/test/Acl.test.ts b/tegg/core/controller-decorator/test/Acl.test.ts index ca33bd103b..20e19aa704 100644 --- a/tegg/core/controller-decorator/test/Acl.test.ts +++ b/tegg/core/controller-decorator/test/Acl.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { ControllerType } from '@eggjs/tegg-types'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { ControllerMetaBuilderFactory, HTTPControllerMeta } from '../src/index.js'; import { AclController } from './fixtures/AclController.js'; diff --git a/tegg/core/controller-decorator/test/Context.test.ts b/tegg/core/controller-decorator/test/Context.test.ts index 94e9798c13..95f72bf356 100644 --- a/tegg/core/controller-decorator/test/Context.test.ts +++ b/tegg/core/controller-decorator/test/Context.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { MethodInfoUtil } from '../src/util/index.js'; import { ContextController } from './fixtures/ContextController.js'; diff --git a/tegg/core/controller-decorator/test/Middleware.test.ts b/tegg/core/controller-decorator/test/Middleware.test.ts index ca2d3a47e9..b3131c5d38 100644 --- a/tegg/core/controller-decorator/test/Middleware.test.ts +++ b/tegg/core/controller-decorator/test/Middleware.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { ControllerInfoUtil, MethodInfoUtil } from '../src/index.js'; import { diff --git a/tegg/core/controller-decorator/test/decorators.test.ts b/tegg/core/controller-decorator/test/decorators.test.ts index 66d8333533..2e1ecbfc93 100644 --- a/tegg/core/controller-decorator/test/decorators.test.ts +++ b/tegg/core/controller-decorator/test/decorators.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { PrototypeUtil } from '@eggjs/core-decorator'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { FooController } from './fixtures/HTTPFooController.js'; diff --git a/tegg/core/controller-decorator/test/http/HTTPMeta.test.ts b/tegg/core/controller-decorator/test/http/HTTPMeta.test.ts index a0de49338b..5c3a54823f 100644 --- a/tegg/core/controller-decorator/test/http/HTTPMeta.test.ts +++ b/tegg/core/controller-decorator/test/http/HTTPMeta.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert'; import { PointcutAdviceInfoUtil } from '@eggjs/aop-decorator'; import { ControllerType, HTTPMethodEnum } from '@eggjs/tegg-types'; -import { describe, it, beforeEach } from 'vitest'; +import { describe, it, beforeEach } from 'vite-plus/test'; import { BodyParamMeta, diff --git a/tegg/core/controller-decorator/test/http/Host.test.ts b/tegg/core/controller-decorator/test/http/Host.test.ts index 5662bac0f5..06e23cb855 100644 --- a/tegg/core/controller-decorator/test/http/Host.test.ts +++ b/tegg/core/controller-decorator/test/http/Host.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { ControllerInfoUtil, MethodInfoUtil } from '../../src/util/index.js'; import { HostController } from '../fixtures/HostController.js'; diff --git a/tegg/core/controller-decorator/test/index.test.ts b/tegg/core/controller-decorator/test/index.test.ts index a02cd49a06..08e5b37990 100644 --- a/tegg/core/controller-decorator/test/index.test.ts +++ b/tegg/core/controller-decorator/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as types from '../src/index.js'; diff --git a/tegg/core/controller-decorator/test/util/ControllerMetadataUtil.test.ts b/tegg/core/controller-decorator/test/util/ControllerMetadataUtil.test.ts index 19928b086a..85b6e9c1c9 100644 --- a/tegg/core/controller-decorator/test/util/ControllerMetadataUtil.test.ts +++ b/tegg/core/controller-decorator/test/util/ControllerMetadataUtil.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import { MetadataUtil } from '@eggjs/core-decorator'; import { CONTROLLER_META_DATA } from '@eggjs/tegg-types'; -import { describe, it, beforeEach } from 'vitest'; +import { describe, it, beforeEach } from 'vite-plus/test'; import { ControllerMetadataUtil } from '../../src/index.js'; import { FooController, ParentController, ChildController } from '../fixtures/HTTPFooController.js'; diff --git a/tegg/core/controller-decorator/test/util/HTTPPriority.test.ts b/tegg/core/controller-decorator/test/util/HTTPPriority.test.ts index 5bac99b3c5..3d45c0d14e 100644 --- a/tegg/core/controller-decorator/test/util/HTTPPriority.test.ts +++ b/tegg/core/controller-decorator/test/util/HTTPPriority.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { HTTPPriorityUtil } from '../../src/index.ts'; diff --git a/tegg/core/controller-decorator/tsdown.config.ts b/tegg/core/controller-decorator/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/controller-decorator/tsdown.config.ts +++ b/tegg/core/controller-decorator/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/controller-decorator/vite.config.ts b/tegg/core/controller-decorator/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/controller-decorator/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/core-decorator/test/decorators.test.ts b/tegg/core/core-decorator/test/decorators.test.ts index d9da64cd0a..f6f47a3f63 100644 --- a/tegg/core/core-decorator/test/decorators.test.ts +++ b/tegg/core/core-decorator/test/decorators.test.ts @@ -10,7 +10,7 @@ import { InjectType, } from '@eggjs/tegg-types'; import type { EggPrototypeInfo, EggMultiInstancePrototypeInfo, InjectObjectInfo } from '@eggjs/tegg-types'; -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import { PrototypeUtil, QualifierUtil } from '../src/index.ts'; import CacheService from './fixtures/decators/CacheService.ts'; diff --git a/tegg/core/core-decorator/test/index.test.ts b/tegg/core/core-decorator/test/index.test.ts index 98843692a8..c87a9ea080 100644 --- a/tegg/core/core-decorator/test/index.test.ts +++ b/tegg/core/core-decorator/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import * as types from '../src/index.ts'; diff --git a/tegg/core/core-decorator/test/util/MetadataUtil.test.ts b/tegg/core/core-decorator/test/util/MetadataUtil.test.ts index 11b4b02d96..c491eb1059 100644 --- a/tegg/core/core-decorator/test/util/MetadataUtil.test.ts +++ b/tegg/core/core-decorator/test/util/MetadataUtil.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { MetadataUtil } from '../../src/index.js'; diff --git a/tegg/core/core-decorator/tsdown.config.ts b/tegg/core/core-decorator/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/core-decorator/tsdown.config.ts +++ b/tegg/core/core-decorator/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/core-decorator/vite.config.ts b/tegg/core/core-decorator/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/core-decorator/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/dal-decorator/test/index.test.ts b/tegg/core/dal-decorator/test/index.test.ts index ac8e278a8b..74dc235acb 100644 --- a/tegg/core/dal-decorator/test/index.test.ts +++ b/tegg/core/dal-decorator/test/index.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { ColumnType, IndexType } from '@eggjs/tegg-types'; -import { expect, describe, it } from 'vitest'; +import { expect, describe, it } from 'vite-plus/test'; import { ColumnInfoUtil, IndexInfoUtil, TableInfoUtil, TableModel } from '../src/index.ts'; import * as types from '../src/index.ts'; diff --git a/tegg/core/dal-decorator/tsdown.config.ts b/tegg/core/dal-decorator/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/dal-decorator/tsdown.config.ts +++ b/tegg/core/dal-decorator/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/dal-decorator/vite.config.ts b/tegg/core/dal-decorator/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/dal-decorator/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/dal-runtime/test/CodeGenerator.test.ts b/tegg/core/dal-runtime/test/CodeGenerator.test.ts index e7b81e4e6a..fe5b6cf45b 100644 --- a/tegg/core/dal-runtime/test/CodeGenerator.test.ts +++ b/tegg/core/dal-runtime/test/CodeGenerator.test.ts @@ -3,7 +3,7 @@ import fs from 'node:fs/promises'; import path from 'node:path'; import { TableModel } from '@eggjs/dal-decorator'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { CodeGenerator } from '../src/CodeGenerator.js'; import { Foo } from './fixtures/modules/generate_codes/Foo.js'; diff --git a/tegg/core/dal-runtime/test/DAO.test.ts b/tegg/core/dal-runtime/test/DAO.test.ts index cfc6f462b3..930361ceb6 100644 --- a/tegg/core/dal-runtime/test/DAO.test.ts +++ b/tegg/core/dal-runtime/test/DAO.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert'; import path from 'node:path'; import { TableModel } from '@eggjs/dal-decorator'; -import { describe, it, beforeAll, afterAll } from 'vitest'; +import { describe, it, beforeAll, afterAll } from 'vite-plus/test'; import { MysqlDataSource, SqlMapLoader, DataSource, DatabaseForker } from '../src/index.ts'; import { BaseFooDAO } from './fixtures/modules/dal/dal/dao/base/BaseFooDAO.ts'; diff --git a/tegg/core/dal-runtime/test/DataSource.test.ts b/tegg/core/dal-runtime/test/DataSource.test.ts index 0ae4b10d9e..e7d37978f6 100644 --- a/tegg/core/dal-runtime/test/DataSource.test.ts +++ b/tegg/core/dal-runtime/test/DataSource.test.ts @@ -5,7 +5,7 @@ import { mock } from 'node:test'; import { TableModel } from '@eggjs/dal-decorator'; import { RDSClient } from '@eggjs/rds'; import type { DeleteResult, InsertResult, UpdateResult } from '@eggjs/rds'; -import { describe, it, afterEach, beforeAll, afterAll } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll } from 'vite-plus/test'; import { MysqlDataSource, SqlMapLoader, DataSource, TableModelInstanceBuilder, DatabaseForker } from '../src/index.ts'; import { BaseFooDAO } from './fixtures/modules/dal/dal/dao/base/BaseFooDAO.ts'; diff --git a/tegg/core/dal-runtime/test/SqlGenerator.test.ts b/tegg/core/dal-runtime/test/SqlGenerator.test.ts index 19c4d50f67..ce37944052 100644 --- a/tegg/core/dal-runtime/test/SqlGenerator.test.ts +++ b/tegg/core/dal-runtime/test/SqlGenerator.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert'; import { TableModel } from '@eggjs/dal-decorator'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { SqlGenerator } from '../src/index.ts'; import { AutoUpdateTime } from './fixtures/modules/dal/AutoUpdateTime.js'; diff --git a/tegg/core/dal-runtime/test/TableSqlMap.test.ts b/tegg/core/dal-runtime/test/TableSqlMap.test.ts index ab6f3f1aa1..54441b9305 100644 --- a/tegg/core/dal-runtime/test/TableSqlMap.test.ts +++ b/tegg/core/dal-runtime/test/TableSqlMap.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert'; import { TableModel } from '@eggjs/dal-decorator'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { SqlMapLoader } from '../src/SqlMapLoader.ts'; import { BaseFooDAO } from './fixtures/modules/dal/dal/dao/base/BaseFooDAO.js'; diff --git a/tegg/core/dal-runtime/test/index.test.ts b/tegg/core/dal-runtime/test/index.test.ts index a02cd49a06..08e5b37990 100644 --- a/tegg/core/dal-runtime/test/index.test.ts +++ b/tegg/core/dal-runtime/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as types from '../src/index.js'; diff --git a/tegg/core/dal-runtime/tsdown.config.ts b/tegg/core/dal-runtime/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/dal-runtime/tsdown.config.ts +++ b/tegg/core/dal-runtime/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/dal-runtime/vite.config.ts b/tegg/core/dal-runtime/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/dal-runtime/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/dynamic-inject-runtime/test/exports.test.ts b/tegg/core/dynamic-inject-runtime/test/exports.test.ts index ddf7f1633a..b26a628c11 100644 --- a/tegg/core/dynamic-inject-runtime/test/exports.test.ts +++ b/tegg/core/dynamic-inject-runtime/test/exports.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/tegg/core/dynamic-inject-runtime/test/index.test.ts b/tegg/core/dynamic-inject-runtime/test/index.test.ts index eafba2ad05..6f451d1a01 100644 --- a/tegg/core/dynamic-inject-runtime/test/index.test.ts +++ b/tegg/core/dynamic-inject-runtime/test/index.test.ts @@ -4,7 +4,7 @@ import path from 'node:path'; import { LoadUnitFactory } from '@eggjs/metadata'; import { EggTestContext, CoreTestHelper } from '@eggjs/module-test-util'; import { type LoadUnitInstance, LoadUnitInstanceFactory } from '@eggjs/tegg-runtime'; -import { describe, it, beforeEach, afterEach } from 'vitest'; +import { describe, it, beforeEach, afterEach } from 'vite-plus/test'; import { HelloService } from './fixtures/modules/dynamic-inject-module/HelloService.js'; diff --git a/tegg/core/dynamic-inject-runtime/tsdown.config.ts b/tegg/core/dynamic-inject-runtime/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/dynamic-inject-runtime/tsdown.config.ts +++ b/tegg/core/dynamic-inject-runtime/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/dynamic-inject-runtime/vite.config.ts b/tegg/core/dynamic-inject-runtime/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/dynamic-inject-runtime/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/dynamic-inject/test/index.test.ts b/tegg/core/dynamic-inject/test/index.test.ts index a02cd49a06..08e5b37990 100644 --- a/tegg/core/dynamic-inject/test/index.test.ts +++ b/tegg/core/dynamic-inject/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as types from '../src/index.js'; diff --git a/tegg/core/dynamic-inject/test/typing.test.ts b/tegg/core/dynamic-inject/test/typing.test.ts index 24e1e90cad..24b1354940 100644 --- a/tegg/core/dynamic-inject/test/typing.test.ts +++ b/tegg/core/dynamic-inject/test/typing.test.ts @@ -1,7 +1,7 @@ import path from 'node:path'; import coffee from 'coffee'; -import { it } from 'vitest'; +import { it } from 'vite-plus/test'; it('should check enum value', async () => { const tsc = require.resolve('typescript/bin/tsc'); diff --git a/tegg/core/dynamic-inject/tsdown.config.ts b/tegg/core/dynamic-inject/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/dynamic-inject/tsdown.config.ts +++ b/tegg/core/dynamic-inject/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/dynamic-inject/vite.config.ts b/tegg/core/dynamic-inject/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/dynamic-inject/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/eventbus-decorator/test/Event.test.ts b/tegg/core/eventbus-decorator/test/Event.test.ts index 959a44e033..785e215b42 100644 --- a/tegg/core/eventbus-decorator/test/Event.test.ts +++ b/tegg/core/eventbus-decorator/test/Event.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import { EventInfoUtil } from '../src/index.ts'; import { EmptyHandler } from './fixtures/empty-handle.ts'; diff --git a/tegg/core/eventbus-decorator/test/index.test.ts b/tegg/core/eventbus-decorator/test/index.test.ts index a2d4a57856..5d106f2ed7 100644 --- a/tegg/core/eventbus-decorator/test/index.test.ts +++ b/tegg/core/eventbus-decorator/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/tegg/core/eventbus-decorator/tsdown.config.ts b/tegg/core/eventbus-decorator/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/eventbus-decorator/tsdown.config.ts +++ b/tegg/core/eventbus-decorator/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/eventbus-decorator/vite.config.ts b/tegg/core/eventbus-decorator/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/eventbus-decorator/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/eventbus-runtime/test/EventBus.test.ts b/tegg/core/eventbus-runtime/test/EventBus.test.ts index 8f9c4a70bb..104d9c0cd4 100644 --- a/tegg/core/eventbus-runtime/test/EventBus.test.ts +++ b/tegg/core/eventbus-runtime/test/EventBus.test.ts @@ -8,7 +8,7 @@ import { type EggPrototype, LoadUnitFactory } from '@eggjs/metadata'; import { CoreTestHelper, EggTestContext } from '@eggjs/module-test-util'; import { TimerUtil } from '@eggjs/tegg-common-util'; import { type LoadUnitInstance, LoadUnitInstanceFactory } from '@eggjs/tegg-runtime'; -import { describe, it, beforeEach, afterEach } from 'vitest'; +import { describe, it, beforeEach, afterEach } from 'vite-plus/test'; import { EventContextFactory, EventHandlerFactory, SingletonEventBus } from '../src/index.ts'; import { HelloHandler, HelloProducer } from './fixtures/modules/event/HelloEvent.ts'; diff --git a/tegg/core/eventbus-runtime/test/index.test.ts b/tegg/core/eventbus-runtime/test/index.test.ts index ddf7f1633a..b26a628c11 100644 --- a/tegg/core/eventbus-runtime/test/index.test.ts +++ b/tegg/core/eventbus-runtime/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/tegg/core/eventbus-runtime/tsdown.config.ts b/tegg/core/eventbus-runtime/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/eventbus-runtime/tsdown.config.ts +++ b/tegg/core/eventbus-runtime/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/eventbus-runtime/vite.config.ts b/tegg/core/eventbus-runtime/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/eventbus-runtime/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/lifecycle/test/IdenticalObject.test.ts b/tegg/core/lifecycle/test/IdenticalObject.test.ts index d821273fb2..a2e8f26109 100644 --- a/tegg/core/lifecycle/test/IdenticalObject.test.ts +++ b/tegg/core/lifecycle/test/IdenticalObject.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import { IdenticalUtil } from '../src/index.ts'; diff --git a/tegg/core/lifecycle/test/index.test.ts b/tegg/core/lifecycle/test/index.test.ts index ddf7f1633a..b26a628c11 100644 --- a/tegg/core/lifecycle/test/index.test.ts +++ b/tegg/core/lifecycle/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/tegg/core/lifecycle/tsdown.config.ts b/tegg/core/lifecycle/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/lifecycle/tsdown.config.ts +++ b/tegg/core/lifecycle/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/lifecycle/vite.config.ts b/tegg/core/lifecycle/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/lifecycle/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/loader/test/Loader.test.ts b/tegg/core/loader/test/Loader.test.ts index de333d2e1d..881b795cdc 100644 --- a/tegg/core/loader/test/Loader.test.ts +++ b/tegg/core/loader/test/Loader.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import path from 'node:path'; import { EggLoadUnitType } from '@eggjs/metadata'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { LoaderFactory, LoaderUtil } from '../src/index.ts'; diff --git a/tegg/core/loader/test/index.test.ts b/tegg/core/loader/test/index.test.ts index a02cd49a06..08e5b37990 100644 --- a/tegg/core/loader/test/index.test.ts +++ b/tegg/core/loader/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as types from '../src/index.js'; diff --git a/tegg/core/loader/tsdown.config.ts b/tegg/core/loader/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/loader/tsdown.config.ts +++ b/tegg/core/loader/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/loader/vite.config.ts b/tegg/core/loader/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/loader/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/metadata/test/AppGraph.test.ts b/tegg/core/metadata/test/AppGraph.test.ts index f7058db194..dff64c5aa2 100644 --- a/tegg/core/metadata/test/AppGraph.test.ts +++ b/tegg/core/metadata/test/AppGraph.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import path from 'node:path'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { AppGraph, ModuleNode } from '../src/index.js'; import { RootProto } from './fixtures/modules/app-graph-modules/root/Root.js'; diff --git a/tegg/core/metadata/test/GlobalGraph.test.ts b/tegg/core/metadata/test/GlobalGraph.test.ts index b72aa65432..bf121d59dd 100644 --- a/tegg/core/metadata/test/GlobalGraph.test.ts +++ b/tegg/core/metadata/test/GlobalGraph.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import path from 'node:path'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { GlobalGraph } from '../src/index.js'; import { buildModuleNode } from './fixtures/LoaderUtil.js'; diff --git a/tegg/core/metadata/test/LoadUnit.test.ts b/tegg/core/metadata/test/LoadUnit.test.ts index c517bee72d..c03d74cbc6 100644 --- a/tegg/core/metadata/test/LoadUnit.test.ts +++ b/tegg/core/metadata/test/LoadUnit.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import path from 'node:path'; import { InitTypeQualifierAttribute, ObjectInitType } from '@eggjs/core-decorator'; -import { describe, it, beforeEach, afterEach } from 'vitest'; +import { describe, it, beforeEach, afterEach } from 'vite-plus/test'; import { EggLoadUnitType, diff --git a/tegg/core/metadata/test/ModuleGraph.test.ts b/tegg/core/metadata/test/ModuleGraph.test.ts index fee1a721cc..4c166de040 100644 --- a/tegg/core/metadata/test/ModuleGraph.test.ts +++ b/tegg/core/metadata/test/ModuleGraph.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import path from 'node:path'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { ModuleGraph } from '../src/index.js'; import { TestLoader } from './fixtures/TestLoader.js'; diff --git a/tegg/core/metadata/test/index.test.ts b/tegg/core/metadata/test/index.test.ts index ddf7f1633a..b26a628c11 100644 --- a/tegg/core/metadata/test/index.test.ts +++ b/tegg/core/metadata/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/tegg/core/metadata/tsdown.config.ts b/tegg/core/metadata/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/metadata/tsdown.config.ts +++ b/tegg/core/metadata/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/metadata/vite.config.ts b/tegg/core/metadata/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/metadata/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/orm-decorator/test/builder/AttributeMetaBuilder.test.ts b/tegg/core/orm-decorator/test/builder/AttributeMetaBuilder.test.ts index 632077fc6d..4f50d32682 100644 --- a/tegg/core/orm-decorator/test/builder/AttributeMetaBuilder.test.ts +++ b/tegg/core/orm-decorator/test/builder/AttributeMetaBuilder.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { AttributeMetaBuilder, AttributeMeta } from '../../src/index.js'; import { AttributeModel } from '../fixtures/AttributeModel.js'; diff --git a/tegg/core/orm-decorator/test/builder/IndexMetaBuilder.test.ts b/tegg/core/orm-decorator/test/builder/IndexMetaBuilder.test.ts index 6312d8ae08..fce61bd406 100644 --- a/tegg/core/orm-decorator/test/builder/IndexMetaBuilder.test.ts +++ b/tegg/core/orm-decorator/test/builder/IndexMetaBuilder.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { AttributeMetaBuilder, IndexMetaBuilder, IndexMeta } from '../../src/index.js'; import { DefaultIndexModel } from '../fixtures/DefaultIndexModel.js'; diff --git a/tegg/core/orm-decorator/test/builder/ModelMetaBuilder.test.ts b/tegg/core/orm-decorator/test/builder/ModelMetaBuilder.test.ts index 66eff74fde..934496a875 100644 --- a/tegg/core/orm-decorator/test/builder/ModelMetaBuilder.test.ts +++ b/tegg/core/orm-decorator/test/builder/ModelMetaBuilder.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { ModelMetaBuilder, ModelMetadata, AttributeMeta, IndexMeta } from '../../src/index.js'; import { Foo } from '../fixtures/Foo.js'; diff --git a/tegg/core/orm-decorator/test/decorator.test.ts b/tegg/core/orm-decorator/test/decorator.test.ts index ea71dd6753..7e9ab316e2 100644 --- a/tegg/core/orm-decorator/test/decorator.test.ts +++ b/tegg/core/orm-decorator/test/decorator.test.ts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { ModelInfoUtil } from '../src/index.ts'; import { Foo } from './fixtures/Foo.ts'; diff --git a/tegg/core/orm-decorator/test/index.test.ts b/tegg/core/orm-decorator/test/index.test.ts index ddf7f1633a..b26a628c11 100644 --- a/tegg/core/orm-decorator/test/index.test.ts +++ b/tegg/core/orm-decorator/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/tegg/core/orm-decorator/tsdown.config.ts b/tegg/core/orm-decorator/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/orm-decorator/tsdown.config.ts +++ b/tegg/core/orm-decorator/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/orm-decorator/vite.config.ts b/tegg/core/orm-decorator/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/orm-decorator/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/runtime/test/EggObject.test.ts b/tegg/core/runtime/test/EggObject.test.ts index 929216b45b..60af7ebbf9 100644 --- a/tegg/core/runtime/test/EggObject.test.ts +++ b/tegg/core/runtime/test/EggObject.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert'; import { mock } from 'node:test'; import { EggPrototypeFactory } from '@eggjs/metadata'; -import { describe, beforeEach, afterEach, it } from 'vitest'; +import { describe, beforeEach, afterEach, it } from 'vite-plus/test'; import { EggContainerFactory } from '../src/index.js'; import { ContextHandler } from '../src/model/ContextHandler.js'; diff --git a/tegg/core/runtime/test/EggObjectUtil.test.ts b/tegg/core/runtime/test/EggObjectUtil.test.ts index ff782401b8..c462f2ab07 100644 --- a/tegg/core/runtime/test/EggObjectUtil.test.ts +++ b/tegg/core/runtime/test/EggObjectUtil.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert'; import { mock } from 'node:test'; import { EggPrototypeFactory } from '@eggjs/metadata'; -import { describe, beforeEach, afterEach, it } from 'vitest'; +import { describe, beforeEach, afterEach, it } from 'vite-plus/test'; import { EggObjectUtil, ContextHandler } from '../src/index.js'; import { EggTestContext } from './fixtures/EggTestContext.js'; diff --git a/tegg/core/runtime/test/LoadUnitInstance.test.ts b/tegg/core/runtime/test/LoadUnitInstance.test.ts index 6ff3afe1e5..8629358a4b 100644 --- a/tegg/core/runtime/test/LoadUnitInstance.test.ts +++ b/tegg/core/runtime/test/LoadUnitInstance.test.ts @@ -5,7 +5,7 @@ import { mock } from 'node:test'; import { EggPrototypeFactory } from '@eggjs/metadata'; import { LoaderUtil } from '@eggjs/module-test-util'; import { type LoadUnitInstance } from '@eggjs/tegg-types'; -import { describe, beforeEach, afterEach, beforeAll, afterAll, it } from 'vitest'; +import { describe, beforeEach, afterEach, beforeAll, afterAll, it } from 'vite-plus/test'; import { EggContainerFactory } from '../src/index.js'; import { ContextHandler } from '../src/model/ContextHandler.js'; diff --git a/tegg/core/runtime/test/QualifierLoadUnitInstance.test.ts b/tegg/core/runtime/test/QualifierLoadUnitInstance.test.ts index 237d69d3c2..ee5fb7691f 100644 --- a/tegg/core/runtime/test/QualifierLoadUnitInstance.test.ts +++ b/tegg/core/runtime/test/QualifierLoadUnitInstance.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert'; import { mock } from 'node:test'; import { EggPrototypeFactory } from '@eggjs/metadata'; -import { describe, beforeEach, afterEach, it } from 'vitest'; +import { describe, beforeEach, afterEach, it } from 'vite-plus/test'; import { EggContainerFactory, ContextHandler } from '../src/index.js'; import { EggTestContext } from './fixtures/EggTestContext.js'; diff --git a/tegg/core/runtime/test/index.test.ts b/tegg/core/runtime/test/index.test.ts index a02cd49a06..08e5b37990 100644 --- a/tegg/core/runtime/test/index.test.ts +++ b/tegg/core/runtime/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as types from '../src/index.js'; diff --git a/tegg/core/runtime/tsdown.config.ts b/tegg/core/runtime/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/runtime/tsdown.config.ts +++ b/tegg/core/runtime/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/runtime/vite.config.ts b/tegg/core/runtime/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/runtime/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/schedule-decorator/test/index.test.ts b/tegg/core/schedule-decorator/test/index.test.ts index ddf7f1633a..b26a628c11 100644 --- a/tegg/core/schedule-decorator/test/index.test.ts +++ b/tegg/core/schedule-decorator/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/tegg/core/schedule-decorator/tsdown.config.ts b/tegg/core/schedule-decorator/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/schedule-decorator/tsdown.config.ts +++ b/tegg/core/schedule-decorator/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/schedule-decorator/vite.config.ts b/tegg/core/schedule-decorator/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/schedule-decorator/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/standalone-decorator/test/index.test.ts b/tegg/core/standalone-decorator/test/index.test.ts index ddf7f1633a..b26a628c11 100644 --- a/tegg/core/standalone-decorator/test/index.test.ts +++ b/tegg/core/standalone-decorator/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/tegg/core/standalone-decorator/tsdown.config.ts b/tegg/core/standalone-decorator/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/standalone-decorator/tsdown.config.ts +++ b/tegg/core/standalone-decorator/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/standalone-decorator/vite.config.ts b/tegg/core/standalone-decorator/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/standalone-decorator/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/tegg/test/ajv.test.ts b/tegg/core/tegg/test/ajv.test.ts index 574f252abf..51d10804d0 100644 --- a/tegg/core/tegg/test/ajv.test.ts +++ b/tegg/core/tegg/test/ajv.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import * as exports from '../src/ajv.ts'; diff --git a/tegg/core/tegg/test/aop.test.ts b/tegg/core/tegg/test/aop.test.ts index 40b2b6ef54..c335f7f0c2 100644 --- a/tegg/core/tegg/test/aop.test.ts +++ b/tegg/core/tegg/test/aop.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import * as exports from '../src/aop.ts'; diff --git a/tegg/core/tegg/test/dal.test.ts b/tegg/core/tegg/test/dal.test.ts index 6150b8a0cf..abb45f39b1 100644 --- a/tegg/core/tegg/test/dal.test.ts +++ b/tegg/core/tegg/test/dal.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import * as exports from '../src/dal.ts'; diff --git a/tegg/core/tegg/test/exports.test.ts b/tegg/core/tegg/test/exports.test.ts index a2d4a57856..5d106f2ed7 100644 --- a/tegg/core/tegg/test/exports.test.ts +++ b/tegg/core/tegg/test/exports.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/tegg/core/tegg/test/helper.test.ts b/tegg/core/tegg/test/helper.test.ts index 6ba98d63b0..73344aa8e9 100644 --- a/tegg/core/tegg/test/helper.test.ts +++ b/tegg/core/tegg/test/helper.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import { AbstractEggContext, diff --git a/tegg/core/tegg/test/index.test.ts b/tegg/core/tegg/test/index.test.ts index 42c80bb91a..48fbb99a67 100644 --- a/tegg/core/tegg/test/index.test.ts +++ b/tegg/core/tegg/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import { Acl, diff --git a/tegg/core/tegg/test/orm.test.ts b/tegg/core/tegg/test/orm.test.ts index ca5eb28b72..7dabd6e459 100644 --- a/tegg/core/tegg/test/orm.test.ts +++ b/tegg/core/tegg/test/orm.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import * as exports from '../src/orm.ts'; diff --git a/tegg/core/tegg/test/schedule.test.ts b/tegg/core/tegg/test/schedule.test.ts index 6e6f80ab45..aa2c03fef2 100644 --- a/tegg/core/tegg/test/schedule.test.ts +++ b/tegg/core/tegg/test/schedule.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import * as exports from '../src/schedule.ts'; diff --git a/tegg/core/tegg/test/stanalone.test.ts b/tegg/core/tegg/test/stanalone.test.ts index 374a6fd799..508d41e750 100644 --- a/tegg/core/tegg/test/stanalone.test.ts +++ b/tegg/core/tegg/test/stanalone.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import * as exports from '../src/standalone.ts'; diff --git a/tegg/core/tegg/test/transaction.test.ts b/tegg/core/tegg/test/transaction.test.ts index a5693b24aa..787751a15a 100644 --- a/tegg/core/tegg/test/transaction.test.ts +++ b/tegg/core/tegg/test/transaction.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import * as exports from '../src/transaction.ts'; diff --git a/tegg/core/test-util/test/index.test.ts b/tegg/core/test-util/test/index.test.ts index 98843692a8..c87a9ea080 100644 --- a/tegg/core/test-util/test/index.test.ts +++ b/tegg/core/test-util/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import * as types from '../src/index.ts'; diff --git a/tegg/core/test-util/tsdown.config.ts b/tegg/core/test-util/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/test-util/tsdown.config.ts +++ b/tegg/core/test-util/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/test-util/vite.config.ts b/tegg/core/test-util/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/test-util/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/transaction-decorator/test/builder/TransactionMetaBuilder.test.ts b/tegg/core/transaction-decorator/test/builder/TransactionMetaBuilder.test.ts index 3c6a07e4ee..c80d29bc6f 100644 --- a/tegg/core/transaction-decorator/test/builder/TransactionMetaBuilder.test.ts +++ b/tegg/core/transaction-decorator/test/builder/TransactionMetaBuilder.test.ts @@ -1,5 +1,5 @@ import { PropagationType } from '@eggjs/tegg-types'; -import { it, assert } from 'vitest'; +import { it, assert } from 'vite-plus/test'; import { TransactionMetadataUtil, TransactionMetaBuilder, Transactional } from '../../src/index.ts'; import { Foo, Bar, FooBar, BarFoo } from '../fixtures/transaction.ts'; diff --git a/tegg/core/transaction-decorator/test/index.test.ts b/tegg/core/transaction-decorator/test/index.test.ts index a02cd49a06..08e5b37990 100644 --- a/tegg/core/transaction-decorator/test/index.test.ts +++ b/tegg/core/transaction-decorator/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as types from '../src/index.js'; diff --git a/tegg/core/transaction-decorator/tsdown.config.ts b/tegg/core/transaction-decorator/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/core/transaction-decorator/tsdown.config.ts +++ b/tegg/core/transaction-decorator/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/core/transaction-decorator/vite.config.ts b/tegg/core/transaction-decorator/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/core/transaction-decorator/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/core/types/test/index.test.ts b/tegg/core/types/test/index.test.ts index ddf7f1633a..b26a628c11 100644 --- a/tegg/core/types/test/index.test.ts +++ b/tegg/core/types/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, it } from 'vitest'; +import { expect, it } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/tegg/plugin/ajv/test/ajv.test.ts b/tegg/plugin/ajv/test/ajv.test.ts index e8d07ec2b0..8006815f88 100644 --- a/tegg/plugin/ajv/test/ajv.test.ts +++ b/tegg/plugin/ajv/test/ajv.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import path from 'node:path'; import { mm, type MockApplication } from '@eggjs/mock'; -import { afterEach, it, beforeAll, afterAll } from 'vitest'; +import { afterEach, it, beforeAll, afterAll } from 'vite-plus/test'; let app: MockApplication; diff --git a/tegg/plugin/aop/test/aop.test.ts b/tegg/plugin/aop/test/aop.test.ts index be331d6bb0..c699261298 100644 --- a/tegg/plugin/aop/test/aop.test.ts +++ b/tegg/plugin/aop/test/aop.test.ts @@ -1,7 +1,7 @@ import path from 'node:path'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, afterEach, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, afterEach, expect } from 'vite-plus/test'; describe('plugin/aop/test/aop.test.ts', () => { let app: MockApplication; diff --git a/tegg/plugin/common/test/index.test.ts b/tegg/plugin/common/test/index.test.ts index a2d4a57856..5d106f2ed7 100644 --- a/tegg/plugin/common/test/index.test.ts +++ b/tegg/plugin/common/test/index.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from 'vitest'; +import { expect, test } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/tegg/plugin/common/tsdown.config.ts b/tegg/plugin/common/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/plugin/common/tsdown.config.ts +++ b/tegg/plugin/common/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/plugin/common/vite.config.ts b/tegg/plugin/common/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/plugin/common/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tegg/plugin/config/test/DuplicateOptionalModule.test.ts b/tegg/plugin/config/test/DuplicateOptionalModule.test.ts index 318b74e316..10b71698ce 100644 --- a/tegg/plugin/config/test/DuplicateOptionalModule.test.ts +++ b/tegg/plugin/config/test/DuplicateOptionalModule.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/tegg/plugin/config/test/ReadModule.test.ts b/tegg/plugin/config/test/ReadModule.test.ts index 2381eb28e8..e3dcdfee9f 100644 --- a/tegg/plugin/config/test/ReadModule.test.ts +++ b/tegg/plugin/config/test/ReadModule.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, beforeAll, expect } from 'vitest'; +import { describe, it, afterAll, beforeAll, expect } from 'vite-plus/test'; import { getFixtures } from './utils.ts'; diff --git a/tegg/plugin/controller/test/http/acl.test.ts b/tegg/plugin/controller/test/http/acl.test.ts index 25c203d4ca..4c6062b829 100644 --- a/tegg/plugin/controller/test/http/acl.test.ts +++ b/tegg/plugin/controller/test/http/acl.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vite-plus/test'; import { getFixtures } from '../utils.ts'; diff --git a/tegg/plugin/controller/test/http/edgecase.test.ts b/tegg/plugin/controller/test/http/edgecase.test.ts index 6c4ea6cadb..eb1fcc8a5d 100644 --- a/tegg/plugin/controller/test/http/edgecase.test.ts +++ b/tegg/plugin/controller/test/http/edgecase.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vite-plus/test'; import { getFixtures } from '../utils.ts'; diff --git a/tegg/plugin/controller/test/http/host.test.ts b/tegg/plugin/controller/test/http/host.test.ts index 7f0b224605..0de07ef618 100644 --- a/tegg/plugin/controller/test/http/host.test.ts +++ b/tegg/plugin/controller/test/http/host.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vite-plus/test'; import { getFixtures } from '../utils.ts'; diff --git a/tegg/plugin/controller/test/http/middleware.test.ts b/tegg/plugin/controller/test/http/middleware.test.ts index 5636917856..2674432252 100644 --- a/tegg/plugin/controller/test/http/middleware.test.ts +++ b/tegg/plugin/controller/test/http/middleware.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vite-plus/test'; import { getFixtures } from '../utils.ts'; diff --git a/tegg/plugin/controller/test/http/module.test.ts b/tegg/plugin/controller/test/http/module.test.ts index 5a33dca9bc..21674c5074 100644 --- a/tegg/plugin/controller/test/http/module.test.ts +++ b/tegg/plugin/controller/test/http/module.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vite-plus/test'; import { getFixtures } from '../utils.ts'; diff --git a/tegg/plugin/controller/test/http/params.test.ts b/tegg/plugin/controller/test/http/params.test.ts index 9fde21547d..e454a340d4 100644 --- a/tegg/plugin/controller/test/http/params.test.ts +++ b/tegg/plugin/controller/test/http/params.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vite-plus/test'; import { getFixtures } from '../utils.ts'; diff --git a/tegg/plugin/controller/test/http/priority.test.ts b/tegg/plugin/controller/test/http/priority.test.ts index c28455c048..b8fa72a46c 100644 --- a/tegg/plugin/controller/test/http/priority.test.ts +++ b/tegg/plugin/controller/test/http/priority.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach, beforeAll, afterAll } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll } from 'vite-plus/test'; import { getFixtures } from '../utils.ts'; diff --git a/tegg/plugin/controller/test/http/proto-poisoning.test.ts b/tegg/plugin/controller/test/http/proto-poisoning.test.ts index b75a8f4c60..ab46c3e0b0 100644 --- a/tegg/plugin/controller/test/http/proto-poisoning.test.ts +++ b/tegg/plugin/controller/test/http/proto-poisoning.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vite-plus/test'; import { getFixtures } from '../utils.ts'; diff --git a/tegg/plugin/controller/test/http/request.test.ts b/tegg/plugin/controller/test/http/request.test.ts index b39f16966b..74325804fe 100644 --- a/tegg/plugin/controller/test/http/request.test.ts +++ b/tegg/plugin/controller/test/http/request.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll, expect } from 'vite-plus/test'; import { getFixtures } from '../utils.ts'; diff --git a/tegg/plugin/controller/test/lib/ControllerMetaManager.test.ts b/tegg/plugin/controller/test/lib/ControllerMetaManager.test.ts index d5db34a4e5..e89838400a 100644 --- a/tegg/plugin/controller/test/lib/ControllerMetaManager.test.ts +++ b/tegg/plugin/controller/test/lib/ControllerMetaManager.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach, expect } from 'vitest'; +import { describe, it, afterEach, expect } from 'vite-plus/test'; import { getFixtures } from '../utils.ts'; diff --git a/tegg/plugin/controller/test/lib/EggControllerLoader.test.ts b/tegg/plugin/controller/test/lib/EggControllerLoader.test.ts index 6f5072d91e..c4181a90d9 100644 --- a/tegg/plugin/controller/test/lib/EggControllerLoader.test.ts +++ b/tegg/plugin/controller/test/lib/EggControllerLoader.test.ts @@ -1,5 +1,5 @@ import { ControllerMetadataUtil } from '@eggjs/tegg'; -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import { EggControllerLoader } from '../../src/lib/EggControllerLoader.ts'; import { getFixtures } from '../utils.ts'; diff --git a/tegg/plugin/controller/test/lib/HTTPMethodRegister.test.ts b/tegg/plugin/controller/test/lib/HTTPMethodRegister.test.ts index 75e01bdd8a..b94906f755 100644 --- a/tegg/plugin/controller/test/lib/HTTPMethodRegister.test.ts +++ b/tegg/plugin/controller/test/lib/HTTPMethodRegister.test.ts @@ -10,7 +10,7 @@ import { import { EggRouter } from '@eggjs/router'; import { CONTROLLER_META_DATA, HTTPControllerMeta } from '@eggjs/tegg'; import { EggContainerFactory } from '@eggjs/tegg-runtime'; -import { describe, it, beforeAll, afterAll, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, expect } from 'vite-plus/test'; import { CONTROLLER_LOAD_UNIT, ControllerLoadUnit } from '../../src/lib/ControllerLoadUnit.ts'; import { EggControllerLoader } from '../../src/lib/EggControllerLoader.ts'; diff --git a/tegg/plugin/dal/test/dal.test.ts b/tegg/plugin/dal/test/dal.test.ts index 5eb98b6055..ec115a70b4 100644 --- a/tegg/plugin/dal/test/dal.test.ts +++ b/tegg/plugin/dal/test/dal.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, afterEach, beforeAll, afterAll, it, expect } from 'vitest'; +import { describe, afterEach, beforeAll, afterAll, it, expect } from 'vite-plus/test'; // @ts-ignore exclude file import FooDAO from './fixtures/apps/dal-app/modules/dal/dal/dao/FooDAO.ts'; diff --git a/tegg/plugin/dal/test/transaction.test.ts b/tegg/plugin/dal/test/transaction.test.ts index 6ca66610b0..5d83683d03 100644 --- a/tegg/plugin/dal/test/transaction.test.ts +++ b/tegg/plugin/dal/test/transaction.test.ts @@ -1,5 +1,5 @@ import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, afterEach, beforeAll, afterAll, it, expect } from 'vitest'; +import { describe, afterEach, beforeAll, afterAll, it, expect } from 'vite-plus/test'; import { MysqlDataSourceManager } from '../src/lib/MysqlDataSourceManager.ts'; import FooDAO from './fixtures/apps/dal-app/modules/dal/dal/dao/FooDAO.ts'; diff --git a/tegg/plugin/eventbus/test/eventbus.test.ts b/tegg/plugin/eventbus/test/eventbus.test.ts index 59ed2f9507..fe1a3121d0 100644 --- a/tegg/plugin/eventbus/test/eventbus.test.ts +++ b/tegg/plugin/eventbus/test/eventbus.test.ts @@ -1,7 +1,7 @@ import { mm, type MockApplication } from '@eggjs/mock'; import { type IEventContext } from '@eggjs/tegg'; import { TimerUtil } from '@eggjs/tegg-common-util'; -import { describe, afterEach, beforeAll, afterAll, it, expect } from 'vitest'; +import { describe, afterEach, beforeAll, afterAll, it, expect } from 'vite-plus/test'; import { HelloLogger } from './fixtures/apps/event-app/app/event-module/HelloLogger.ts'; import { HelloService } from './fixtures/apps/event-app/app/event-module/HelloService.ts'; diff --git a/tegg/plugin/orm/test/exports.test.ts b/tegg/plugin/orm/test/exports.test.ts index 0c00eb2afd..6b286734db 100644 --- a/tegg/plugin/orm/test/exports.test.ts +++ b/tegg/plugin/orm/test/exports.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect } from 'vitest'; +import { describe, it, expect } from 'vite-plus/test'; import * as exports from '../src/index.ts'; diff --git a/tegg/plugin/orm/test/index.test.ts b/tegg/plugin/orm/test/index.test.ts index 54eb39cdd9..05c852d1b6 100644 --- a/tegg/plugin/orm/test/index.test.ts +++ b/tegg/plugin/orm/test/index.test.ts @@ -4,7 +4,7 @@ import path from 'node:path'; import { mm, type MockApplication } from '@eggjs/mock'; import type { Context } from 'egg'; import Realm from 'leoric'; -import { describe, it, afterEach, beforeEach, beforeAll, afterAll } from 'vitest'; +import { describe, it, afterEach, beforeEach, beforeAll, afterAll } from 'vite-plus/test'; import { AppService } from './fixtures/apps/orm-app/modules/orm-module/AppService.ts'; import { CtxService } from './fixtures/apps/orm-app/modules/orm-module/CtxService.ts'; diff --git a/tegg/plugin/schedule/test/schedule.test.ts b/tegg/plugin/schedule/test/schedule.test.ts index 67876352e9..7938e8e4c9 100644 --- a/tegg/plugin/schedule/test/schedule.test.ts +++ b/tegg/plugin/schedule/test/schedule.test.ts @@ -4,7 +4,7 @@ import path from 'node:path'; import { mm, type MockApplication } from '@eggjs/mock'; import { TimerUtil } from '@eggjs/tegg-common-util'; -import { describe, it, afterEach, beforeAll, afterAll } from 'vitest'; +import { describe, it, afterEach, beforeAll, afterAll } from 'vite-plus/test'; const FooSubscriberFilePath = path.join( import.meta.dirname, diff --git a/tegg/plugin/tegg/test/AccessLevelCheck.test.ts b/tegg/plugin/tegg/test/AccessLevelCheck.test.ts index 136d09cd05..478f0b44c6 100644 --- a/tegg/plugin/tegg/test/AccessLevelCheck.test.ts +++ b/tegg/plugin/tegg/test/AccessLevelCheck.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import MainService from './fixtures/apps/access-level-check/modules/module-main/MainService.ts'; import { getAppBaseDir } from './utils.ts'; diff --git a/tegg/plugin/tegg/test/BackgroundTask.test.ts b/tegg/plugin/tegg/test/BackgroundTask.test.ts index 668b960ea6..9664490dc3 100644 --- a/tegg/plugin/tegg/test/BackgroundTask.test.ts +++ b/tegg/plugin/tegg/test/BackgroundTask.test.ts @@ -6,7 +6,7 @@ import { mm, type MockApplication } from '@eggjs/mock'; import { BackgroundTaskHelper } from '@eggjs/tegg'; import { TimerUtil } from '@eggjs/tegg-common-util'; import { type EggContext, EggContextLifecycleUtil } from '@eggjs/tegg-runtime'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import { CountService } from './fixtures/apps/background-app/modules/multi-module-background/CountService.ts'; import { getAppBaseDir } from './utils.ts'; diff --git a/tegg/plugin/tegg/test/ConstructorModuleConfig.test.ts b/tegg/plugin/tegg/test/ConstructorModuleConfig.test.ts index 2aa5ed9e13..dc7c6e80e5 100644 --- a/tegg/plugin/tegg/test/ConstructorModuleConfig.test.ts +++ b/tegg/plugin/tegg/test/ConstructorModuleConfig.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import { Foo } from './fixtures/apps/constructor-module-config/modules/module-with-config/foo.ts'; import { getAppBaseDir } from './utils.ts'; diff --git a/tegg/plugin/tegg/test/DynamicInject.test.ts b/tegg/plugin/tegg/test/DynamicInject.test.ts index f09117715d..971b92b78c 100644 --- a/tegg/plugin/tegg/test/DynamicInject.test.ts +++ b/tegg/plugin/tegg/test/DynamicInject.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import { getAppBaseDir } from './utils.ts'; diff --git a/tegg/plugin/tegg/test/EggCompatible.test.ts b/tegg/plugin/tegg/test/EggCompatible.test.ts index cb7bbff49f..95427233de 100644 --- a/tegg/plugin/tegg/test/EggCompatible.test.ts +++ b/tegg/plugin/tegg/test/EggCompatible.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import EggTypeService from './fixtures/apps/egg-app/modules/multi-module-service/EggTypeService.ts'; import TraceService from './fixtures/apps/egg-app/modules/multi-module-service/TraceService.ts'; diff --git a/tegg/plugin/tegg/test/Inject.test.ts b/tegg/plugin/tegg/test/Inject.test.ts index 57f31b9667..730ccdf490 100644 --- a/tegg/plugin/tegg/test/Inject.test.ts +++ b/tegg/plugin/tegg/test/Inject.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterEach, afterAll, beforeAll } from 'vitest'; +import { describe, it, afterEach, afterAll, beforeAll } from 'vite-plus/test'; import { BarService } from './fixtures/apps/optional-inject/app/modules/module-a/BarService.ts'; import { FooService } from './fixtures/apps/optional-inject/app/modules/module-a/FooService.ts'; diff --git a/tegg/plugin/tegg/test/ModuleConfig.test.ts b/tegg/plugin/tegg/test/ModuleConfig.test.ts index 270ec9d4b3..21eda733b6 100644 --- a/tegg/plugin/tegg/test/ModuleConfig.test.ts +++ b/tegg/plugin/tegg/test/ModuleConfig.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import { getAppBaseDir } from './utils.ts'; diff --git a/tegg/plugin/tegg/test/MultiInstanceInjectMultiInstance.test.ts b/tegg/plugin/tegg/test/MultiInstanceInjectMultiInstance.test.ts index 1dad89e346..a037365ac3 100644 --- a/tegg/plugin/tegg/test/MultiInstanceInjectMultiInstance.test.ts +++ b/tegg/plugin/tegg/test/MultiInstanceInjectMultiInstance.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import { App } from './fixtures/apps/app-multi-inject-multi/app/modules/app/App.ts'; import { App2 } from './fixtures/apps/app-multi-inject-multi/app/modules/app2/App.ts'; diff --git a/tegg/plugin/tegg/test/NoModuleJson.test.ts b/tegg/plugin/tegg/test/NoModuleJson.test.ts index d4d496c0b1..747a2ad7ce 100644 --- a/tegg/plugin/tegg/test/NoModuleJson.test.ts +++ b/tegg/plugin/tegg/test/NoModuleJson.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import { getAppBaseDir } from './utils.ts'; diff --git a/tegg/plugin/tegg/test/OptionalModule.test.ts b/tegg/plugin/tegg/test/OptionalModule.test.ts index 476f0b46b3..961102d2a1 100644 --- a/tegg/plugin/tegg/test/OptionalModule.test.ts +++ b/tegg/plugin/tegg/test/OptionalModule.test.ts @@ -1,6 +1,6 @@ import { mm, type MockApplication } from '@eggjs/mock'; // import assert from 'node:assert/strict'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import { getAppBaseDir } from './utils.ts'; // import { RootProto } from './fixtures/apps/optional-module/app/modules/root/Root.js'; diff --git a/tegg/plugin/tegg/test/OptionalPluginModule.test.ts b/tegg/plugin/tegg/test/OptionalPluginModule.test.ts index 7402186011..9c7158211b 100644 --- a/tegg/plugin/tegg/test/OptionalPluginModule.test.ts +++ b/tegg/plugin/tegg/test/OptionalPluginModule.test.ts @@ -1,6 +1,6 @@ import { mm, type MockApplication } from '@eggjs/mock'; // import assert from 'node:assert/strict'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; // import { UsedProto } from './fixtures/apps/plugin-module/node_modules/foo-plugin/Used.ts'; diff --git a/tegg/plugin/tegg/test/SameProtoName.test.ts b/tegg/plugin/tegg/test/SameProtoName.test.ts index 2a10e5612e..90c7e1fd55 100644 --- a/tegg/plugin/tegg/test/SameProtoName.test.ts +++ b/tegg/plugin/tegg/test/SameProtoName.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import { BarService } from './fixtures/apps/same-name-protos/app/modules/module-a/BarService.ts'; import { getAppBaseDir } from './utils.ts'; diff --git a/tegg/plugin/tegg/test/Subscription.test.ts b/tegg/plugin/tegg/test/Subscription.test.ts index bc601ae97f..01b7b2e8d4 100644 --- a/tegg/plugin/tegg/test/Subscription.test.ts +++ b/tegg/plugin/tegg/test/Subscription.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import AppService from './fixtures/apps/schedule-app/modules/multi-module-service/AppService.ts'; import { getAppBaseDir } from './utils.ts'; diff --git a/tegg/plugin/tegg/test/app/extend/application-one-module.test.ts b/tegg/plugin/tegg/test/app/extend/application-one-module.test.ts index 833ea67541..794efe1859 100644 --- a/tegg/plugin/tegg/test/app/extend/application-one-module.test.ts +++ b/tegg/plugin/tegg/test/app/extend/application-one-module.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import PersistenceService from '../../fixtures/apps/egg-app-simple/modules/multi-module-repo/PersistenceService.ts'; import { getAppBaseDir } from '../../utils.ts'; diff --git a/tegg/plugin/tegg/test/app/extend/application.test.ts b/tegg/plugin/tegg/test/app/extend/application.test.ts index 3a02a77bb9..b9f51d3d97 100644 --- a/tegg/plugin/tegg/test/app/extend/application.test.ts +++ b/tegg/plugin/tegg/test/app/extend/application.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import PersistenceService from '../../fixtures/apps/egg-app/modules/multi-module-repo/PersistenceService.ts'; import AppService from '../../fixtures/apps/egg-app/modules/multi-module-service/AppService.ts'; diff --git a/tegg/plugin/tegg/test/app/extend/application.unittest.test.ts b/tegg/plugin/tegg/test/app/extend/application.unittest.test.ts index 2b31290f87..e325171fd4 100644 --- a/tegg/plugin/tegg/test/app/extend/application.unittest.test.ts +++ b/tegg/plugin/tegg/test/app/extend/application.unittest.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm, type MockApplication } from '@eggjs/mock'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import { getAppBaseDir } from '../../utils.ts'; diff --git a/tegg/plugin/tegg/test/app/extend/context.test.ts b/tegg/plugin/tegg/test/app/extend/context.test.ts index a7045f88ba..e5fa53db1d 100644 --- a/tegg/plugin/tegg/test/app/extend/context.test.ts +++ b/tegg/plugin/tegg/test/app/extend/context.test.ts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import { mm, type MockApplication } from '@eggjs/mock'; import { TimerUtil } from '@eggjs/tegg-common-util'; -import { describe, it, afterAll, afterEach, beforeAll } from 'vitest'; +import { describe, it, afterAll, afterEach, beforeAll } from 'vite-plus/test'; import { LONG_STACK_DELIMITER } from '../../../src/lib/run_in_background.ts'; import PersistenceService from '../../fixtures/apps/egg-app/modules/multi-module-repo/PersistenceService.ts'; diff --git a/tegg/plugin/tegg/test/close.test.ts b/tegg/plugin/tegg/test/close.test.ts index bfb31325b3..ad38883dd8 100644 --- a/tegg/plugin/tegg/test/close.test.ts +++ b/tegg/plugin/tegg/test/close.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { mm } from '@eggjs/mock'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; import { getAppBaseDir } from './utils.ts'; diff --git a/tegg/plugin/tegg/test/lib/EggModuleLoader.test.ts b/tegg/plugin/tegg/test/lib/EggModuleLoader.test.ts index f66aaed7cb..361705131e 100644 --- a/tegg/plugin/tegg/test/lib/EggModuleLoader.test.ts +++ b/tegg/plugin/tegg/test/lib/EggModuleLoader.test.ts @@ -1,8 +1,9 @@ import assert from 'node:assert/strict'; + // import { scheduler } from 'node:timers/promises'; import { mm } from '@eggjs/mock'; -import { describe, it, afterEach } from 'vitest'; +import { describe, it, afterEach } from 'vite-plus/test'; import { getAppBaseDir } from '../utils.ts'; diff --git a/tegg/standalone/standalone/test/index.test.ts b/tegg/standalone/standalone/test/index.test.ts index ffb3a96dc7..8f253ab9c8 100644 --- a/tegg/standalone/standalone/test/index.test.ts +++ b/tegg/standalone/standalone/test/index.test.ts @@ -7,7 +7,7 @@ import { pathToFileURL } from 'node:url'; import { type ModuleConfig, ModuleConfigs, ModuleDescriptorDumper } from '@eggjs/tegg/helper'; import { importResolve } from '@eggjs/utils'; import { mm } from 'mm'; -import { describe, it, afterEach, beforeEach } from 'vitest'; +import { describe, it, afterEach, beforeEach } from 'vite-plus/test'; import { main, StandaloneContext, Runner, preLoad } from '../src/index.ts'; import { crosscutAdviceParams, pointcutAdviceParams } from './fixtures/aop-module/Hello.ts'; diff --git a/tegg/standalone/standalone/tsdown.config.ts b/tegg/standalone/standalone/tsdown.config.ts index 6dfb63bdb8..6710c7961c 100644 --- a/tegg/standalone/standalone/tsdown.config.ts +++ b/tegg/standalone/standalone/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ entry: { diff --git a/tegg/standalone/standalone/vite.config.ts b/tegg/standalone/standalone/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tegg/standalone/standalone/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tools/create-egg/src/templates/simple-ts/test/app/controller/home.test.ts b/tools/create-egg/src/templates/simple-ts/test/app/controller/home.test.ts index 39c6246295..63c55665ee 100644 --- a/tools/create-egg/src/templates/simple-ts/test/app/controller/home.test.ts +++ b/tools/create-egg/src/templates/simple-ts/test/app/controller/home.test.ts @@ -1,5 +1,5 @@ import { app } from '@eggjs/mock/bootstrap'; -import { test, expect } from 'vitest'; +import { test, expect } from 'vite-plus/test'; test('should GET / status 200', async () => { const res = await app.httpRequest().get('/').expect(200); diff --git a/tools/create-egg/src/templates/simple-ts/test/app/service/Test.test.ts b/tools/create-egg/src/templates/simple-ts/test/app/service/Test.test.ts index 34a31ef053..411f6ba836 100644 --- a/tools/create-egg/src/templates/simple-ts/test/app/service/Test.test.ts +++ b/tools/create-egg/src/templates/simple-ts/test/app/service/Test.test.ts @@ -1,5 +1,5 @@ import { app } from '@eggjs/mock/bootstrap'; -import { test, expect } from 'vitest'; +import { test, expect } from 'vite-plus/test'; test('sayHi should return hi, egg', async () => { const ctx = app.mockContext(); diff --git a/tools/create-egg/src/templates/simple-ts/test/setup.ts b/tools/create-egg/src/templates/simple-ts/test/setup.ts index e1ba73ea38..b3104143b7 100644 --- a/tools/create-egg/src/templates/simple-ts/test/setup.ts +++ b/tools/create-egg/src/templates/simple-ts/test/setup.ts @@ -1,4 +1,4 @@ -import { beforeAll, afterAll } from 'vitest'; +import { beforeAll, afterAll } from 'vite-plus/test'; // https://vitest.dev/config/#setupfiles // export beforeAll and afterAll to globalThis, let @eggjs/mock/bootstrap use it diff --git a/tools/create-egg/src/templates/simple-ts/vitest.config.ts b/tools/create-egg/src/templates/simple-ts/vitest.config.ts index b72cfd4abc..145a7bca48 100644 --- a/tools/create-egg/src/templates/simple-ts/vitest.config.ts +++ b/tools/create-egg/src/templates/simple-ts/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'vitest/config'; +import { defineConfig } from 'vite-plus'; export default defineConfig({ test: { diff --git a/tools/create-egg/src/templates/tegg/test/app/module/bar/controller/home.test.ts b/tools/create-egg/src/templates/tegg/test/app/module/bar/controller/home.test.ts index f02cbf6c54..1b94a900c9 100644 --- a/tools/create-egg/src/templates/tegg/test/app/module/bar/controller/home.test.ts +++ b/tools/create-egg/src/templates/tegg/test/app/module/bar/controller/home.test.ts @@ -1,5 +1,5 @@ import { app } from '@eggjs/mock/bootstrap'; -import { test, expect } from 'vitest'; +import { test, expect } from 'vite-plus/test'; test('should GET / status 200', async () => { const res = await app.httpRequest().get('/'); diff --git a/tools/create-egg/src/templates/tegg/test/app/module/bar/controller/user.test.ts b/tools/create-egg/src/templates/tegg/test/app/module/bar/controller/user.test.ts index 1795f62f81..0577e5a237 100644 --- a/tools/create-egg/src/templates/tegg/test/app/module/bar/controller/user.test.ts +++ b/tools/create-egg/src/templates/tegg/test/app/module/bar/controller/user.test.ts @@ -1,5 +1,5 @@ import { app } from '@eggjs/mock/bootstrap'; -import { test, expect } from 'vitest'; +import { test, expect } from 'vite-plus/test'; test('should GET /bar/user status 200', async () => { const res = await app.httpRequest().get('/bar/user').query({ userId: '20170901' }); diff --git a/tools/create-egg/src/templates/tegg/test/app/module/foo/service/HelloService.test.skip.ts b/tools/create-egg/src/templates/tegg/test/app/module/foo/service/HelloService.test.skip.ts index 7cb2b08a89..c86535fe46 100644 --- a/tools/create-egg/src/templates/tegg/test/app/module/foo/service/HelloService.test.skip.ts +++ b/tools/create-egg/src/templates/tegg/test/app/module/foo/service/HelloService.test.skip.ts @@ -1,5 +1,5 @@ import { app } from '@eggjs/mock/bootstrap'; -import { test, expect } from 'vitest'; +import { test, expect } from 'vite-plus/test'; import { HelloService } from '../../../../../app/module/foo/index.ts'; diff --git a/tools/create-egg/src/templates/tegg/test/setup.ts b/tools/create-egg/src/templates/tegg/test/setup.ts index e1ba73ea38..b3104143b7 100644 --- a/tools/create-egg/src/templates/tegg/test/setup.ts +++ b/tools/create-egg/src/templates/tegg/test/setup.ts @@ -1,4 +1,4 @@ -import { beforeAll, afterAll } from 'vitest'; +import { beforeAll, afterAll } from 'vite-plus/test'; // https://vitest.dev/config/#setupfiles // export beforeAll and afterAll to globalThis, let @eggjs/mock/bootstrap use it diff --git a/tools/create-egg/src/templates/tegg/vitest.config.ts b/tools/create-egg/src/templates/tegg/vitest.config.ts index b72cfd4abc..145a7bca48 100644 --- a/tools/create-egg/src/templates/tegg/vitest.config.ts +++ b/tools/create-egg/src/templates/tegg/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'vitest/config'; +import { defineConfig } from 'vite-plus'; export default defineConfig({ test: { diff --git a/tools/create-egg/test/cli.test.ts b/tools/create-egg/test/cli.test.ts index dbbc079eec..9390e6bdea 100644 --- a/tools/create-egg/test/cli.test.ts +++ b/tools/create-egg/test/cli.test.ts @@ -4,7 +4,7 @@ import path from 'node:path'; import type { SyncOptions, SyncResult } from 'execa'; import { execaCommandSync } from 'execa'; -import { afterAll, afterEach, beforeAll, expect, test } from 'vitest'; +import { afterAll, afterEach, beforeAll, expect, test } from 'vite-plus/test'; const SRC_PATH = path.join(import.meta.dirname, '../src'); const CLI_PATH = path.join(SRC_PATH, 'cli.ts'); @@ -119,89 +119,87 @@ test.skipIf(isNode20)('successfully scaffolds a project based on tegg starter te }); // FIXME: Command failed with exit code 1: pnpm 'test:local' -test - .skipIf(process.platform === 'win32' || isNode20) +test.skipIf(process.platform === 'win32' || isNode20) .skip('successfully scaffolds a project based on simple-ts starter template', () => { - const projectName = 'create-egg-test-simple-ts'; - const { stdout } = run([projectName, '--template', 'simple-ts', '--overwrite'], { - cwd: tempDir, - }); - const projectDir = path.join(tempDir, projectName); - const generatedFiles = fs.readdirSync(projectDir).sort(); - - // Assertions - expect(stdout).toContain(`Scaffolding project with`); - expect(generatedFiles).matchSnapshot(); - - // run test - const monoRepoDir = path.join(import.meta.dirname, '../../../'); - const eggDir = path.join(monoRepoDir, 'packages/egg'); - const mockDir = path.join(monoRepoDir, 'plugins/mock'); - const binDir = path.join(monoRepoDir, 'tools/egg-bin'); - const tracerDir = path.join(monoRepoDir, 'plugins/tracer'); - execaCommandSync(`pnpm link ${mockDir} ${eggDir} ${binDir} ${tracerDir}`, { - cwd: projectDir, - env: { NODE_OPTIONS: undefined }, - }); - // execaCommandSync(`pnpm install`, { cwd: projectDir }); - const { stdout: testStdout } = execaCommandSync('pnpm test:local', { - cwd: projectDir, - env: { NODE_OPTIONS: undefined }, - }); - expect(testStdout).toContain('2 passed'); - // run typecheck - execaCommandSync('pnpm typecheck', { - cwd: projectDir, - env: { NODE_OPTIONS: undefined }, - }); + const projectName = 'create-egg-test-simple-ts'; + const { stdout } = run([projectName, '--template', 'simple-ts', '--overwrite'], { + cwd: tempDir, }); + const projectDir = path.join(tempDir, projectName); + const generatedFiles = fs.readdirSync(projectDir).sort(); + + // Assertions + expect(stdout).toContain(`Scaffolding project with`); + expect(generatedFiles).matchSnapshot(); + + // run test + const monoRepoDir = path.join(import.meta.dirname, '../../../'); + const eggDir = path.join(monoRepoDir, 'packages/egg'); + const mockDir = path.join(monoRepoDir, 'plugins/mock'); + const binDir = path.join(monoRepoDir, 'tools/egg-bin'); + const tracerDir = path.join(monoRepoDir, 'plugins/tracer'); + execaCommandSync(`pnpm link ${mockDir} ${eggDir} ${binDir} ${tracerDir}`, { + cwd: projectDir, + env: { NODE_OPTIONS: undefined }, + }); + // execaCommandSync(`pnpm install`, { cwd: projectDir }); + const { stdout: testStdout } = execaCommandSync('pnpm test:local', { + cwd: projectDir, + env: { NODE_OPTIONS: undefined }, + }); + expect(testStdout).toContain('2 passed'); + // run typecheck + execaCommandSync('pnpm typecheck', { + cwd: projectDir, + env: { NODE_OPTIONS: undefined }, + }); +}); // use "@oxc-node/core/register" to support decorator metadata // TODO: unstable on windows and CI -test - .skipIf(process.platform === 'win32' || process.env.CI || isNode20) +test.skipIf(process.platform === 'win32' || process.env.CI || isNode20) .skip('successfully scaffolds a project based on tegg starter template', () => { - const projectName = 'create-egg-test-tegg'; - const { stdout } = run([projectName, '--template', 'tegg', '--overwrite'], { - cwd: tempDir, - }); - const projectDir = path.join(tempDir, projectName); - const generatedFiles = fs.readdirSync(projectDir).sort(); - - // Assertions - expect(stdout).toContain(`Scaffolding project with`); - expect(generatedFiles).matchSnapshot(); - - // run test - // const monoRepoDir = path.join(import.meta.dirname, '../../../'); - // const eggDir = path.join(monoRepoDir, 'packages/egg'); - // const teggDir = path.join(monoRepoDir, 'tegg'); - // const mockDir = path.join(monoRepoDir, 'plugins/mock'); - // const binDir = path.join(monoRepoDir, 'tools/egg-bin'); - // const tracerDir = path.join(monoRepoDir, 'plugins/tracer'); - execaCommandSync(`pnpm install`, { - cwd: projectDir, - stdout: 'inherit', - stderr: 'inherit', - env: { NODE_OPTIONS: undefined }, - }); - // execaCommandSync(`pnpm link ${mockDir} ${eggDir} ${binDir} ${tracerDir} ${teggDir}`, { - // cwd: projectDir, - // stdout: 'inherit', - // stderr: 'inherit', - // env: { NODE_OPTIONS: undefined }, // enable tegg plugins for test - // }); - const { stdout: testStdout } = execaCommandSync('pnpm test:local', { - cwd: projectDir, - env: { NODE_OPTIONS: undefined, DISABLE_TEGG_PLUGINS: 'false' }, // enable tegg plugins for test - }); - expect(testStdout).toContain('2 passed'); - // run typecheck - execaCommandSync('pnpm typecheck', { - cwd: projectDir, - env: { NODE_OPTIONS: undefined }, - }); + const projectName = 'create-egg-test-tegg'; + const { stdout } = run([projectName, '--template', 'tegg', '--overwrite'], { + cwd: tempDir, }); + const projectDir = path.join(tempDir, projectName); + const generatedFiles = fs.readdirSync(projectDir).sort(); + + // Assertions + expect(stdout).toContain(`Scaffolding project with`); + expect(generatedFiles).matchSnapshot(); + + // run test + // const monoRepoDir = path.join(import.meta.dirname, '../../../'); + // const eggDir = path.join(monoRepoDir, 'packages/egg'); + // const teggDir = path.join(monoRepoDir, 'tegg'); + // const mockDir = path.join(monoRepoDir, 'plugins/mock'); + // const binDir = path.join(monoRepoDir, 'tools/egg-bin'); + // const tracerDir = path.join(monoRepoDir, 'plugins/tracer'); + execaCommandSync(`pnpm install`, { + cwd: projectDir, + stdout: 'inherit', + stderr: 'inherit', + env: { NODE_OPTIONS: undefined }, + }); + // execaCommandSync(`pnpm link ${mockDir} ${eggDir} ${binDir} ${tracerDir} ${teggDir}`, { + // cwd: projectDir, + // stdout: 'inherit', + // stderr: 'inherit', + // env: { NODE_OPTIONS: undefined }, // enable tegg plugins for test + // }); + const { stdout: testStdout } = execaCommandSync('pnpm test:local', { + cwd: projectDir, + env: { NODE_OPTIONS: undefined, DISABLE_TEGG_PLUGINS: 'false' }, // enable tegg plugins for test + }); + expect(testStdout).toContain('2 passed'); + // run typecheck + execaCommandSync('pnpm typecheck', { + cwd: projectDir, + env: { NODE_OPTIONS: undefined }, + }); +}); test.skipIf(isNode20)('works with the -t alias', () => { const { stdout } = run([projectName, '-t', 'tegg', '--overwrite'], { diff --git a/tools/create-egg/tsdown.config.ts b/tools/create-egg/tsdown.config.ts index 96e67f7819..71a844ffa6 100644 --- a/tools/create-egg/tsdown.config.ts +++ b/tools/create-egg/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ unbundle: false, diff --git a/tools/create-egg/vite.config.ts b/tools/create-egg/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tools/create-egg/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tools/create-egg/vitest.config.ts b/tools/create-egg/vitest.config.ts index 88fa3e5d46..72cc73d96e 100644 --- a/tools/create-egg/vitest.config.ts +++ b/tools/create-egg/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineProject } from 'vitest/config'; +import { defineProject } from 'vite-plus'; export default defineProject({ test: { diff --git a/tools/egg-bin/tsdown.config.ts b/tools/egg-bin/tsdown.config.ts index 38d4777e44..1ebd1bdecb 100644 --- a/tools/egg-bin/tsdown.config.ts +++ b/tools/egg-bin/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ // MEMO: @oclif/core only works in unbundle mode (already default) diff --git a/tools/egg-bin/vite.config.ts b/tools/egg-bin/vite.config.ts new file mode 100644 index 0000000000..bd1dbe1e10 --- /dev/null +++ b/tools/egg-bin/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, +}); diff --git a/tools/scripts/package.json b/tools/scripts/package.json index 6a34a5f421..715bc5ffcc 100644 --- a/tools/scripts/package.json +++ b/tools/scripts/package.json @@ -49,7 +49,7 @@ }, "scripts": { "typecheck": "tsgo --noEmit", - "test": "vitest run --bail 1 --no-file-parallelism", + "test": "vite test run --bail 1 --no-file-parallelism", "cov": "pnpm test --coverage", "ci": "pnpm run cov" }, @@ -67,10 +67,10 @@ "detect-port": "catalog:", "egg": "workspace:*", "mm": "catalog:", - "tsdown": "catalog:", "typescript": "catalog:", "urllib": "catalog:", - "vitest": "catalog:" + "vitest": "catalog:", + "vite-plus": "catalog:" }, "oclif": { "additionalHelpFlags": [ diff --git a/tools/scripts/test/egg-scripts.test.ts b/tools/scripts/test/egg-scripts.test.ts index db68947061..e460ac1661 100644 --- a/tools/scripts/test/egg-scripts.test.ts +++ b/tools/scripts/test/egg-scripts.test.ts @@ -1,7 +1,7 @@ import path from 'node:path'; import coffee from 'coffee'; -import { describe, it } from 'vitest'; +import { describe, it } from 'vite-plus/test'; describe('test/egg-scripts.test.ts', () => { const eggBin = path.join(import.meta.dirname, '../bin/run.js'); diff --git a/tools/scripts/test/start-without-demon-1.test.ts b/tools/scripts/test/start-without-demon-1.test.ts index 491556c77a..9e415049c6 100644 --- a/tools/scripts/test/start-without-demon-1.test.ts +++ b/tools/scripts/test/start-without-demon-1.test.ts @@ -5,7 +5,7 @@ import { scheduler } from 'node:timers/promises'; import coffee from 'coffee'; import { detectPort } from 'detect-port'; import { mm, restore } from 'mm'; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, beforeEach, afterEach, expect } from 'vite-plus/test'; import { cleanup, replaceWeakRefMessage, type Coffee } from './utils.ts'; diff --git a/tools/scripts/test/start-without-demon-2.test.ts b/tools/scripts/test/start-without-demon-2.test.ts index 5eb393d6a6..5455228575 100644 --- a/tools/scripts/test/start-without-demon-2.test.ts +++ b/tools/scripts/test/start-without-demon-2.test.ts @@ -6,7 +6,7 @@ import { scheduler } from 'node:timers/promises'; import coffee from 'coffee'; import { detectPort } from 'detect-port'; import { mm, restore } from 'mm'; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, beforeEach, afterEach, expect } from 'vite-plus/test'; import { cleanup, replaceWeakRefMessage, type Coffee } from './utils.ts'; diff --git a/tools/scripts/test/start-without-demon-3.test.ts b/tools/scripts/test/start-without-demon-3.test.ts index 7bc087760c..57ad61c34c 100644 --- a/tools/scripts/test/start-without-demon-3.test.ts +++ b/tools/scripts/test/start-without-demon-3.test.ts @@ -5,7 +5,7 @@ import { scheduler } from 'node:timers/promises'; import coffee from 'coffee'; import { detectPort } from 'detect-port'; import { mm, restore } from 'mm'; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, beforeEach, afterEach, expect } from 'vite-plus/test'; import { cleanup, replaceWeakRefMessage, type Coffee } from './utils.ts'; diff --git a/tools/scripts/test/start-without-demon-4.test.ts b/tools/scripts/test/start-without-demon-4.test.ts index f94ea76551..08fc827866 100644 --- a/tools/scripts/test/start-without-demon-4.test.ts +++ b/tools/scripts/test/start-without-demon-4.test.ts @@ -7,7 +7,7 @@ import { detectPort } from 'detect-port'; import { mm, restore } from 'mm'; import { request } from 'urllib'; import { exists } from 'utility'; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, beforeEach, afterEach, expect } from 'vite-plus/test'; import { cleanup, replaceWeakRefMessage, type Coffee } from './utils.ts'; diff --git a/tools/scripts/test/start-without-demon-5.test.ts b/tools/scripts/test/start-without-demon-5.test.ts index 876732b187..acccb61bab 100644 --- a/tools/scripts/test/start-without-demon-5.test.ts +++ b/tools/scripts/test/start-without-demon-5.test.ts @@ -6,7 +6,7 @@ import { scheduler } from 'node:timers/promises'; import coffee from 'coffee'; import { detectPort } from 'detect-port'; import { mm, restore } from 'mm'; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, beforeEach, afterEach, expect } from 'vite-plus/test'; import { isWindows } from '../src/helper.ts'; import { cleanup, replaceWeakRefMessage, type Coffee } from './utils.ts'; diff --git a/tools/scripts/test/start.test.ts b/tools/scripts/test/start.test.ts index e6fa68a502..6fd21b4968 100644 --- a/tools/scripts/test/start.test.ts +++ b/tools/scripts/test/start.test.ts @@ -6,7 +6,7 @@ import coffee from 'coffee'; import { detectPort } from 'detect-port'; import { mm, restore } from 'mm'; import { request } from 'urllib'; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach } from 'vitest'; +import { describe, it, beforeAll, afterAll, beforeEach, afterEach } from 'vite-plus/test'; import { isWindows } from '../src/helper.ts'; import { cleanup } from './utils.ts'; diff --git a/tools/scripts/test/stop.test.ts b/tools/scripts/test/stop.test.ts index 9f30b74622..677734f2a3 100644 --- a/tools/scripts/test/stop.test.ts +++ b/tools/scripts/test/stop.test.ts @@ -5,7 +5,7 @@ import { scheduler } from 'node:timers/promises'; import coffee from 'coffee'; import { detectPort } from 'detect-port'; import { mm, restore } from 'mm'; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, beforeEach, afterEach, expect } from 'vite-plus/test'; import { isWindows } from '../src/helper.ts'; import { cleanup, replaceWeakRefMessage, type Coffee } from './utils.ts'; diff --git a/tools/scripts/test/ts.test.ts b/tools/scripts/test/ts.test.ts index 263accd392..44a7e063da 100644 --- a/tools/scripts/test/ts.test.ts +++ b/tools/scripts/test/ts.test.ts @@ -7,7 +7,7 @@ import coffee from 'coffee'; import { detectPort } from 'detect-port'; import { mm, restore } from 'mm'; import { request } from 'urllib'; -import { describe, it, beforeAll, afterAll, beforeEach, afterEach, expect } from 'vitest'; +import { describe, it, beforeAll, afterAll, beforeEach, afterEach, expect } from 'vite-plus/test'; import { isWindows } from '../src/helper.ts'; import { cleanup, type Coffee } from './utils.ts'; diff --git a/tools/scripts/vitest.config.ts b/tools/scripts/vitest.config.ts index 38d12c7f9f..d2449446d1 100644 --- a/tools/scripts/vitest.config.ts +++ b/tools/scripts/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'vitest/config'; +import { defineConfig } from 'vite-plus'; export default defineConfig({ test: { diff --git a/tsdown.config.ts b/tsdown.config.ts index 5831a2a6d7..222b96e52e 100644 --- a/tsdown.config.ts +++ b/tsdown.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'tsdown'; +import { defineConfig } from 'vite-plus/lib'; export default defineConfig({ // Workspace configuration - builds all library packages from root diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000000..5f6dbc3a5e --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,51 @@ +import { defineConfig } from 'vite-plus'; + +import tsdownConfig from './tsdown.config.js'; + +export default defineConfig({ + lib: tsdownConfig, + fmt: { + $schema: './node_modules/oxfmt/configuration_schema.json', + printWidth: 120, + singleQuote: true, + ignorePatterns: [ + 'tegg/core/loader/test/fixtures/modules/loader-failed/AppRepo.ts', + 'tegg/core/aop-runtime/test/aop-runtime.test.ts', + 'packages/core/test/fixtures/load_dirs/syntax_error/*', + 'packages/core/test/fixtures/syntaxerror/*', + 'packages/core/test/fixtures/load_context_syntax_error/**/*', + 'CHANGELOG.md', + ], + experimentalSortImports: { + groups: [ + ['type-import'], + ['type-builtin', 'value-builtin'], + ['type-external', 'value-external', 'type-internal', 'value-internal'], + ['type-parent', 'type-sibling', 'type-index', 'value-parent', 'value-sibling', 'value-index'], + ['ts-equals-import'], + ['unknown'], + ], + newlinesBetween: true, + order: 'asc', + }, + yaml: { + singleQuote: true, + }, + }, + lint: { + $schema: './node_modules/oxlint/configuration_schema.json', + env: { + node: true, + }, + ignorePatterns: [ + '**/test/fixtures/**', + 'tegg/benchmark/http', + 'tools/create-egg/src/templates/egg3-tegg', + 'tools/create-egg/src/templates/egg3-simple-ts/test', + ], + rules: { + 'no-unused-vars': 'error', + 'preserve-caught-error': 'error', + }, + }, +}); diff --git a/vitest.config.ts b/vitest.config.ts index 6ca6911059..7993870a3c 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,4 +1,4 @@ -import { defineConfig, type UserWorkspaceConfig } from 'vitest/config'; +import { defineConfig, type UserWorkspaceConfig } from 'vite-plus'; const config: UserWorkspaceConfig = defineConfig({ test: {