Skip to content

Commit 7b34cbf

Browse files
authored
feat: make @testing-library/dom a peer dependency (#304)
BREAKING CHANGE: Requires @testing-library/dom@^8.0.0 || ^9.0.0
1 parent 3f62d47 commit 7b34cbf

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/validate.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ jobs:
2424
matrix:
2525
eslint: [6.8.0, 6, 7.0.0, 7, 8.0.0, 8]
2626
node: [12.22.0, 12, 14.17.0, 14, 16.0.0, 16]
27+
testing-library-dom: [8, 9]
28+
exclude:
29+
- node: 12.22.0
30+
testing-library-dom: 9
31+
- node: 12
32+
testing-library-dom: 9
2733
runs-on: ubuntu-latest
2834
steps:
2935
- name: ⬇️ Checkout repo
@@ -42,6 +48,9 @@ jobs:
4248
- name: Install ESLint v${{ matrix.eslint }}
4349
run: npm install --no-save --force eslint@${{ matrix.eslint }}
4450

51+
- name: Install @testing-library/dom v${{ matrix.testing-library-dom }}
52+
run: npm install --no-save --force @testing-library/dom@${{ matrix.testing-library-dom }}
53+
4554
- name: ▶️ Run validate script (without linting)
4655
if: ${{ matrix.eslint != 8 }}
4756
run: npm run validate -- build,test:coverage

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
},
4343
"dependencies": {
4444
"@babel/runtime": "^7.16.3",
45-
"@testing-library/dom": "^8.11.1",
4645
"requireindex": "^1.2.0"
4746
},
4847
"devDependencies": {
@@ -55,7 +54,8 @@
5554
"typescript": "^4.5.3"
5655
},
5756
"peerDependencies": {
58-
"eslint": "^6.8.0 || ^7.0.0 || ^8.0.0"
57+
"eslint": "^6.8.0 || ^7.0.0 || ^8.0.0",
58+
"@testing-library/dom": "^8.0.0 || ^9.0.0"
5959
},
6060
"eslintConfig": {
6161
"extends": "./node_modules/kcd-scripts/eslint.js",

0 commit comments

Comments
 (0)