-
-
Notifications
You must be signed in to change notification settings - Fork 622
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-tests-stale-dependents
- Loading branch information
Showing
31 changed files
with
19,411 additions
and
17,327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,18 +15,21 @@ jobs: | |
build: [cjs, esm, umd] | ||
env: [development, production] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
node-version: '18' | ||
cache: yarn | ||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
- run: yarn install --frozen-lockfile --check-files | ||
- run: yarn build | ||
version: 8.2.0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
cache-dependency-path: '**/pnpm-lock.yaml' | ||
- run: pnpm install --frozen-lockfile | ||
- run: pnpm build | ||
- name: Use React 17 for production test | ||
if: ${{ matrix.env == 'production' }} | ||
run: | | ||
yarn add -D [email protected] [email protected] @testing-library/[email protected] | ||
pnpm add -D [email protected] [email protected] @testing-library/[email protected] | ||
- name: Patch for DEV-ONLY | ||
if: ${{ matrix.env == 'development' }} | ||
run: | | ||
|
@@ -65,6 +68,6 @@ jobs: | |
NODE_ENV: ${{ matrix.env }} | ||
- name: Test ${{ matrix.build }} ${{ matrix.env }} | ||
run: | | ||
yarn test:ci:build # test:ci | ||
pnpm test-build:spec # test:spec | ||
env: | ||
NODE_ENV: ${{ matrix.env }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,17 +10,18 @@ jobs: | |
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
node-version: '18' | ||
cache: yarn | ||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
- run: yarn install --frozen-lockfile --check-files | ||
- name: Test Build # we don't have any other workflows to test build | ||
run: yarn build | ||
- name: Test Default | ||
run: yarn test:ci | ||
version: 8.2.0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
cache-dependency-path: '**/pnpm-lock.yaml' | ||
- run: pnpm install --frozen-lockfile | ||
- run: pnpm build # we don't have any other workflows to test build | ||
- run: pnpm test:spec | ||
|
||
test_matrix: | ||
runs-on: ubuntu-latest | ||
|
@@ -36,25 +37,28 @@ jobs: | |
- 18.3.0-canary-4b84f1161-20240318 | ||
- 0.0.0-experimental-4b84f1161-20240318 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.2.0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
cache: yarn | ||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
- run: yarn install --frozen-lockfile --check-files | ||
node-version: 18 | ||
cache: 'pnpm' | ||
cache-dependency-path: '**/pnpm-lock.yaml' | ||
- run: pnpm install --frozen-lockfile | ||
- name: Install legacy testing-library | ||
if: ${{ startsWith(matrix.react, '16.') || startsWith(matrix.react, '17.') }} | ||
run: yarn add -D @testing-library/[email protected] | ||
run: pnpm add -D @testing-library/[email protected] | ||
- name: Patch for React 16 | ||
if: ${{ startsWith(matrix.react, '16.') }} | ||
run: | | ||
sed -i~ '1s/^/import React from "react";/' tests/*/*.tsx tests/*/*/*.tsx | ||
sed -i~ 's/"jsx": "react-jsx"/"jsx": "react"/' tsconfig.json | ||
sed -i~ 's/import\.meta\.env[?]\.MODE/"DEVELOPMENT".toLowerCase()/' src/*.ts src/*/*.ts src/*/*/*.ts | ||
- name: Test Build # we need to build for babel tests | ||
run: yarn build | ||
run: pnpm build | ||
- name: Test ${{ matrix.react }} | ||
run: | | ||
yarn add -D react@${{ matrix.react }} react-dom@${{ matrix.react }} | ||
yarn test:ci | ||
pnpm add -D react@${{ matrix.react }} react-dom@${{ matrix.react }} | ||
pnpm test:spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,14 +31,17 @@ jobs: | |
- 3.9.7 | ||
- 3.8.3 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
node-version: '18' | ||
cache: yarn | ||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
- run: yarn install --frozen-lockfile --check-files | ||
- run: yarn build | ||
version: 8.2.0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
cache-dependency-path: '**/pnpm-lock.yaml' | ||
- run: pnpm install --frozen-lockfile | ||
- run: pnpm build | ||
- name: Patch for Newer TS | ||
if: ${{ matrix.typescript == '4.9.5' || matrix.typescript == '4.8.4' }} | ||
run: | | ||
|
@@ -66,34 +69,23 @@ jobs: | |
sed -i~ 's/"jsx": "react-jsx",/"jsx": "react",/' tsconfig.json | ||
sed -i~ 's/"noUncheckedIndexedAccess": true,//' tsconfig.json | ||
sed -i~ 's/^import type /import /' tests/*/*.tsx tests/*/*/*.tsx | ||
yarn json -I -f package.json -e "this.resolutions={}; this.resolutions['@types/prettier']='2.4.2'; this.resolutions['@types/node']='18.11.18';" | ||
yarn add -D @types/[email protected] @types/[email protected] @types/[email protected] @types/[email protected] | ||
pnpm json -I -f package.json -e "this.resolutions={}; this.resolutions['@types/prettier']='2.4.2'; this.resolutions['@types/node']='18.11.18';" | ||
pnpm add -D @types/[email protected] @types/[email protected] @types/[email protected] @types/[email protected] | ||
rm -r tests/react/vanilla-utils/atomWithObservable.* | ||
- name: Install old TypeScript | ||
run: yarn add -D typescript@${{ matrix.typescript }} | ||
run: pnpm add -D typescript@${{ matrix.typescript }} | ||
- name: Patch testing setup for Old TS | ||
if: ${{ matrix.typescript == '4.4.4' || matrix.typescript == '4.3.5' || matrix.typescript == '4.2.3' || matrix.typescript == '4.1.5' || matrix.typescript == '4.0.5' || startsWith(matrix.typescript, '3.') }} | ||
run: | | ||
rm node_modules/@vitest/expect/dist/*.d.ts | ||
echo "declare module '@vitest/expect'" >> ./src/types.d.ts | ||
rm node_modules/@vitest/runner/dist/*.d.ts | ||
echo "declare module '@vitest/runner'" >> ./src/types.d.ts | ||
rm node_modules/@vitest/spy/dist/*.d.ts | ||
echo "declare module '@vitest/spy'" >> ./src/types.d.ts | ||
rm node_modules/@vitest/utils/dist/*.d.ts | ||
echo "declare module '@vitest/utils'" >> ./src/types.d.ts | ||
rm node_modules/vite-node/dist/*.d.ts | ||
echo "declare module 'vite-node'" >> ./src/types.d.ts | ||
rm node_modules/vitest/dist/*.d.ts | ||
echo "declare module 'vitest'" >> ./src/types.d.ts | ||
pnpm add -D [email protected] @vitest/[email protected] @vitest/[email protected] | ||
- name: Patch testing setup for older TS | ||
if: ${{ matrix.typescript == '4.0.5' || startsWith(matrix.typescript, '3.') }} | ||
run: | | ||
yarn add -D @testing-library/[email protected] @testing-library/[email protected] | ||
pnpm add -D @testing-library/[email protected] @testing-library/[email protected] | ||
rm node_modules/vitest/dist/*.d.ts | ||
echo "declare module 'vitest'" >> ./src/types.d.ts | ||
- name: Test ${{ matrix.typescript }} | ||
run: | | ||
rm -r node_modules/@types/babel__core/node_modules | ||
sed -i~ 's/">=4.2": {/">=4.1": {/' node_modules/rxjs/package.json | ||
yarn tsc --noEmit | ||
pnpm test:types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.