From 9f12b0642de0bcc889fb32a0ff10a8d7fdfae8ec Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 4 Jan 2025 17:34:25 +0100 Subject: [PATCH 1/6] Add React 19 to peer dependencies --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6971645..adbaea4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,7 @@ "node": ">= 16.12.0" }, "peerDependencies": { - "react": "^18.0.0" + "react": "^18.0.0 || ^19.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index 059d941..376b8d7 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "vitest": "^2.1.5" }, "peerDependencies": { - "react": "^18.0.0" + "react": "^18.0.0 || ^19.0.0" }, "engines": { "node": ">= 16.12.0" From 01e20ede067fb41033c711c75a4cc30b54818b82 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 4 Jan 2025 17:37:35 +0100 Subject: [PATCH 2/6] Add supported react versions to test workflow matrix --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9210dba..0188d3b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,6 +16,7 @@ jobs: strategy: matrix: node-version: [18.x, 22.x] + react-version: [18.0, 18.1, 18.2, 18.3, 19.0] steps: - uses: actions/checkout@v2 @@ -29,6 +30,9 @@ jobs: - name: Install run: npm ci + - name: Install react + run: npm install react@${{ matrix.react-version }} + - name: Lint, format and type check run: npm run verify From 041cdd7330ec12d163f2b6ba30d0002ab700ef8d Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 4 Jan 2025 17:38:15 +0100 Subject: [PATCH 3/6] Update to latest checkout and setup-node actions --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0188d3b..2fd6786 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,10 +19,10 @@ jobs: react-version: [18.0, 18.1, 18.2, 18.3, 19.0] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' From 58ee020eb69a51fb24f5ce67afb212edeb9a7ab7 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 4 Jan 2025 17:41:43 +0100 Subject: [PATCH 4/6] Quote react versions in test workflow --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2fd6786..eb5fad3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: node-version: [18.x, 22.x] - react-version: [18.0, 18.1, 18.2, 18.3, 19.0] + react-version: ['18.0.*', '18.1.*', '18.2.*', '18.3.*', '19.0.*'] steps: - uses: actions/checkout@v4 From f302cb2d85f4094c8f62e1d19b65c7c589811675 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 4 Jan 2025 17:44:20 +0100 Subject: [PATCH 5/6] Install react-dom on the same version as react --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb5fad3..fe923df 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,7 @@ jobs: run: npm ci - name: Install react - run: npm install react@${{ matrix.react-version }} + run: npm install react@${{ matrix.react-version }} react-dom@${{ matrix.react-version }} - name: Lint, format and type check run: npm run verify From 11a0809c2f93db8983f6d9f0b1a3a6b07e52cd54 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Wed, 15 Jan 2025 17:26:27 +0100 Subject: [PATCH 6/6] Simplify react-version in test matrix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe923df..987aba3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: node-version: [18.x, 22.x] - react-version: ['18.0.*', '18.1.*', '18.2.*', '18.3.*', '19.0.*'] + react-version: ['18.*', '19.*'] steps: - uses: actions/checkout@v4