Skip to content

Commit 6ddf4af

Browse files
committed
chore: vite+ migration
1 parent 2188808 commit 6ddf4af

File tree

625 files changed

+3282
-1425
lines changed

Some content is hidden

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

625 files changed

+3282
-1425
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: CI
22

3+
env:
4+
VP_TOKEN: ${{ secrets.VP_TOKEN }}
5+
36
on:
47
push:
58
paths-ignore:

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@voidzero-dev:registry=https://npm.pkg.github.com/
2+
//npm.pkg.github.com/:_authToken=${VP_TOKEN}

.oxfmtrc.json

Lines changed: 0 additions & 28 deletions
This file was deleted.

.oxlintrc.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

examples/helloworld-tegg/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@
3737
"scripts": {
3838
"dev": "egg-bin dev",
3939
"debug": "egg-bin debug",
40-
"test": "vitest run",
41-
"cov": "vitest run --coverage",
40+
"test": "vite test run",
41+
"cov": "vite test run --coverage",
4242
"lint": "eslint . --ext .ts",
4343
"ci": "pnpm run lint && pnpm run cov",
4444
"prepublishOnly": "pnpm run build",
4545
"start": "egg-scripts start --daemon",
4646
"stop": "egg-scripts stop",
4747
"typecheck": "tsgo --noEmit",
48-
"build": "tsdown"
48+
"build": "vite lib"
4949
},
5050
"dependencies": {
5151
"@eggjs/scripts": "workspace:",
@@ -56,9 +56,9 @@
5656
"@eggjs/bin": "workspace:*",
5757
"@eggjs/mock": "workspace:*",
5858
"@eggjs/tsconfig": "workspace:*",
59-
"tsdown": "catalog:",
6059
"typescript": "catalog:",
61-
"vitest": "catalog:"
60+
"vitest": "catalog:",
61+
"@voidzero-dev/vite-plus": "catalog:"
6262
},
6363
"engines": {
6464
"node": ">=22.18.0"

examples/helloworld-tegg/test/ArgsController.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { app } from '@eggjs/mock/bootstrap';
2-
import { expect, test } from 'vitest';
2+
import { expect, test } from '@voidzero-dev/vite-plus/test';
33

44
test('should POST /api/args/request success', async () => {
55
app.mockCsrf();

examples/helloworld-tegg/test/SimpleController.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { app } from '@eggjs/mock/bootstrap';
2-
import { expect, test } from 'vitest';
2+
import { expect, test } from '@voidzero-dev/vite-plus/test';
33

44
test('should GET /api/headers with headers', async () => {
55
await app.httpRequest().get('/api/headers').set('X-Custom', 'custom').expect(200).expect({

examples/helloworld-tegg/test/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { beforeAll, afterAll } from 'vitest';
1+
import { beforeAll, afterAll } from '@voidzero-dev/vite-plus/test';
22

33
// https://vitest.dev/config/#setupfiles
44
// export beforeAll and afterAll to globalThis, let @eggjs/mock/bootstrap use it

examples/helloworld-tegg/tsdown.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineConfig } from 'tsdown';
1+
import { defineConfig } from '@voidzero-dev/vite-plus/lib';
22

33
export default defineConfig({
44
entry: ['app.ts', 'config/**/*.ts', 'app/**/*.ts'],
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from '@voidzero-dev/vite-plus';
2+
3+
import tsdownConfig from './tsdown.config.js';
4+
5+
export default defineConfig({
6+
lib: tsdownConfig,
7+
});

0 commit comments

Comments
 (0)