Skip to content

Commit

Permalink
Merge branch 'main' of github.com:redwoodjs/redwood into fix/standard…
Browse files Browse the repository at this point in the history
…ize-jest-config

* 'main' of github.com:redwoodjs/redwood:
  Update dependency @types/vscode to v1.63.2 (redwoodjs#4332)
  createCell: Give cell results priority over cell props (redwoodjs#4304)
  Update dependency node-notifier to v10.0.1 (redwoodjs#4331)
  Update dependency core-js to v3.21.0 (redwoodjs#4330)
  Update dependency @clerk/clerk-js to v2.12.1 (redwoodjs#4327)
  Update dependency @clerk/types to v1.24.1 (redwoodjs#4328)
  Update dependency supertokens-node to v8.6.0 (redwoodjs#4324)
  Update prisma monorepo to v3.9.0 (redwoodjs#4329)
  Update dependency @types/node to v16.11.22 (redwoodjs#4326)
  • Loading branch information
dac09 committed Feb 2, 2022
2 parents 360e4df + 4f36008 commit 8f899da
Show file tree
Hide file tree
Showing 15 changed files with 188 additions and 177 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"babel-plugin-auto-import": "1.1.0",
"babel-plugin-remove-code": "0.0.6",
"boxen": "5.1.2",
"core-js": "3.20.3",
"core-js": "3.21.0",
"cypress": "9.4.1",
"cypress-wait-until": "1.7.2",
"eslint": "8.8.0",
Expand All @@ -72,7 +72,7 @@
"lerna": "4.0.0",
"lodash.template": "4.5.0",
"msw": "0.36.8",
"node-notifier": "10.0.0",
"node-notifier": "10.0.1",
"nodemon": "2.0.15",
"npm-packlist": "3.0.0",
"octokit": "1.7.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"dependencies": {
"@babel/runtime-corejs3": "7.16.7",
"@prisma/client": "3.8.1",
"@prisma/client": "3.9.0",
"crypto-js": "4.1.1",
"jsonwebtoken": "8.5.1",
"jwks-rsa": "2.0.5",
Expand All @@ -43,7 +43,7 @@
"@types/md5": "2.3.1",
"aws-lambda": "1.0.7",
"jest": "27.4.7",
"supertokens-node": "8.5.0",
"supertokens-node": "8.6.0",
"typescript": "4.5.5"
},
"gitHead": "8be6a35c2dfd5aaeb12d55be4f0c77eefceb7762"
Expand Down
4 changes: 2 additions & 2 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"@azure/msal-browser": "2.21.0",
"@babel/cli": "7.16.7",
"@babel/core": "7.16.7",
"@clerk/clerk-js": "2.11.0",
"@clerk/clerk-js": "2.12.1",
"@clerk/clerk-sdk-node": "2.7.5",
"@clerk/types": "1.23.0",
"@clerk/types": "1.24.1",
"@supabase/supabase-js": "1.29.4",
"@types/netlify-identity-widget": "1.9.2",
"@types/react": "17.0.38",
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@prisma/sdk": "3.8.1",
"@prisma/sdk": "3.9.0",
"@redwoodjs/api-server": "v0.43.0",
"@redwoodjs/internal": "v0.43.0",
"@redwoodjs/prerender": "v0.43.0",
Expand All @@ -39,7 +39,7 @@
"chalk": "4.1.2",
"concurrently": "7.0.0",
"configstore": "3.1.5",
"core-js": "3.20.3",
"core-js": "3.21.0",
"cross-env": "7.0.3",
"decamelize": "5.0.0",
"dotenv-defaults": "5.0.0",
Expand All @@ -56,7 +56,7 @@
"pascalcase": "1.0.0",
"pluralize": "8.0.0",
"prettier": "2.5.1",
"prisma": "3.8.1",
"prisma": "3.9.0",
"prompts": "2.4.2",
"rimraf": "3.0.2",
"secure-random-password": "0.2.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/codemods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@babel/plugin-transform-typescript": "7.16.7",
"@babel/runtime-corejs3": "7.16.7",
"@vscode/ripgrep": "1.14.2",
"core-js": "3.20.3",
"core-js": "3.21.0",
"deepmerge": "4.2.2",
"fast-glob": "3.2.11",
"findup-sync": "5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"babel-plugin-module-resolver": "4.1.0",
"babel-timing": "0.9.1",
"copy-webpack-plugin": "10.2.4",
"core-js": "3.20.3",
"core-js": "3.21.0",
"css-loader": "6.5.1",
"css-minimizer-webpack-plugin": "3.4.1",
"dotenv-webpack": "7.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/graphql-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
"@graphql-tools/merge": "8.2.1",
"@graphql-tools/schema": "8.3.1",
"@graphql-tools/utils": "8.6.1",
"@prisma/client": "3.8.1",
"@prisma/client": "3.9.0",
"@redwoodjs/api": "v0.43.0",
"core-js": "3.20.3",
"core-js": "3.21.0",
"graphql": "16.3.0",
"graphql-helix": "1.11.0",
"graphql-playground-html": "1.6.30",
Expand Down
2 changes: 1 addition & 1 deletion packages/internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"babel-plugin-graphql-tag": "3.3.0",
"babel-plugin-polyfill-corejs3": "0.5.0",
"chalk": "4.1.2",
"core-js": "3.20.3",
"core-js": "3.21.0",
"deepmerge": "4.2.2",
"esbuild": "0.14.16",
"fast-glob": "3.2.11",
Expand Down
6 changes: 3 additions & 3 deletions packages/record/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
]
},
"dependencies": {
"@prisma/client": "3.8.1",
"@prisma/sdk": "3.8.1",
"core-js": "3.20.3"
"@prisma/client": "3.9.0",
"@prisma/sdk": "3.9.0",
"core-js": "3.21.0"
},
"devDependencies": {
"@babel/cli": "7.16.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"@reach/skip-nav": "0.16.0",
"@redwoodjs/auth": "v0.43.0",
"core-js": "3.20.3",
"core-js": "3.21.0",
"lodash.isequal": "4.5.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/structure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
]
},
"dependencies": {
"@prisma/sdk": "3.8.1",
"@prisma/sdk": "3.9.0",
"@redwoodjs/internal": "v0.43.0",
"@types/line-column": "1.0.0",
"camelcase": "6.3.0",
Expand Down Expand Up @@ -58,8 +58,8 @@
"@types/fs-extra": "9.0.13",
"@types/lodash": "4.14.178",
"@types/lru-cache": "5.1.1",
"@types/node": "16.11.21",
"@types/vscode": "1.63.1",
"@types/node": "16.11.22",
"@types/vscode": "1.63.2",
"jest": "27.4.7",
"typescript": "4.5.5"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@types/aws-lambda": "8.10.92",
"@types/babel-core": "6.25.7",
"@types/jest": "27.4.0",
"@types/node": "16.11.21",
"@types/node": "16.11.22",
"@types/react": "17.0.38",
"@types/react-dom": "17.0.11",
"@types/webpack": "5.28.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"@apollo/client": "3.5.8",
"@redwoodjs/auth": "v0.43.0",
"core-js": "3.20.3",
"core-js": "3.21.0",
"graphql": "16.3.0",
"proptypes": "1.1.0",
"react-helmet-async": "1.2.2",
Expand Down
30 changes: 21 additions & 9 deletions packages/web/src/components/createCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,24 +241,22 @@ export function createCell<CellProps = any>({

const options = beforeQuery(variables)

// queryRest includes `variables: { ... }`, with any variables returned
// from beforeQuery
const { error, loading, data, ...queryRest } = useQuery(
typeof QUERY === 'function' ? QUERY(options) : QUERY,
options
)

const commonProps = {
updating: loading,
...queryRest,
...props,
}

if (error) {
if (Failure) {
return (
<Failure
error={error}
errorCode={error.graphQLErrors?.[0]?.extensions?.['code'] as string}
{...commonProps}
{...props}
updating={loading}
{...queryRest}
/>
)
} else {
Expand All @@ -268,9 +266,23 @@ export function createCell<CellProps = any>({
const afterQueryData = afterQuery(data)

if (isEmpty(data, { isDataEmpty }) && Empty) {
return <Empty {...{ ...afterQueryData, ...commonProps }} />
return (
<Empty
{...props}
{...afterQueryData}
updating={loading}
{...queryRest}
/>
)
} else {
return <Success {...{ ...afterQueryData, ...commonProps }} />
return (
<Success
{...props}
{...afterQueryData}
updating={loading}
{...queryRest}
/>
)
}
} else if (loading) {
return <Loading {...{ ...queryRest, ...props }} />
Expand Down
Loading

0 comments on commit 8f899da

Please sign in to comment.