Skip to content

Commit

Permalink
Merge branch 'main' into tobbe-fatalerrorpage-codemod
Browse files Browse the repository at this point in the history
  • Loading branch information
jtoar committed May 2, 2022
2 parents 8eded09 + 96956c8 commit 523af56
Show file tree
Hide file tree
Showing 29 changed files with 370 additions and 359 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -51,7 +51,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -65,4 +65,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
2 changes: 1 addition & 1 deletion docs/docs/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ const UserAuthTools = () => {

#### Firebase Auth Provider Specific Integration

See the Firebase information within this doc's [Auth Provider Specific Integration](https://redwoodjs.com/docs/authentication.html#auth-provider-specific-integration) section.
See the Firebase information within this doc's [Auth Provider Specific Integration](#auth-provider-specific-integration) section.
+++

### Supabase
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,7 @@ yarn redwood setup tsconfig
### setup ui
Set up a UI design or style library. Right now the choices are [Chakra UI](https://chakra-ui.com/) and [TailwindCSS](https://tailwindcss.com/).
Set up a UI design or style library. Right now the choices are [Chakra UI](https://chakra-ui.com/), [TailwindCSS](https://tailwindcss.com/) and [WindiCSS](https://windicss.org/).
```
yarn rw setup ui <library>
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/local-postgres-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ datasource db {
url = env("DATABASE_URL")
}
```
> Note: If you run into a "PrismaClientInitializationError" then you may need to regenerate the prisma client using: `yarn rw prisma generate`
## Connect to Postgres

Expand Down Expand Up @@ -119,6 +120,7 @@ Here is an example of the structure of the base URL and the path using placehold
postgresql://USER:PASSWORD@HOST:PORT/DATABASE
```
The following components make up the base URL of your database, they are always required:

| Name | Placeholder | Description |
| ------ | ------ | ------|
| Host | `HOST`| IP address/domain of your database server, e.g. `localhost` |
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/tutorial/chapter4/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ export const hasRole = ({ roles }): boolean => {
return false
}

export const requireAuth = ({ roles }: { roles: AllowedRoles }) => {
export const requireAuth = ({ roles }: { roles?: AllowedRoles } = {}) => {
if (!isAuthenticated()) {
throw new AuthenticationError("You don't have permission to do that.")
}
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/tutorial/chapter5/first-story.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ interface Props {
}

// highlight-next-line
const Article = ({ article, summary = false }) => {
const Article = ({ article, summary = false }: Props) => {
return (
<article className="mt-10">
<header>
Expand Down Expand Up @@ -195,7 +195,7 @@ export const Success = ({ articles }) => {
```tsx title="web/src/components/ArticlesCell/ArticlesCell.tsx"
import Article from 'src/components/Article'

import type { FindArticleQuery } from 'types/graphql'
import type { ArticlesQuery } from 'types/graphql'
import type { CellSuccessProps, CellFailureProps } from '@redwoodjs/web'

export const QUERY = gql`
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.18",
"@tsconfig/docusaurus": "1.0.5",
"typescript": "4.6.3"
"typescript": "4.6.4"
}
}
18 changes: 9 additions & 9 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4652,7 +4652,7 @@ __metadata:
react: 17.0.2
react-dom: 17.0.2
react-player: 2.10.0
typescript: 4.6.3
typescript: 4.6.4
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -10168,23 +10168,23 @@ __metadata:
languageName: node
linkType: hard

"typescript@npm:4.6.3":
version: 4.6.3
resolution: "typescript@npm:4.6.3"
"typescript@npm:4.6.4":
version: 4.6.4
resolution: "typescript@npm:4.6.4"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 53e8bcf00abde8ecb2002d1f1e15160b21cb62b2dd0ff71bad2ef55fa96141f76316fce649a415758d3f17bd8e0c5676d8f017c34ec3e38b585812d4717a712c
checksum: 92e2c0328485a4f7bd7435f5b105f03addff32f867e241dc3be8c372ed801a138c732d9a55697696d2f82a80dd6ad4bddff1ad6b0d1884bf4a24b92e71094c44
languageName: node
linkType: hard

"typescript@patch:typescript@4.6.3#~builtin<compat/typescript>":
version: 4.6.3
resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=bda367"
"typescript@patch:typescript@4.6.4#~builtin<compat/typescript>":
version: 4.6.4
resolution: "typescript@patch:typescript@npm%3A4.6.4#~builtin<compat/typescript>::version=4.6.4&hash=bda367"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 8d62a37d9f238d83b6cdc738be90bb476a61c7e05d5924ecfb894eb63f39406b0660bd931876546a2be6895cd2678ddcb7f6793ceaab1454bc4e39f3cd9eb889
checksum: 0e3fa814d454942a689daf4c00f82328d323e7ecd4077e3265d45375e64642611631f4c882a71be87774468ba03793e9b8ff4bccfac3018194a9e36d8f72c251
languageName: node
linkType: hard

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"prop-types": "15.8.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"typescript": "4.6.3",
"typescript": "4.6.4",
"vscode-languageserver": "6.1.1",
"vscode-languageserver-protocol": "3.15.3",
"vscode-languageserver-textdocument": "1.0.4",
Expand Down Expand Up @@ -68,7 +68,7 @@
"babel-plugin-auto-import": "1.1.0",
"babel-plugin-remove-code": "0.0.6",
"boxen": "5.1.2",
"core-js": "3.22.2",
"core-js": "3.22.3",
"cypress": "9.6.0",
"cypress-wait-until": "1.7.2",
"eslint": "8.14.0",
Expand All @@ -83,14 +83,14 @@
"msw": "0.39.2",
"ncp": "2.0.0",
"node-notifier": "10.0.1",
"nodemon": "2.0.15",
"nodemon": "2.0.16",
"npm-packlist": "4.0.0",
"octokit": "1.7.1",
"ora": "5.4.1",
"prompts": "2.4.2",
"rimraf": "3.0.2",
"terminal-link": "2.1.1",
"typescript": "4.6.3",
"typescript": "4.6.4",
"typescript-transform-paths": "3.3.1",
"zx": "6.1.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"chalk": "4.1.2",
"chokidar": "3.5.3",
"fast-json-parse": "1.0.3",
"fastify": "3.28.0",
"fastify": "3.29.0",
"fastify-http-proxy": "6.2.2",
"fastify-raw-body": "3.2.0",
"fastify-static": "4.6.1",
Expand All @@ -54,7 +54,7 @@
"@types/yargs": "16.0.4",
"aws-lambda": "1.0.7",
"jest": "27.5.1",
"typescript": "4.6.3"
"typescript": "4.6.4"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
}
8 changes: 4 additions & 4 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
},
"dependencies": {
"@babel/runtime-corejs3": "7.16.7",
"@prisma/client": "3.12.0",
"cross-undici-fetch": "0.3.0",
"@prisma/client": "3.13.0",
"cross-undici-fetch": "0.3.6",
"crypto-js": "4.1.1",
"humanize-string": "2.1.0",
"jsonwebtoken": "8.5.1",
"jwks-rsa": "2.0.5",
"md5": "2.3.0",
"pascalcase": "1.0.0",
"pino": "7.10.0",
"pino": "7.11.0",
"title-case": "3.0.3",
"uuid": "8.3.2"
},
Expand All @@ -54,7 +54,7 @@
"aws-lambda": "1.0.7",
"jest": "27.5.1",
"split2": "4.1.0",
"typescript": "4.6.3"
"typescript": "4.6.4"
},
"peerDependencies": {
"@clerk/clerk-sdk-node": "3.3.10",
Expand Down
8 changes: 4 additions & 4 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@
"@azure/msal-browser": "2.23.0",
"@babel/cli": "7.16.7",
"@babel/core": "7.16.7",
"@clerk/clerk-js": "3.8.0",
"@clerk/clerk-js": "3.9.0",
"@clerk/clerk-sdk-node": "3.3.10",
"@clerk/types": "2.7.1",
"@clerk/types": "2.8.0",
"@nhost/nhost-js": "1.1.6",
"@supabase/supabase-js": "1.35.2",
"@types/netlify-identity-widget": "1.9.3",
"@types/react": "17.0.44",
"firebase": "9.6.11",
"firebase": "9.7.0",
"firebase-admin": "10.1.0",
"gotrue-js": "0.9.29",
"jest": "27.5.1",
"magic-sdk": "8.1.1",
"netlify-identity-widget": "1.9.2",
"react": "17.0.2",
"supertokens-auth-react": "0.20.4",
"typescript": "4.6.3"
"typescript": "4.6.4"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
}
8 changes: 4 additions & 4 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.12.0",
"@prisma/sdk": "3.13.0",
"@redwoodjs/api-server": "1.2.0",
"@redwoodjs/internal": "1.2.0",
"@redwoodjs/prerender": "1.2.0",
Expand All @@ -39,7 +39,7 @@
"chalk": "4.1.2",
"concurrently": "7.1.0",
"configstore": "3.1.5",
"core-js": "3.22.2",
"core-js": "3.22.3",
"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.6.2",
"prisma": "3.12.0",
"prisma": "3.13.0",
"prompts": "2.4.2",
"rimraf": "3.0.2",
"secure-random-password": "0.2.3",
Expand All @@ -68,7 +68,7 @@
"@babel/core": "7.16.7",
"@types/listr": "0.14.4",
"jest": "27.5.1",
"typescript": "4.6.3"
"typescript": "4.6.4"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,16 @@ export const hasRole = (roles: AllowedRoles): boolean => {
* whether or not they are assigned a role, and optionally raise an
* error if they're not.
*
* @param roles: AllowedRoles - When checking role membership, these roles grant access.
* @param roles?: AllowedRoles - When checking role membership, these roles grant access.
*
* @returns - If the currentUser is authenticated (and assigned one of the given roles)
*
* @throws {AuthenticationError} - If the currentUser is not authenticated
* @throws {ForbiddenError} If the currentUser is not allowed due to role permissions
* @throws {ForbiddenError} - If the currentUser is not allowed due to role permissions
*
* @see https://github.com/redwoodjs/redwood/tree/main/packages/auth for examples
*/
export const requireAuth = ({ roles }: { roles: AllowedRoles }) => {
export const requireAuth = ({ roles }: { roles?: AllowedRoles } = {}) => {
if (!isAuthenticated()) {
throw new AuthenticationError("You don't have permission to do that.")
}
Expand Down
4 changes: 2 additions & 2 deletions packages/codemods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"@babel/plugin-transform-typescript": "7.16.7",
"@babel/runtime-corejs3": "7.16.7",
"@vscode/ripgrep": "1.14.2",
"core-js": "3.22.2",
"cross-undici-fetch": "0.3.0",
"core-js": "3.22.3",
"cross-undici-fetch": "0.3.6",
"deepmerge": "4.2.2",
"fast-glob": "3.2.11",
"findup-sync": "5.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"babel-plugin-module-resolver": "4.1.0",
"babel-timing": "0.9.1",
"copy-webpack-plugin": "10.2.4",
"core-js": "3.22.2",
"core-js": "3.22.3",
"css-loader": "6.7.1",
"css-minimizer-webpack-plugin": "3.4.1",
"dotenv-webpack": "7.1.0",
Expand All @@ -70,13 +70,13 @@
"html-webpack-plugin": "5.5.0",
"lodash.escaperegexp": "4.1.2",
"mini-css-extract-plugin": "2.6.0",
"nodemon": "2.0.15",
"nodemon": "2.0.16",
"null-loader": "4.0.1",
"react-refresh": "0.11.0",
"rimraf": "3.0.2",
"style-loader": "3.3.1",
"svg-react-loader": "0.4.6",
"typescript": "4.6.3",
"typescript": "4.6.4",
"url-loader": "4.1.1",
"webpack": "5.72.0",
"webpack-bundle-analyzer": "4.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-redwood-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"devDependencies": {
"@babel/cli": "7.16.7",
"jest": "27.5.1",
"typescript": "4.6.3"
"typescript": "4.6.4"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
}
6 changes: 3 additions & 3 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"@babel/eslint-parser": "7.16.5",
"@babel/eslint-plugin": "7.16.5",
"@redwoodjs/internal": "1.2.0",
"@typescript-eslint/eslint-plugin": "5.20.0",
"@typescript-eslint/parser": "5.20.0",
"@typescript-eslint/eslint-plugin": "5.21.0",
"@typescript-eslint/parser": "5.21.0",
"eslint": "8.14.0",
"eslint-config-prettier": "8.5.0",
"eslint-import-resolver-babel-module": "5.3.1",
Expand All @@ -33,7 +33,7 @@
"devDependencies": {
"@babel/cli": "7.16.7",
"jest": "27.5.1",
"typescript": "4.6.3"
"typescript": "4.6.4"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
}
4 changes: 2 additions & 2 deletions packages/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"@types/react-dom": "17.0.16",
"@types/testing-library__jest-dom": "5.14.3",
"jest": "27.5.1",
"nodemon": "2.0.15",
"nodemon": "2.0.16",
"react": "17.0.2",
"react-dom": "17.0.2",
"typescript": "4.6.3"
"typescript": "4.6.4"
},
"peerDependencies": {
"graphql": "16.4.0",
Expand Down
Loading

0 comments on commit 523af56

Please sign in to comment.