forked from TanStack/query
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pnpmfile.cjs
42 lines (39 loc) · 1.53 KB
/
.pnpmfile.cjs
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
function readPackage(pkg, context) {
if (pkg.name === 'react-scripts' && pkg.version === '4.0.3') {
delete pkg.dependencies['@typescript-eslint/eslint-plugin']
delete pkg.dependencies['@typescript-eslint/parser']
delete pkg.dependencies['babel-eslint']
delete pkg.dependencies['babel-jest']
delete pkg.dependencies['eslint']
delete pkg.dependencies['eslint-config-react-app']
delete pkg.dependencies['eslint-plugin-flowtype']
delete pkg.dependencies['eslint-plugin-import']
delete pkg.dependencies['eslint-plugin-jest']
delete pkg.dependencies['eslint-plugin-jsx-a11y']
delete pkg.dependencies['eslint-plugin-react']
delete pkg.dependencies['eslint-plugin-react-hooks']
delete pkg.dependencies['eslint-plugin-testing-library']
delete pkg.dependencies['jest']
delete pkg.dependencies['jest-circus']
delete pkg.dependencies['jest-resolve']
delete pkg.dependencies['jest-watch-typeahead']
context.log('Removed unused dependencies from [email protected]')
}
if (pkg.name === 'react-scripts' && pkg.version === '5.0.1') {
delete pkg.dependencies['babel-jest']
delete pkg.dependencies['eslint']
delete pkg.dependencies['eslint-config-react-app']
delete pkg.dependencies['jest']
delete pkg.dependencies['jest-resolve']
delete pkg.dependencies['jest-watch-typeahead']
context.log('Removed unused dependencies from [email protected]')
}
return pkg
}
module.exports = {
hooks: {
readPackage,
},
}