Skip to content

Commit 17aaaf0

Browse files
committed
refactor tsconfig setup + migrate to vitest
1 parent 7f92952 commit 17aaaf0

File tree

14 files changed

+146
-2080
lines changed

14 files changed

+146
-2080
lines changed

__tests__/tsconfig.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": ".",
4+
"module": "esnext",
5+
"moduleResolution": "node",
6+
"strict": true,
7+
"noUnusedLocals": true,
8+
"skipLibCheck": true,
9+
"esModuleInterop": true,
10+
"lib": ["ESNext", "DOM"],
11+
"types": ["node", "vitest/global"],
12+
"paths": {
13+
"node/*": ["../src/node/*"],
14+
"client/*": ["../src/client/*"]
15+
}
16+
},
17+
"include": ["../src", "."]
18+
}

__tests__/vitest.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import path from 'path'
2+
3+
export default {
4+
resolve: {
5+
alias: {
6+
node: path.resolve(__dirname, '../src/node'),
7+
client: path.resolve(__dirname, '../src/client')
8+
}
9+
}
10+
}

api-extractor.client.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
33

4-
"projectFolder": ".",
4+
"projectFolder": "./src/client",
55

66
"mainEntryPointFilePath": "./dist/temp/index.d.ts",
77

api-extractor.node.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
33

4-
"projectFolder": ".",
4+
"projectFolder": "./src/node",
55

66
"mainEntryPointFilePath": "./dist/temp/index.d.ts",
77

jest.config.js

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

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"lint": "run-s lint:js lint:ts",
3232
"lint:js": "prettier --check --write \"{bin,docs,scripts,src}/**/*.js\"",
3333
"lint:ts": "prettier --check --write --parser typescript \"{__tests__,src,docs,types}/**/*.ts\"",
34-
"test": "jest",
34+
"test": "vitest run __tests__ -c __tests__/vitest.config.js --global",
3535
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
3636
"release": "node scripts/release.js",
3737
"docs": "run-p dev docs-dev",
@@ -87,7 +87,6 @@
8787
"@types/compression": "^1.7.0",
8888
"@types/debug": "^4.1.7",
8989
"@types/fs-extra": "^9.0.11",
90-
"@types/jest": "^27.0.0",
9190
"@types/koa": "^2.13.1",
9291
"@types/koa-static": "^4.0.1",
9392
"@types/lru-cache": "^5.1.0",
@@ -109,7 +108,6 @@
109108
"fs-extra": "^10.0.0",
110109
"globby": "^11.0.3",
111110
"gray-matter": "^4.0.3",
112-
"jest": "^27.0.1",
113111
"lint-staged": "^11.0.0",
114112
"lru-cache": "^6.0.0",
115113
"markdown-it": "^12.3.2",
@@ -129,8 +127,8 @@
129127
"rollup-plugin-esbuild": "^4.8.2",
130128
"semver": "^7.3.5",
131129
"sirv": "^1.0.12",
132-
"ts-jest": "^27.0.1",
133130
"typescript": "^4.3.2",
131+
"vitest": "^0.1.19",
134132
"yorkie": "^2.0.0"
135133
},
136134
"pnpm": {

0 commit comments

Comments
 (0)