Skip to content

Commit b66932f

Browse files
committed
chore: vite+ migration
1 parent c33e4f1 commit b66932f

File tree

80 files changed

+4398
-613
lines changed

Some content is hidden

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

80 files changed

+4398
-613
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ permissions:
1616
id-token: write
1717
actions: write
1818

19+
env:
20+
VP_TOKEN: ${{ secrets.VP_TOKEN }}
21+
1922
jobs:
2023
typecheck:
2124
runs-on: ubuntu-latest

.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 & 24 deletions
This file was deleted.

.oxlintrc.json

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

examples/helloworld-commonjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
},
1010
"devDependencies": {
1111
"@eggjs/bin": "workspace:*",
12-
"oxlint": "catalog:"
12+
"@voidzero-dev/vite-plus": "catalog:"
1313
},
1414
"scripts": {
1515
"dev": "egg-bin dev",
1616
"debug": "egg-bin debug",
1717
"test": "egg-bin test",
1818
"cov": "egg-bin cov",
19-
"lint": "oxlint",
19+
"lint": "vite lint",
2020
"ci": "pnpm run lint && pnpm run cov",
2121
"start": "egg-scripts start --daemon",
2222
"stop": "egg-scripts stop"

examples/helloworld-tegg/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@
1818
"@eggjs/tsconfig": "workspace:*",
1919
"tsdown": "catalog:",
2020
"typescript": "catalog:",
21-
"vitest": "catalog:"
21+
"vitest": "catalog:",
22+
"@voidzero-dev/vite-plus": "catalog:"
2223
},
2324
"scripts": {
2425
"dev": "egg-bin dev",
2526
"debug": "egg-bin debug",
26-
"test": "vitest run",
27-
"cov": "vitest run --coverage",
27+
"test": "vite test run",
28+
"cov": "vite test run --coverage",
2829
"lint": "eslint . --ext .ts",
2930
"ci": "pnpm run lint && pnpm run cov",
3031
"prepublishOnly": "pnpm run build",

examples/helloworld-tegg/vitest.config.ts

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

33
export default defineProject({
44
test: {

examples/helloworld-typescript/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@
1818
"@eggjs/tsconfig": "workspace:*",
1919
"tsdown": "catalog:",
2020
"typescript": "catalog:",
21-
"vitest": "catalog:"
21+
"vitest": "catalog:",
22+
"@voidzero-dev/vite-plus": "catalog:"
2223
},
2324
"scripts": {
2425
"dev": "egg-bin dev",
2526
"debug": "egg-bin debug",
26-
"test": "vitest run",
27-
"cov": "vitest run --coverage",
27+
"test": "vite test run",
28+
"cov": "vite test run --coverage",
2829
"lint": "eslint . --ext .ts",
2930
"ci": "pnpm run lint && pnpm run cov",
3031
"prepublishOnly": "pnpm run build",

examples/helloworld-typescript/vitest.config.ts

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

33
export default defineProject({
44
test: {

package.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,29 @@
1919
"js-yaml": "catalog:",
2020
"lint-staged": "catalog:",
2121
"mocha": "catalog:",
22-
"oxfmt": "catalog:",
23-
"oxlint": "catalog:",
24-
"oxlint-tsgolint": "catalog:",
2522
"prettier": "catalog:",
2623
"rimraf": "catalog:",
2724
"semver": "catalog:",
2825
"tsx": "catalog:",
2926
"typescript": "catalog:",
3027
"urllib": "catalog:",
31-
"vitest": "catalog:"
28+
"vitest": "catalog:",
29+
"@voidzero-dev/vite-plus": "catalog:"
3230
},
3331
"scripts": {
3432
"clean": "pnpm -r --parallel run clean && rimraf packages/*/dist plugins/*/dist tools/*/dist examples/*/dist tegg/**/dist **/*/*.tsbuildinfo",
3533
"build": "pnpm clean && pnpm -r run build",
3634
"build:parallel": "pnpm clean && pnpm -r --parallel run build",
37-
"lint": "oxlint --type-aware",
38-
"fmt": "oxfmt",
35+
"lint": "vite lint --type-aware",
36+
"fmt": "vite fmt",
3937
"typecheck": "pnpm clean && pnpm -r run typecheck",
4038
"typecheck:parallel": "pnpm clean && pnpm -r --parallel run typecheck",
41-
"fmtcheck": "oxfmt --check .",
39+
"fmtcheck": "vite fmt --check .",
4240
"pretest": "pnpm run clean && pnpm -r run pretest",
43-
"test": "vitest run --bail 1 --retry 2",
41+
"test": "vite test run --bail 1 --retry 2",
4442
"test:cov": "pnpm run test --coverage",
4543
"preci": "pnpm -r --parallel run pretest",
46-
"ci": "vitest run --bail 1 --retry 2 --coverage --testTimeout 20000 --hookTimeout 20000",
44+
"ci": "vite test run --bail 1 --retry 2 --coverage --testTimeout 20000 --hookTimeout 20000",
4745
"postci": "pnpm run example:test:all",
4846
"site:dev": "pnpm --filter=site run dev",
4947
"site:build": "pnpm --filter=site run build",
@@ -70,8 +68,8 @@
7068
"prettier --ignore-unknown --write"
7169
],
7270
"*.{ts,mts,cts,js,mjs,cjs,jsx,tsx}": [
73-
"oxfmt",
74-
"oxlint --type-aware --fix"
71+
"vite fmt",
72+
"vite lint --type-aware --fix"
7573
]
7674
},
7775
"repository": {

0 commit comments

Comments
 (0)