-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
663 additions
and
1,156 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@data-client/use-enhanced-reducer': patch | ||
'@data-client/react': patch | ||
'@data-client/test': patch | ||
'@data-client/ssr': patch | ||
--- | ||
|
||
Improve compatibility with React 19 |
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 |
---|---|---|
|
@@ -18,9 +18,9 @@ jobs: | |
npm pkg set 'workspaces[]'='examples/*' | ||
- restore_cache: | ||
keys: | ||
- v11-dependencies-{{ checksum "yarn.lock" }}-{{ checksum "examples/github-app/package.json" }} | ||
- v12-dependencies-{{ checksum "yarn.lock" }}-{{ checksum "examples/github-app/package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v11-dependencies- | ||
- v12-dependencies- | ||
- run: | ||
name: yarn install | ||
command: | | ||
|
@@ -32,13 +32,13 @@ jobs: | |
paths: | ||
- .yarn/cache | ||
- .yarn/install-state.gz | ||
key: v11-dependencies-{{ checksum "yarn.lock" }}-{{ checksum "examples/github-app/package.json" }} | ||
key: v12-dependencies-{{ checksum "yarn.lock" }}-{{ checksum "examples/github-app/package.json" }} | ||
- run: yarn run ci:build:types | ||
- run: yarn run ci:build | ||
- persist_to_workspace: | ||
root: ~/ | ||
paths: | ||
# excplitily list so we can ignore some directories that are not needed | ||
# explicitly list so we can ignore some directories that are not needed | ||
- project/packages | ||
- project/examples | ||
- project/node_modules | ||
|
@@ -85,26 +85,30 @@ jobs: | |
at: ~/ | ||
- run: | ||
command: | | ||
if [ "<< parameters.react-version >>" != "^18" ]; then | ||
if [ "<< parameters.react-version >>" == "^17.0.0" ]; then | ||
YARN_ENABLE_GLOBAL_CACHE=false yarn remove @react-navigation/native @react-navigation/native-stack react-native-screens | ||
YARN_ENABLE_GLOBAL_CACHE=false yarn workspace @data-client/react remove @react-navigation/native | ||
YARN_ENABLE_GLOBAL_CACHE=false yarn add --dev react@<< parameters.react-version >> react-dom@<< parameters.react-version >> react-test-renderer@<< parameters.react-version >> @testing-library/react@^12.0.0 @testing-library/react-hooks @react-navigation/native@^6.0.0 @react-navigation/native-stack@^6.0.0 react-native-screens@^3.0.0 | ||
YARN_ENABLE_GLOBAL_CACHE=false yarn workspace @data-client/react add @react-navigation/native@^6.0.0 | ||
YARN_ENABLE_GLOBAL_CACHE=false yarn workspace @data-client/test add @testing-library/react@^12.0.0 | ||
elif [ "<< parameters.react-version >>" == "^18" ]; then | ||
YARN_ENABLE_GLOBAL_CACHE=false yarn add --dev react@<< parameters.react-version >> react-dom@<< parameters.react-version >> react-test-renderer@<< parameters.react-version >> | ||
fi | ||
- run: | ||
command: | | ||
if [ "<< parameters.react-version >>" == "^17.0.0" ]; then | ||
yarn test:ci --maxWorkers=3 --selectProjects ReactDOM ReactNative --testPathPattern packages/react packages/use-enhanced-reducer packages/img | ||
elif [ "<< parameters.react-version >>" == "^18" ]; then | ||
curl -Os https://uploader.codecov.io/latest/linux/codecov; | ||
chmod +x codecov; | ||
yarn run test:coverage --ci --maxWorkers=4 --coverageReporters=text-lcov > ./lcov.info; | ||
yarn run test:coverage --ci --maxWorkers=3 --coverageReporters=text-lcov > ./lcov.info; | ||
if [ "$CODECOV_TOKEN" != "" ]; then | ||
./codecov -t ${CODECOV_TOKEN} < ./lcov.info || true; | ||
else | ||
./codecov < ./lcov.info || true; | ||
fi | ||
else | ||
yarn test:ci --maxWorkers=3 --selectProjects ReactDOM ReactNative | ||
yarn test:ci --maxWorkers=4 --selectProjects Node ReactDOM --testPathPattern packages/react packages/use-enhanced-reducer packages/img | ||
fi | ||
node_matrix: | ||
|
@@ -146,21 +150,25 @@ jobs: | |
- run: | ||
command: | | ||
if [ "<< parameters.typescript-version >>" != "latest" ]; then | ||
YARN_ENABLE_GLOBAL_CACHE=false yarn add --dev typescript@<< parameters.typescript-version >> | ||
YARN_ENABLE_GLOBAL_CACHE=false yarn add --dev typescript@~<< parameters.typescript-version >> | ||
fi | ||
if [ "<< parameters.typescript-version >>" == "~4.0" ]; then | ||
YARN_ENABLE_GLOBAL_CACHE=false yarn workspaces foreach -Rt --from github-app --from todo-app add -DE @types/[email protected] | ||
if [[ "<< parameters.typescript-version >>" == "4.0" || \ | ||
"<< parameters.typescript-version >>" == "4.1" || \ | ||
"<< parameters.typescript-version >>" == "4.3" ]]; then | ||
sed -i '/"@types\/react":/d' package.json | ||
sed -i '/"@types\/react-dom":/d' package.json | ||
YARN_ENABLE_GLOBAL_CACHE=false yarn workspaces foreach -Rt --from github-app --from todo-app add -DE @types/react@ts<< parameters.typescript-version >> | ||
fi | ||
- run: | ||
name: typecheck | ||
command: | | ||
if [ "<< parameters.typescript-version >>" == "latest" ] || [ "<< parameters.typescript-version >>" == "~5.3" ] || [ "<< parameters.typescript-version >>" == "~4.8" ]; then | ||
if [ "<< parameters.typescript-version >>" == "latest" ] || [ "<< parameters.typescript-version >>" == "5.3" ] || [ "<< parameters.typescript-version >>" == "4.8" ]; then | ||
yarn run tsc --project examples/todo-app/tsconfig.json | ||
yarn run tsc --project examples/github-app/tsconfig.json | ||
fi | ||
yarn run tsc --project examples/todo-app/tsconfig.typetest.json | ||
yarn run tsc --project examples/github-app/tsconfig.typetest.json | ||
if [ "<< parameters.typescript-version >>" != "~4.0" ]; then | ||
if [ "<< parameters.typescript-version >>" != "4.0" ]; then | ||
yarn run tsc --project examples/todo-app/tsconfig.typetest41.json | ||
fi | ||
|
@@ -208,7 +216,7 @@ workflows: | |
- unit_tests: | ||
matrix: | ||
parameters: | ||
react-version: ["^17.0.0", "^18"] | ||
react-version: ["^17.0.0", "^18", "latest"] | ||
requires: | ||
- setup | ||
- node_matrix: | ||
|
@@ -237,7 +245,7 @@ workflows: | |
# 4.1 is min version for rest package working well | ||
# 4.3 | ||
# 4.7 (but its broken so we do 4.8) lets you apply a generic type to a function type to see its return value | ||
typescript-version: ["~4.0", "~4.1", "~4.3", "~4.8", "~5.3", "latest"] | ||
typescript-version: ["4.0", "4.1", "4.3", "4.8", "5.3", "latest"] | ||
requires: | ||
- setup | ||
- esmodule-loosenulltypes: | ||
|
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 |
---|---|---|
|
@@ -22,15 +22,15 @@ | |
"@data-client/normalizr": "workspace:^", | ||
"benchmark": "^2.1.4", | ||
"normalizr": "^3.6.2", | ||
"react": "^18.2.0" | ||
"react": "^19.0.0-rc.1" | ||
}, | ||
"devDependencies": { | ||
"@anansi/webpack-config": "^20.0.0", | ||
"@babel/core": "7.26.0", | ||
"@babel/node": "7.26.0", | ||
"@types/babel__core": "^7", | ||
"@types/benchmark": "2.1.5", | ||
"@types/react": "18.3.12", | ||
"@types/react": "npm:[email protected]", | ||
"webpack": "^5.76.2", | ||
"webpack-cli": "^5.1.4" | ||
} | ||
|
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.