Skip to content

Commit c487799

Browse files
committed
chore(deps): simplify peer deps with pnpm hoisting
1 parent 6d7a139 commit c487799

File tree

10 files changed

+127
-104
lines changed

10 files changed

+127
-104
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@apitree.cz/testing-library': minor
3+
'@apitree.cz/vitest-config': minor
4+
---
5+
6+
Simplify peer deps with `pnpm` setup.

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ auto-install-peers=false
22
enable-pre-post-scripts=true
33
public-hoist-pattern[]=*eslint*
44
public-hoist-pattern[]=*prettier*
5+
public-hoist-pattern[]=*vitest*
56
strict-peer-deps=true

packages/eslint-config/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212

1313
## Installation
1414

15+
In a `pnpm` monorepo, add the following to your root `.npmrc` file:
16+
17+
```
18+
public-hoist-pattern[]=*eslint*
19+
```
20+
21+
Then, install the package:
22+
1523
```bash
1624
pnpm add --save-dev @apitree.cz/eslint-config eslint
1725
```

packages/prettier-config/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212

1313
## Installation
1414

15+
In a `pnpm` monorepo, add the following to your root `.npmrc` file:
16+
17+
```
18+
public-hoist-pattern[]=*prettier*
19+
```
20+
21+
Then, install the package:
22+
1523
```bash
1624
pnpm add --save-dev @apitree.cz/prettier-config prettier
1725
```

packages/testing-library/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
## Installation
1414

1515
```bash
16-
pnpm add --save-dev @apitree.cz/testing-library @testing-library/react vitest
16+
pnpm add --save-dev @apitree.cz/testing-library @testing-library/react react react-dom
1717
```
1818

1919
## Usage

packages/testing-library/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,13 @@
5252
"@testing-library/react": "^16.2.0",
5353
"@types/react": "^19.0.8",
5454
"@types/react-dom": "^19.0.3",
55-
"@vitest/coverage-v8": "^3.0.4",
5655
"react": "^19.0.0",
5756
"react-dom": "^19.0.0",
5857
"vitest": "^3.0.4"
5958
},
6059
"peerDependencies": {
6160
"@testing-library/react": "^16.2.0",
6261
"react": "^19.0.0",
63-
"react-dom": "^19.0.0",
64-
"vitest": "^3.0.4"
62+
"react-dom": "^19.0.0"
6563
}
6664
}

packages/testing-library/src/setup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable import/no-extraneous-dependencies */
12
import '@testing-library/jest-dom/vitest';
23
import { cleanup } from '@testing-library/react';
34
import { afterEach } from 'vitest';

packages/vitest-config/README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,16 @@
1212

1313
## Installation
1414

15+
In a `pnpm` monorepo, add the following to your root `.npmrc` file:
16+
17+
```
18+
public-hoist-pattern[]=*vitest*
19+
```
20+
21+
Then, install the package:
22+
1523
```bash
16-
pnpm add --save-dev @apitree.cz/vitest-config @vitest/coverage-v8 vitest
24+
pnpm add --save-dev @apitree.cz/vitest-config vitest
1725
```
1826

1927
## Usage
@@ -36,9 +44,6 @@ export { react as default } from '@apitree.cz/vitest-config';
3644
3745
### Nest.js
3846

39-
> ⚠️ Nest.js projects are CJS by default. This configuration needs to be placed in `vitest.config.mjs` to interpret it
40-
> as ESM. If your project, however, is ESM, you can place the configuration in `vitest.config.ts` as usual.
41-
4247
```typescript
4348
export { nestjs as default } from '@apitree.cz/vitest-config';
4449
```

packages/vitest-config/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,15 @@
5050
"dependencies": {
5151
"@swc/core": "^1.10.11",
5252
"@vitejs/plugin-react": "^4.3.4",
53+
"@vitest/coverage-v8": "^3.0.4",
5354
"unplugin-swc": "^1.5.1",
5455
"vite": "^6.0.11"
5556
},
5657
"devDependencies": {
57-
"@vitest/coverage-v8": "^3.0.4",
5858
"jsdom": "^26.0.0",
5959
"vitest": "^3.0.4"
6060
},
6161
"peerDependencies": {
62-
"@vitest/coverage-v8": "^3.0.4",
6362
"jsdom": "^26.0.0",
6463
"vitest": "^3.0.4"
6564
},

0 commit comments

Comments
 (0)