Skip to content

Commit

Permalink
feat: make @testing-library/dom a peer dependency (#304)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Requires @testing-library/dom@^8.0.0 || ^9.0.0
  • Loading branch information
G-Rath authored Jun 4, 2023
1 parent 3f62d47 commit 7b34cbf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
matrix:
eslint: [6.8.0, 6, 7.0.0, 7, 8.0.0, 8]
node: [12.22.0, 12, 14.17.0, 14, 16.0.0, 16]
testing-library-dom: [8, 9]
exclude:
- node: 12.22.0
testing-library-dom: 9
- node: 12
testing-library-dom: 9
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
Expand All @@ -42,6 +48,9 @@ jobs:
- name: Install ESLint v${{ matrix.eslint }}
run: npm install --no-save --force eslint@${{ matrix.eslint }}

- name: Install @testing-library/dom v${{ matrix.testing-library-dom }}
run: npm install --no-save --force @testing-library/dom@${{ matrix.testing-library-dom }}

- name: ▶️ Run validate script (without linting)
if: ${{ matrix.eslint != 8 }}
run: npm run validate -- build,test:coverage
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
},
"dependencies": {
"@babel/runtime": "^7.16.3",
"@testing-library/dom": "^8.11.1",
"requireindex": "^1.2.0"
},
"devDependencies": {
Expand All @@ -55,7 +54,8 @@
"typescript": "^4.5.3"
},
"peerDependencies": {
"eslint": "^6.8.0 || ^7.0.0 || ^8.0.0"
"eslint": "^6.8.0 || ^7.0.0 || ^8.0.0",
"@testing-library/dom": "^8.0.0 || ^9.0.0"
},
"eslintConfig": {
"extends": "./node_modules/kcd-scripts/eslint.js",
Expand Down

0 comments on commit 7b34cbf

Please sign in to comment.