Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/ci_framework-majors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: '🔬 CI — Framework Majors'

on:
push:
branches:
- main
paths:
- '.github/workflows/ci_framework-majors.yml'
- 'src/**'
- 'tests/**'
- 'run.test.ts'
- 'package-lock.json'
- 'package.json'
pull_request:
paths:
- '.github/workflows/ci_framework-majors.yml'
- 'src/**'
- 'tests/**'
- 'run.test.ts'
- 'package-lock.json'
- 'package.json'
workflow_dispatch:

jobs:
framework-majors:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
react-major: ['18', '19']
name: React ${{ matrix.react-major }}
steps:
- name: ➕ Actions - Checkout
uses: actions/checkout@v4

- name: ➕ Actions - Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'

- name: ➕ Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-linux-${{ hashFiles('package-lock.json') }}
restore-keys: npm-linux-

- name: 📦 Installing Dependencies
run: npm ci

- name: 🔁 Pin React ${{ matrix.react-major }}
run: |
npm install --no-save \
react@${{ matrix.react-major }} \
react-dom@${{ matrix.react-major }} \
@types/react@${{ matrix.react-major }} \
@types/react-dom@${{ matrix.react-major }}

- name: 🔬 React ${{ matrix.react-major }}
run: npm test
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,35 @@ test('renders a heading', () => {

## Compatibility

### Library Support

| Package | Supported range |
| ------- | :-------------: |
| `react` | `>=18` |
| `react-dom` | `>=18` |
| `poku` | `>=4.1.0` |
| `happy-dom` | `>=20` |
| `jsdom` | `>=22` |

### Isolation Support

| Isolation mode | Node validation |
| -------------- | :-------------: |
| `none` | ✅ |
| `process` | ✅ |

Shared-process runs rely on scoped cleanup slots from `@pokujs/dom`, so one test's `cleanup()` no longer tears down another concurrent test's mounted tree.

### Multi-Major Suite

Use this suite to verify React major compatibility locally:

```bash
npm run test:multi-major
```

It executes the full adapter tests twice, pinning React 18 and React 19 in sequence.

### Runtime × DOM Adapter

| | Node.js ≥ 20 | Bun ≥ 1 | Deno ≥ 2 |
Expand Down
12 changes: 4 additions & 8 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

125 changes: 78 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
"test:deno": "deno run -A run.test.ts",
"test:deno:none": "cross-env POKU_REACT_TEST_DOM=happy-dom deno run -A npm:poku tests --showLogs --isolation=none",
"test:deno:process": "cross-env POKU_REACT_TEST_DOM=happy-dom deno run -A npm:poku tests --showLogs --isolation=process",
"test:major:18": "npm install --no-save react@18 react-dom@18 @types/react@18 @types/react-dom@18 && npm test",
"test:major:19": "npm install --no-save react@19 react-dom@19 @types/react@19 @types/react-dom@19 && npm test",
"test:multi-major": "npm run test:major:18 && npm run test:major:19",
"clean": "rimraf dist",
"build": "tsup src/index.ts src/plugin.ts src/react-testing.ts src/dom-setup-happy.ts src/dom-setup-jsdom.ts --format esm --dts --target node20 --sourcemap --clean --tsconfig tsconfig.tsup.json",
"typecheck": "tsc -p tsconfig.build.json --noEmit",
Expand Down Expand Up @@ -100,15 +103,15 @@
"devDependencies": {
"@happy-dom/global-registrator": "^20.8.9",
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
"@pokujs/dom": "^1.2.0",
"@pokujs/dom": "file:../dom",
"@types/jsdom": "^28.0.1",
"@types/node": "^25.5.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"cross-env": "^10.1.0",
"happy-dom": "^20.8.9",
"jsdom": "^26.1.0",
"poku": "4.2.0",
"poku": "file:../poku",
"prettier": "^3.6.2",
"react": "^19.2.4",
"react-dom": "^19.2.4",
Expand Down
Loading
Loading