diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index f866879a..bf3237bb 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,4 +1,5 @@ { + "installCommand": "install:csb", "sandboxes": ["new", "github/kentcdodds/react-testing-library-examples"], "node": "12" } diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 67b71c24..b2e7dc4c 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -2,7 +2,9 @@ name: validate on: push: branches: - - '+([0-9])?(.{+([0-9]),x}).x' + # Match SemVer major release branches + # e.g. "12.x" or "8.x" + - '[0-9]+.x' - 'main' - 'next' - 'next-major' @@ -58,8 +60,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.repository == 'testing-library/react-testing-library' && - contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/alpha', - github.ref) && github.event_name == 'push' }} + github.event_name == 'push' }} steps: - name: 🛑 Cancel Previous Runs uses: styfle/cancel-workflow-action@0.9.0 diff --git a/package.json b/package.json index 73d39de8..47b5ad06 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "build:bundle:pure": "dotenv -e .bundle.main.env -e .bundle.pure.env kcd-scripts build -- --bundle --no-clean", "build:main": "kcd-scripts build --no-clean", "format": "kcd-scripts format", + "install:csb": "npm install", "lint": "kcd-scripts lint", "setup": "npm install && npm run validate -s", "test": "kcd-scripts test", @@ -46,7 +47,7 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@testing-library/dom": "^8.0.0", - "@types/react-dom": "*" + "@types/react-dom": "<18.0.0" }, "devDependencies": { "@testing-library/jest-dom": "^5.11.6", @@ -59,8 +60,8 @@ "typescript": "^4.1.2" }, "peerDependencies": { - "react": "*", - "react-dom": "*" + "react": "<18.0.0", + "react-dom": "<18.0.0" }, "eslintConfig": { "extends": "./node_modules/kcd-scripts/eslint.js",