Skip to content

Commit d6ff0cc

Browse files
committed
refactor: move to monorepo
1 parent 2961983 commit d6ff0cc

Some content is hidden

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

67 files changed

+224
-559
lines changed

package.json

Lines changed: 11 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,44 @@
11
{
2-
"name": "vitest",
2+
"name": "@vitest/monorepo",
3+
"private": true,
34
"version": "0.0.76",
45
"description": "A blazing fast unit test framework powered by Vite",
5-
"keywords": [
6-
"vite",
7-
"vite-node",
8-
"test",
9-
"jest"
10-
],
11-
"homepage": "https://github.com/antfu/vitest#readme",
12-
"bugs": {
13-
"url": "https://github.com/antfu/vitest/issues"
14-
},
15-
"repository": {
16-
"type": "git",
17-
"url": "git+https://github.com/antfu/vitest.git"
18-
},
19-
"funding": "https://github.com/sponsors/antfu",
20-
"license": "MIT",
21-
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
226
"type": "module",
23-
"exports": {
24-
".": {
25-
"import": "./dist/index.js",
26-
"types": "./dist/index.d.ts"
27-
},
28-
"./*": "./*"
29-
},
30-
"main": "./dist/index.js",
31-
"module": "./dist/index.js",
32-
"types": "./dist/index.d.ts",
33-
"bin": {
34-
"vitest": "./bin/vitest.mjs"
35-
},
36-
"files": [
37-
"dist",
38-
"bin",
39-
"*.d.ts"
40-
],
41-
"scripts": {
42-
"build": "rimraf dist && rollup -c",
43-
"coverage": "node bin/vitest.mjs -r test/core --coverage",
44-
"dev": "rollup -c -w src",
7+
"scripts": {
8+
"build": "pnpm -r --filter {packages} run build",
9+
"dev": "pnpm -r --parallel --filter {packages} run dev",
4510
"docs": "npm -C docs run dev",
4611
"docs:build": "npm -C docs run build",
4712
"docs:serve": "npm -C docs run serve",
4813
"ui:build": "vite build packages/ui",
4914
"ui:dev": "vite packages/ui",
50-
"lint": "eslint \"{src,test}/**/*.ts\"",
15+
"lint": "eslint --ext .js,.vue .",
5116
"prepublishOnly": "nr build",
52-
"release": "bumpp --commit --push --tag && esmo scripts/publish.ts",
53-
"test": "node bin/vitest.mjs -r test/core",
17+
"release": "bumpp --commit --push --tag && pnpm -r publish",
18+
"test": "vitest -r test/core",
5419
"test:all": "cross-env CI=true pnpm -r --stream --filter !vitest run test --",
5520
"test:ci": "cross-env CI=true pnpm -r --stream --filter !vitest --filter !@vitest/test-fails run test --",
56-
"typecheck": "tsc --noEmit && nr lint",
21+
"typecheck": "pnpm -r --parallel run typecheck",
5722
"ci": "ni && nr typecheck && nr lint && nr build && nr test:all"
5823
},
59-
"dependencies": {
60-
"@types/chai": "^4.3.0",
61-
"@types/chai-subset": "^1.3.3",
62-
"@types/sinon": "^10.0.6",
63-
"@types/sinon-chai": "^3.2.6",
64-
"chai": "^4.3.4",
65-
"chai-subset": "^1.6.0",
66-
"fast-glob": "^3.2.7",
67-
"local-pkg": "^0.4.0",
68-
"micromatch": "^4.0.4",
69-
"piscina": "^3.2.0",
70-
"sinon": "^12.0.1",
71-
"sinon-chai": "^3.7.0",
72-
"source-map": "^0.7.3"
73-
},
7424
"devDependencies": {
7525
"@antfu/eslint-config": "^0.13.1",
7626
"@antfu/ni": "^0.12.0",
7727
"@rollup/plugin-alias": "^3.1.8",
7828
"@rollup/plugin-commonjs": "^21.0.1",
7929
"@rollup/plugin-json": "^4.1.0",
8030
"@rollup/plugin-node-resolve": "^13.0.6",
81-
"@types/diff": "^5.0.1",
82-
"@types/jsdom": "^16.2.13",
83-
"@types/micromatch": "^4.0.2",
84-
"@types/natural-compare": "^1.4.1",
8531
"@types/node": "^16.11.12",
86-
"@types/sade": "^1.7.3",
8732
"bumpp": "^7.1.1",
88-
"c8": "^7.10.0",
89-
"cac": "^6.7.12",
90-
"cli-truncate": "^3.1.0",
9133
"cross-env": "^7.0.3",
92-
"diff": "^5.0.0",
9334
"eslint": "^8.4.1",
9435
"esno": "^0.12.1",
95-
"find-up": "^6.2.0",
96-
"happy-dom": "^2.24.5",
97-
"jsdom": "^19.0.0",
98-
"log-update": "^5.0.0",
99-
"nanoid": "^3.1.30",
100-
"natural-compare": "^1.4.0",
10136
"npm-run-all": "^4.1.5",
102-
"picocolors": "^1.0.0",
103-
"pretty-format": "^27.4.2",
10437
"rimraf": "^3.0.2",
10538
"rollup-plugin-dts": "^4.0.1",
10639
"rollup-plugin-esbuild": "^4.7.2",
107-
"strip-ansi": "^7.0.1",
108-
"tsup": "^5.11.1",
10940
"typescript": "^4.5.3",
110-
"vite": "^2.7.1"
111-
},
112-
"peerDependencies": {
113-
"c8": "*",
114-
"happy-dom": "*",
115-
"jsdom": "*",
116-
"vite": "^2.7.1"
117-
},
118-
"peerDependenciesMeta": {
119-
"c8": {
120-
"optional": true
121-
},
122-
"happy-dom": {
123-
"optional": true
124-
},
125-
"jsdom": {
126-
"optional": true
127-
}
128-
},
129-
"engines": {
130-
"node": ">=16.0.0"
41+
"vite": "^2.7.1",
42+
"vitest": "workspace:*"
13143
}
13244
}

packages/ui/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"name": "@vitest/ui",
3+
"//": "TODO: when it's ready",
4+
"private": true,
35
"version": "0.0.1",
46
"description": "Vitest UI",
57
"sideEffects": false,

packages/ui/tsconfig.json

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,4 @@
11
{
2-
"compilerOptions": {
3-
"baseUrl": ".",
4-
"module": "ESNext",
5-
"target": "es2016",
6-
"lib": ["DOM", "ESNext"],
7-
"strict": true,
8-
"esModuleInterop": true,
9-
"incremental": false,
10-
"skipLibCheck": true,
11-
"moduleResolution": "node",
12-
"resolveJsonModule": true,
13-
"noUnusedLocals": true,
14-
"strictNullChecks": true,
15-
"forceConsistentCasingInFileNames": true,
16-
"paths": {
17-
"~/*": ["client/*"]
18-
}
19-
},
2+
"extends": "../../tsconfig.json",
203
"exclude": ["dist", "node_modules"]
21-
}
4+
}
File renamed without changes.

