-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathknip.ts
More file actions
131 lines (128 loc) · 3.8 KB
/
Copy pathknip.ts
File metadata and controls
131 lines (128 loc) · 3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
import type { KnipConfig } from 'knip'
const sharedIgnore = ['dist/**', 'coverage/**', 'static-build/**', 'node_modules/**']
const alphalibIgnore = 'src/alphalib/**'
const config: KnipConfig = {
rules: {
// Binary resolution is unreliable with Yarn PnP; avoid false positives.
binaries: 'off',
exports: 'warn',
types: 'warn',
nsExports: 'warn',
nsTypes: 'warn',
duplicates: 'warn',
},
ignoreWorkspaces: ['.'],
ignoreBinaries: ['biome', 'knip', 'npm-run-all', 'tsc', 'vitest'],
ignoreExportsUsedInFile: {
type: true,
interface: true,
},
workspaces: {
'packages/img': {
entry: [
'src/index.ts',
'src/react.tsx',
'src/server.ts',
'src/server.browser.ts',
'src/next/index.tsx',
'src/next/server.tsx',
'test/**/*.{ts,tsx}',
],
project: ['{src,test}/**/*.{ts,tsx}'],
ignore: [...sharedIgnore],
ignoreDependencies: [
// Knip cannot infer the Vitest environment dependency from its file pragma.
'happy-dom',
// Tooling lives at the repo root in this monorepo.
'vitest',
],
},
'packages/node': {
entry: ['src/Transloadit.ts', 'src/cli.ts', 'test/**/*.{ts,tsx,js,jsx}', 'vitest.config.ts'],
project: ['{src,test}/**/*.{ts,tsx,js,jsx}'],
ignore: [...sharedIgnore, alphalibIgnore],
ignoreDependencies: [
// Used in src/alphalib/** which is excluded from Knip's dependency graph.
'@transloadit/sev-logger',
// Tooling lives at the repo root in this monorepo.
'vitest',
'vitest/config',
],
},
'packages/mcp-server': {
entry: ['src/**/*.ts', 'test/**/*.{ts,tsx,js,jsx}'],
project: ['{src,test}/**/*.{ts,tsx,js,jsx}'],
ignore: [...sharedIgnore],
ignoreDependencies: [
// Tooling lives at the repo root in this monorepo.
'vitest',
],
},
'packages/notify-url-relay': {
entry: ['src/**/*.ts', 'test/**/*.ts', 'vitest.config.ts'],
project: ['{src,test}/**/*.ts'],
ignore: [...sharedIgnore],
ignoreDependencies: [
// Tooling lives at the repo root in this monorepo.
'vitest',
'vitest/config',
],
},
'packages/transloadit': {
entry: [
'src/Transloadit.ts',
'src/cli.ts',
'src/cli/commands/**/*.ts',
'src/cli/types.ts',
'src/tus.ts',
],
project: ['src/**/*.{ts,tsx,js,jsx}'],
ignore: [...sharedIgnore, alphalibIgnore],
ignoreDependencies: [
// Used by generated compatibility package sources that are absent in fresh CI checkouts.
'@transloadit/sev-logger',
'@transloadit/utils',
'cacheable-lookup',
'clipanion',
'debug',
'dotenv',
'execa',
'form-data',
'got',
'into-stream',
'is-stream',
'json-to-ast',
'lodash-es',
'node-watch',
'p-map',
'p-queue',
'recursive-readdir',
'tus-js-client',
'typanion',
'zod',
'@types/debug',
'@types/recursive-readdir',
],
},
'packages/types': {
entry: ['src/index.ts', 'scripts/emit-types.ts', 'scripts/emit-types.test.ts'],
project: ['{src,scripts}/**/*.ts'],
ignore: ['dist/**', 'node_modules/**'],
},
'packages/utils': {
entry: ['src/**/*.ts', 'test/**/*.ts'],
project: ['{src,test}/**/*.ts'],
ignore: ['dist/**', 'node_modules/**'],
ignoreDependencies: [
// Tooling lives at the repo root in this monorepo.
'vitest',
],
},
'packages/zod': {
entry: ['src/**/*.{ts,tsx,js,jsx}', 'scripts/**/*.ts', 'test/**/*.ts'],
project: ['{src,scripts,test}/**/*.ts'],
ignore: ['dist/**', 'node_modules/**'],
},
},
}
export default config