From b6ee176120c22a10dd44426898a2b446086d21fe Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Sun, 4 Jun 2023 12:55:47 +1200 Subject: [PATCH 1/6] feat: make `@testing-library/dom` a peer dependency BREAKING CHANGE --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 595ede8..f420b59 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ }, "dependencies": { "@babel/runtime": "^7.16.3", - "@testing-library/dom": "^8.11.1", "requireindex": "^1.2.0" }, "devDependencies": { @@ -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", From 71e5c09abc6575c037fb83da8ce95d4fb68fe03c Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Sun, 4 Jun 2023 12:58:02 +1200 Subject: [PATCH 2/6] ci: test against multiple versions of `@testing-library/dom` --- .github/workflows/validate.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 81c502d..d48f2c0 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -22,6 +22,7 @@ jobs: strategy: fail-fast: false matrix: + testing-library: [8, 9] 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] runs-on: ubuntu-latest @@ -42,6 +43,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 }} + run: npm install --no-save --force @testing-library/dom@${{ matrix.testing-library }} + - name: ▶️ Run validate script (without linting) if: ${{ matrix.eslint != 8 }} run: npm run validate -- build,test:coverage From b4126e60ac106dae2a5ac976f8ceb6946c9cb42e Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Sun, 4 Jun 2023 13:14:51 +1200 Subject: [PATCH 3/6] ci: do not test `@testing-library/dom` v9 against Node 12 --- .github/workflows/validate.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index d48f2c0..258a1c9 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -25,6 +25,11 @@ jobs: testing-library: [8, 9] 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] + exclude: + - testing-library: 9 + node: 12.22.0 + - testing-library: 9 + node: 12 runs-on: ubuntu-latest steps: - name: ⬇️ Checkout repo From 5f552e55758ba6605bcd23a29d367422ed40ddc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sun, 4 Jun 2023 16:16:27 +0200 Subject: [PATCH 4/6] Update .github/workflows/validate.yml --- .github/workflows/validate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 258a1c9..f7a20be 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -22,9 +22,9 @@ jobs: strategy: fail-fast: false matrix: - testing-library: [8, 9] 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: - testing-library: 9 node: 12.22.0 From 790f51d807e2717e07032ca1bf68ae6ee6b1464c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sun, 4 Jun 2023 16:16:35 +0200 Subject: [PATCH 5/6] Update .github/workflows/validate.yml --- .github/workflows/validate.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index f7a20be..c260a55 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -26,10 +26,10 @@ jobs: node: [12.22.0, 12, 14.17.0, 14, 16.0.0, 16] testing-library-dom: [8, 9] exclude: - - testing-library: 9 - node: 12.22.0 - - testing-library: 9 - node: 12 + - node: 12.22.0 + testing-library-dom: 9 + - node: 12 + testing-library-dom: 9 runs-on: ubuntu-latest steps: - name: ⬇️ Checkout repo From cffdde0c854ba1359b8fad30fdf2d6431c303e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sun, 4 Jun 2023 16:16:41 +0200 Subject: [PATCH 6/6] Update .github/workflows/validate.yml --- .github/workflows/validate.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index c260a55..8ac35e7 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -48,8 +48,8 @@ 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 }} - run: npm install --no-save --force @testing-library/dom@${{ matrix.testing-library }} + - 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 }}