packages/vitest/package.json

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
{
2+
"name": "vitest",
3+
"version": "0.0.76",
4+
"description": "A blazing fast unit test framework powered by Vite",
5+
"keywords": [
6+
"vite",
7+
"vite-node",
8+
"test",
9+
"jest"
10+
],
11+
"homepage": "https://github.com/antfu/vitest#readme",
12+
"bugs": {
13+
"url": "https://github.com/antfu/vitest/issues"
14+
},
15+
"repository": {
16+
"type": "git",
17+
"url": "git+https://github.com/antfu/vitest.git"
18+
},
19+
"funding": "https://github.com/sponsors/antfu",
20+
"license": "MIT",
21+
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
22+
"type": "module",
23+
"exports": {
24+
".": {
25+
"import": "./dist/index.js",
26+
"types": "./dist/index.d.ts"
27+
},
28+
"./*": "./*"
29+
},
30+
"main": "./dist/index.js",
31+
"module": "./dist/index.js",
32+
"types": "./dist/index.d.ts",
33+
"bin": {
34+
"vitest": "./bin/vitest.mjs"
35+
},
36+
"files": [
37+
"dist",
38+
"bin",
39+
"*.d.ts"
40+
],
41+
"scripts": {
42+
"build": "rimraf dist && rollup -c",
43+
"dev": "rollup -c --watch src",
44+
"typecheck": "tsc --noEmit",
45+
"prepublishOnly": "nr build"
46+
},
47+
"dependencies": {
48+
"@types/chai": "^4.3.0",
49+
"@types/chai-subset": "^1.3.3",
50+
"@types/sinon": "^10.0.6",
51+
"@types/sinon-chai": "^3.2.6",
52+
"chai": "^4.3.4",
53+
"chai-subset": "^1.6.0",
54+
"fast-glob": "^3.2.7",
55+
"local-pkg": "^0.4.0",
56+
"micromatch": "^4.0.4",
57+
"piscina": "^3.2.0",
58+
"sinon": "^12.0.1",
59+
"sinon-chai": "^3.7.0",
60+
"source-map": "^0.7.3"
61+
},
62+
"devDependencies": {
63+
"@types/diff": "^5.0.1",
64+
"@types/jsdom": "^16.2.13",
65+
"@types/micromatch": "^4.0.2",
66+
"@types/natural-compare": "^1.4.1",
67+
"@types/node": "^16.11.12",
68+
"c8": "^7.10.0",
69+
"cac": "^6.7.12",
70+
"cli-truncate": "^3.1.0",
71+
"diff": "^5.0.0",
72+
"find-up": "^6.2.0",
73+
"happy-dom": "^2.24.5",
74+
"jsdom": "^19.0.0",
75+
"log-update": "^5.0.0",
76+
"nanoid": "^3.1.30",
77+
"natural-compare": "^1.4.0",
78+
"picocolors": "^1.0.0",
79+
"pretty-format": "^27.4.2",
80+
"strip-ansi": "^7.0.1"
81+
},
82+
"peerDependencies": {
83+
"c8": "*",
84+
"happy-dom": "*",
85+
"jsdom": "*",
86+
"vite": "^2.7.1"
87+
},
88+
"peerDependenciesMeta": {
89+
"c8": {
90+
"optional": true
91+
},
92+
"happy-dom": {
93+
"optional": true
94+
},
95+
"jsdom": {
96+
"optional": true
97+
}
98+
},
99+
"engines": {
100+
"node": ">=16.0.0"
101+
}
102+
}

0 commit comments

Comments
 (0)