Skip to content

Commit c26dc1c

Browse files
committed
build: exclude tests from dist (deepkit#519)
1 parent 2225215 commit c26dc1c

File tree

103 files changed

+576
-90
lines changed

Some content is hidden

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

103 files changed

+576
-90
lines changed

.github/workflows/release.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
on:
2+
workflow_dispatch:
3+
inputs:
4+
version:
5+
description: version
6+
required: true
7+
type: choice
8+
options:
9+
- major
10+
- minor
11+
- patch
12+
- premajor
13+
- preminor
14+
- prepatch
15+
- prerelease
16+
17+
permissions:
18+
contents: write
19+
actions: read
20+
pull-requests: read
21+
id-token: write
22+
23+
jobs:
24+
release:
25+
runs-on: buildjet-2vcpu-ubuntu-2004
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
31+
- uses: actions/setup-node@v4
32+
with:
33+
node-version: 20.6.0
34+
35+
- name: Cache node_modules
36+
uses: actions/cache@v4
37+
with:
38+
path: '**/node_modules'
39+
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
40+
41+
- name: npm install
42+
run: npm ci
43+
44+
- name: git config
45+
run: |
46+
git config user.name "${GITHUB_ACTOR}"
47+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
48+
49+
- name: lerna version
50+
run: lerna version --no-private --verify-access ${{ inputs.version }}
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
54+
LEFTHOOK: 0
55+
56+
- name: lerna publish
57+
run: lerna publish from-git
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
61+
LEFTHOOK: 0
62+

packages/api-console-module/package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,14 @@
5151
"rxjs": "~7.5.0"
5252
},
5353
"jest": {
54+
"testEnvironment": "node",
5455
"transform": {
55-
"^.+\\.(ts|tsx)$": "ts-jest"
56+
"^.+\\.(ts|tsx)$": [
57+
"ts-jest",
58+
{
59+
"tsconfig": "<rootDir>/tsconfig.spec.json"
60+
}
61+
]
5662
},
5763
"moduleNameMapper": {
5864
"(.+)\\.js": "$1"

packages/api-console-module/tsconfig.json

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
"index.ts",
2323
"node_modules/@deepkit/api-console-gui/src/api.ts"
2424
],
25+
"exclude": [
26+
"tests"
27+
],
2528
"references": [
2629
{
2730
"path": "../api-console-api/tsconfig.json"

packages/rpc/tsconfig.test.json renamed to packages/api-console-module/tsconfig.spec.json

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"extends": "./tsconfig.json",
3-
"compilerOptions": {
4-
"target": "es2020"
5-
},
63
"include": [
74
"src",
85
"index.ts",

packages/app/package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,14 @@
4242
"conditional-type-checks": "^1.0.5"
4343
},
4444
"jest": {
45+
"testEnvironment": "node",
4546
"transform": {
46-
"^.+\\.(ts|tsx)$": "ts-jest"
47+
"^.+\\.(ts|tsx)$": [
48+
"ts-jest",
49+
{
50+
"tsconfig": "<rootDir>/tsconfig.spec.json"
51+
}
52+
]
4753
},
4854
"moduleNameMapper": {
4955
"(.+)\\.js": "$1"

packages/app/tsconfig.json

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
"src",
2323
"index.ts"
2424
],
25+
"exclude": [
26+
"tests"
27+
],
2528
"references": [
2629
{
2730
"path": "../core/tsconfig.json"

packages/type-compiler/tsconfig.test.json renamed to packages/app/tsconfig.spec.json

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"extends": "./tsconfig.json",
3-
"compilerOptions": {
4-
"target": "es2020"
5-
},
63
"include": [
74
"src",
85
"index.ts",

packages/broker/package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,14 @@
4444
"@deepkit/type": "^1.0.1-alpha.113"
4545
},
4646
"jest": {
47+
"testEnvironment": "node",
4748
"transform": {
48-
"^.+\\.(ts|tsx)$": "ts-jest"
49+
"^.+\\.(ts|tsx)$": [
50+
"ts-jest",
51+
{
52+
"tsconfig": "<rootDir>/tsconfig.spec.json"
53+
}
54+
]
4955
},
5056
"moduleNameMapper": {
5157
"(.+)\\.js": "$1"

packages/broker/tsconfig.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919
"reflection": true,
2020
"include": [
2121
"src",
22-
"tests",
2322
"index.ts"
2423
],
24+
"exclude": [
25+
"tests"
26+
],
2527
"references": [
2628
{
2729
"path": "../bson/tsconfig.json"

packages/type-spec/tsconfig.test.json renamed to packages/broker/tsconfig.spec.json

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"extends": "./tsconfig.json",
3-
"compilerOptions": {
4-
"target": "es2020"
5-
},
63
"include": [
74
"src",
85
"index.ts",

packages/bson/package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@
3737
"jest": {
3838
"testEnvironment": "node",
3939
"transform": {
40-
"^.+\\.(ts|tsx)$": "ts-jest"
40+
"^.+\\.(ts|tsx)$": [
41+
"ts-jest",
42+
{
43+
"tsconfig": "<rootDir>/tsconfig.spec.json"
44+
}
45+
]
4146
},
4247
"moduleNameMapper": {
4348
"(.+)\\.js": "$1"

packages/bson/tsconfig.json

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"src",
2727
"index.ts"
2828
],
29+
"exclude": [
30+
"tests"
31+
],
2932
"references": [
3033
{
3134
"path": "../core/tsconfig.json"

packages/type/tsconfig.test.json renamed to packages/bson/tsconfig.spec.json

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"extends": "./tsconfig.json",
3-
"compilerOptions": {
4-
"target": "es2020"
5-
},
63
"include": [
74
"src",
85
"index.ts",

packages/bun/package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,14 @@
3232
"bun-types": "1.0.6"
3333
},
3434
"jest": {
35+
"testEnvironment": "node",
3536
"transform": {
36-
"^.+\\.(ts|tsx)$": "ts-jest"
37+
"^.+\\.(ts|tsx)$": [
38+
"ts-jest",
39+
{
40+
"tsconfig": "<rootDir>/tsconfig.spec.json"
41+
}
42+
]
3743
},
3844
"moduleNameMapper": {
3945
"(.+)\\.js": "$1"

packages/bun/tsconfig.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
},
2121
"include": [
2222
"src",
23-
"tests",
2423
"index.ts"
2524
],
25+
"exclude": [
26+
"tests"
27+
],
2628
"references": [
2729
{
2830
"path": "../core/tsconfig.json"

packages/bun/tsconfig.spec.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": [
4+
"src",
5+
"index.ts",
6+
"tests"
7+
]
8+
}

packages/core-rxjs/package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,14 @@
3232
"rxjs": "~7.5.0"
3333
},
3434
"jest": {
35+
"testEnvironment": "node",
3536
"transform": {
36-
"^.+\\.(ts|tsx)$": "ts-jest"
37+
"^.+\\.(ts|tsx)$": [
38+
"ts-jest",
39+
{
40+
"tsconfig": "<rootDir>/tsconfig.spec.json"
41+
}
42+
]
3743
},
3844
"moduleNameMapper": {
3945
"(.+)\\.js": "$1"

packages/core-rxjs/tsconfig.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
},
1919
"include": [
2020
"src",
21-
"index.ts",
21+
"index.ts"
22+
],
23+
"exclude": [
2224
"tests"
2325
],
2426
"references": [

packages/core-rxjs/tsconfig.spec.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": [
4+
"src",
5+
"index.ts",
6+
"tests"
7+
]
8+
}

packages/core/package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,14 @@
3131
"build": "echo '{\"type\": \"module\"}' > ./dist/esm/package.json"
3232
},
3333
"jest": {
34+
"testEnvironment": "node",
3435
"transform": {
35-
"^.+\\.(ts|tsx)$": "ts-jest"
36+
"^.+\\.(ts|tsx)$": [
37+
"ts-jest",
38+
{
39+
"tsconfig": "<rootDir>/tsconfig.spec.json"
40+
}
41+
]
3642
},
3743
"moduleNameMapper": {
3844
"(.+)\\.js": "$1"

packages/core/tsconfig.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@
1616
"declaration": true,
1717
"composite": true,
1818
"types": [
19-
"dot-prop"
19+
"dot-prop",
20+
"node"
2021
]
2122
},
2223
"reflection": true,
2324
"include": [
2425
"src",
25-
"index.ts",
26+
"index.ts"
27+
],
28+
"exclude": [
2629
"tests"
2730
],
2831
"references": []

packages/core/tsconfig.spec.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": [
4+
"src",
5+
"index.ts",
6+
"tests"
7+
]
8+
}

packages/event/package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,14 @@
3333
"@deepkit/type": "^1.0.1-alpha.113"
3434
},
3535
"jest": {
36+
"testEnvironment": "node",
3637
"transform": {
37-
"^.+\\.(ts|tsx)$": "ts-jest"
38+
"^.+\\.(ts|tsx)$": [
39+
"ts-jest",
40+
{
41+
"tsconfig": "<rootDir>/tsconfig.spec.json"
42+
}
43+
]
3844
},
3945
"moduleNameMapper": {
4046
"(.+)\\.js": "$1"

packages/event/tsconfig.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
},
1919
"include": [
2020
"src",
21-
"tests",
2221
"index.ts"
2322
],
23+
"exclude": [
24+
"tests"
25+
],
2426
"reflection": true,
2527
"references": [
2628
{

packages/event/tsconfig.spec.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": [
4+
"src",
5+
"index.ts",
6+
"tests"
7+
]
8+
}

packages/filesystem-aws-s3/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"^.+\\.(ts|tsx)$": [
3535
"ts-jest",
3636
{
37-
"tsconfig": "<rootDir>/tsconfig.json"
37+
"tsconfig": "<rootDir>/tsconfig.spec.json"
3838
}
3939
]
4040
},

packages/filesystem-aws-s3/tsconfig.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
},
1919
"include": [
2020
"src",
21-
"tests",
2221
"index.ts"
2322
],
23+
"exclude": [
24+
"tests"
25+
],
2426
"references": [
2527
{
2628
"path": "../core/tsconfig.json"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": [
4+
"src",
5+
"index.ts",
6+
"tests"
7+
]
8+
}

packages/filesystem-ftp/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"^.+\\.(ts|tsx)$": [
3535
"ts-jest",
3636
{
37-
"tsconfig": "<rootDir>/tsconfig.json"
37+
"tsconfig": "<rootDir>/tsconfig.spec.json"
3838
}
3939
]
4040
},

0 commit comments

Comments
 (0)