Skip to content

Commit

Permalink
Merge branch 'main' into ds-fix-name-prisma-option
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe authored Apr 13, 2022
2 parents f3e9101 + cfdb9be commit f37a5c2
Show file tree
Hide file tree
Showing 25 changed files with 115 additions and 139 deletions.
20 changes: 0 additions & 20 deletions .github/issue_template.md

This file was deleted.

11 changes: 0 additions & 11 deletions .github/pull_request_template.md

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/publish-npm-canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches: [main]
tags-ignore:
- v** # We don't want this to run on release
paths-ignore:
- 'docs/**'

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ for my nascent web app framework. Namely:
And there you have it.

## Contributors
*A gigantic "Thank YOU!" to everyone below who has contributed to one or more Redwood projects: [Framework](https://github.com/redwoodjs/redwood), [Website](https://github.com/redwoodjs/redwoodjs.com) (docs!), and [Create-Redwood Template](https://github.com/redwoodjs/redwood/tree/main/packages/create-redwood-app/template). 🚀*
*A gigantic "Thank YOU!" to everyone below who has contributed to one or more Redwood projects: [Framework](https://github.com/redwoodjs/redwood), [Website](https://github.com/redwoodjs/sprout), [Docs](https://github.com/redwoodjs/redwood/tree/main/docs), and [Create-Redwood Template](https://github.com/redwoodjs/redwood/tree/main/packages/create-redwood-app/template). 🚀*

### Core Team
<!-- prettier-ignore-start -->
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/how-to/role-based-access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ import { Router, Route, Private } from '@redwoodjs/router'
const Routes = () => {
return (
<Router>
<Private unauthenticated="forbidden" role="admin">
<Private unauthenticated="forbidden" roles="admin">
<Route path="/settings" page={SettingsPage} name="settings" />
<Route path="/admin" page={AdminPage} name="sites" />
</Private>
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/serverless-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const handler = async (event: APIGatewayEvent) => {
message = `${dividend} / ${divisor} = ${quotient}`

// check if the numbers could be divided
if (quotient === Infinity || isNaN(quotient)) {
if (!isFinite(quotient)) {
statusCode = 500
message = `Sorry. Could not divide ${dividend} by ${divisor}`
throw Error(message)
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/tutorial/afterword.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ So until next time, a bit of wisdom to help combat that next bout of every devel
## What's Next

Want to add some more features to your app? Check out some of our how to's like [calling to a third party API](../how-to/using-a-third-party-api.md) and [deploying an app without an API at all](../how-to/disable-api-database.md). We've also got lots of [guides](https://redwoodjs.com/docs/introduction) for more info on Redwood's internals.
Want to add some more features to your app? Check out some of our how to's like [calling to a third party API](../how-to/using-a-third-party-api.md) and [deploying an app without an API at all](../how-to/disable-api-database.md). We've also got lots of [guides](https://redwoodjs.com/docs/index) for more info on Redwood's internals.

## Roadmap

Expand Down
4 changes: 1 addition & 3 deletions docs/docs/tutorial/chapter1/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@ Please do upgrade accordingly. Then proceed to the Redwood installation when you
> We recommend following the [instructions via Yarnpkg.com](https://classic.yarnpkg.com/en/docs/install/).
>
> **2. Node.js**
> Using the latest [installation from Nodejs.org](https://nodejs.org/en/) works just fine.
> Using the recommended [LTS version from Nodejs.org](https://nodejs.org/en/) is preferred, as the latest Current version isn't supported.
>
> - `nvm` is a great tool for managing multiple versions of Node on one system. It takes a bit more effort to set up and learn, however. Follow the [nvm installation instructions](https://github.com/nvm-sh/nvm#installing-and-updating). (Windows users should go to [nvm-windows](https://github.com/coreybutler/nvm-windows/releases)). For **Mac** users with Homebrew installed, you can alternatively use it to [install `nvm`](https://formulae.brew.sh/formula/nvm).
>
> If you're confused about which of the two current Node versions to use, we recommend using the most recent LTS, which is currently [v16.x](https://nodejs.org/download/release/latest-gallium/).
> **Windows:** Recommended Development Setup
>
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/tutorial/chapter2/routing-params.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ But what we really need is to specify _which_ post we want to view on this page.
<Route path="/article/{id}" page={ArticlePage} name="article" />
```

Notice the `{id}`. Redwood calls these _route parameters_. They say "whatever value is in this position in the path, let me reference it by the name inside the curly braces". And while we're in the routes file, lets move the route inside the `Set` with the `BlogLayout`.
Notice the `{id}`. Redwood calls these _route parameters_. They say "whatever value is in this position in the path, let me reference it by the name inside the curly braces". And while we're in the routes file, let's move the route inside the `Set` with the `BlogLayout`.

```jsx title="web/src/Routes.js"
import { Router, Route, Set } from '@redwoodjs/router'
Expand Down
7 changes: 3 additions & 4 deletions docs/docs/tutorial/chapter3/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<iframe src="https://www.youtube.com/embed/b0x8an_UZ98?rel=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture; modestbranding; showinfo=0" allowfullscreen></iframe>
</div>

Wait, don't close your browser! You had to know this was coming eventually, didn't you? And you've probably realized by now we wouldn't even have this section in the tutorial unless Redwood had figured out a way to make forms less soul-sucking than usual. In fact Redwood might even make you _love_ building forms.
Wait, don't close your browser! You had to know this was coming eventually, didn't you? And you've probably realized by now we wouldn't even have this section in the tutorial unless Redwood had figured out a way to make forms less soul-sucking than usual. In fact, Redwood might even make you _love_ building forms.

Well, love is a strong word. _Like_ building forms?

Expand Down Expand Up @@ -56,7 +56,7 @@ const BlogLayout = ({ children }) => {
export default BlogLayout
```

And then use the `BlogLayout` for the `ContactPage` by making sure its wrapped by the same `<Set>` as the other pages in the routes file:
And then use the `BlogLayout` for the `ContactPage` by making sure it's wrapped by the same `<Set>` as the other pages in the routes file:

```jsx title="web/src/Routes.js"
import { Router, Route, Set } from '@redwoodjs/router'
Expand Down Expand Up @@ -175,7 +175,6 @@ Similar to a plain HTML form we'll give `<Form>` an `onSubmit` handler. That han

```jsx title="web/src/pages/ContactPage/ContactPage.js"
import { MetaTags } from '@redwoodjs/web'
// highlight-next-line
import { Form, TextField, Submit } from '@redwoodjs/forms'

const ContactPage = () => {
Expand Down Expand Up @@ -236,7 +235,7 @@ const ContactPage = () => {
export default ContactPage
```

See the new `<TextAreaField>` component here which generates an HTML `<textarea>` but that contains Redwood's form goodness:
See the new `<TextAreaField>` component here which generates an HTML `<textarea>` but contains Redwood's form goodness:

<img src="https://user-images.githubusercontent.com/300/146103219-c8dc958d-ea2b-4bea-8cb8-62dcd0be6783.png" />

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/tutorial/chapter6/comments-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Next we'll create the SDL (that defines the GraphQL interface) and a service (to
yarn rw g sdl Comment --no-crud
```
Note the `--no-crud` flag here. This gives us bare-bones functionality to start with (read-only access to our model) that we can build on. We got all the CRUD endpoints for free when we created the Comment section of our site, so let's do the opposite here and see how to add functionality from scratch.
Note the `--no-crud` flag here. This gives us bare-bones functionality to start with (read-only access to our model) that we can build on. We got all the CRUD endpoints for free when we created the Post section of our site, so let's do the opposite here and see how to add functionality from scratch.
That command will create both the SDL and the service. One change we'll need to make to the generated code is to allow access to anonymous users to view all comments. Change the `@requireAuth` directive to `@skipAuth` instead:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@playwright/test": "1.21.0",
"@testing-library/jest-dom": "5.16.4",
"@testing-library/react": "12.1.5",
"@testing-library/user-event": "13.5.0",
"@testing-library/user-event": "14.1.0",
"@types/fs-extra": "9.0.13",
"@types/jest": "27.4.1",
"@types/jscodeshift": "0.11.4",
Expand All @@ -71,7 +71,7 @@
"core-js": "3.21.1",
"cypress": "9.5.4",
"cypress-wait-until": "1.7.2",
"eslint": "8.12.0",
"eslint": "8.13.0",
"fast-glob": "3.2.11",
"fs-extra": "10.0.1",
"is-port-reachable": "3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"@babel/runtime-corejs3": "7.16.7",
"@prisma/client": "3.11.1",
"cross-undici-fetch": "0.1.28",
"cross-undici-fetch": "0.2.5",
"crypto-js": "4.1.1",
"humanize-string": "2.1.0",
"jsonwebtoken": "8.5.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@babel/core": "7.16.7",
"@clerk/clerk-js": "2.17.7",
"@clerk/clerk-sdk-node": "2.10.0",
"@clerk/types": "2.4.0",
"@clerk/types": "2.5.0",
"@nhost/nhost-js": "0.3.13",
"@supabase/supabase-js": "1.33.3",
"@types/netlify-identity-widget": "1.9.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"boxen": "5.1.2",
"camelcase": "6.3.0",
"chalk": "4.1.2",
"concurrently": "7.0.0",
"concurrently": "7.1.0",
"configstore": "3.1.5",
"core-js": "3.21.1",
"cross-env": "7.0.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 @@ -28,7 +28,7 @@
"@babel/runtime-corejs3": "7.16.7",
"@vscode/ripgrep": "1.14.2",
"core-js": "3.21.1",
"cross-undici-fetch": "0.1.28",
"cross-undici-fetch": "0.2.5",
"deepmerge": "4.2.2",
"fast-glob": "3.2.11",
"findup-sync": "5.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"@redwoodjs/internal": "1.0.0",
"@typescript-eslint/eslint-plugin": "5.17.0",
"@typescript-eslint/parser": "5.17.0",
"eslint": "8.12.0",
"eslint": "8.13.0",
"eslint-config-prettier": "8.5.0",
"eslint-import-resolver-babel-module": "5.3.1",
"eslint-plugin-babel": "5.3.1",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jest-dom": "4.0.1",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-prettier": "4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@testing-library/dom": "8.13.0",
"@testing-library/jest-dom": "5.16.4",
"@testing-library/react": "12.1.5",
"@testing-library/user-event": "13.5.0",
"@testing-library/user-event": "14.1.0",
"@types/pascalcase": "1.0.1",
"@types/react": "17.0.40",
"@types/react-dom": "17.0.15",
Expand Down
6 changes: 3 additions & 3 deletions packages/forms/src/__tests__/form.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ describe('Form', () => {

render(<TestComponent onSubmit={mockFn} />)

userEvent.type(screen.getByDisplayValue('text'), 'text')
userEvent.type(screen.getByDisplayValue('42'), '24')
userEvent.type(screen.getByDisplayValue('3.14'), '1592')
await userEvent.type(screen.getByDisplayValue('text'), 'text')
await userEvent.type(screen.getByDisplayValue('42'), '24')
await userEvent.type(screen.getByDisplayValue('3.14'), '1592')
fireEvent.change(screen.getByTestId('select1'), {
target: { value: 'Option 2' },
})
Expand Down
8 changes: 4 additions & 4 deletions packages/graphql-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@envelop/depth-limit": "1.3.0",
"@envelop/depth-limit": "1.5.1",
"@envelop/disable-introspection": "3.3.1",
"@envelop/filter-operation-type": "3.3.1",
"@envelop/parser-cache": "4.3.1",
"@envelop/validation-cache": "4.1.0",
"@envelop/validation-cache": "4.3.1",
"@graphql-tools/merge": "8.2.8",
"@graphql-tools/schema": "8.3.8",
"@graphql-tools/utils": "8.6.7",
"@graphql-yoga/common": "2.0.0",
"@graphql-yoga/common": "2.2.1",
"@prisma/client": "3.11.1",
"@redwoodjs/api": "1.0.0",
"core-js": "3.21.1",
"cross-undici-fetch": "0.1.28",
"cross-undici-fetch": "0.2.5",
"graphql": "16.3.0",
"graphql-scalars": "1.16.0",
"graphql-tag": "2.12.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/prerender/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@redwoodjs/web": "1.0.0",
"babel-plugin-ignore-html-and-css-imports": "0.1.0",
"cheerio": "1.0.0-rc.10",
"cross-undici-fetch": "0.1.28",
"cross-undici-fetch": "0.2.5",
"mime-types": "2.1.35"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/telemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@redwoodjs/internal": "1.0.0",
"@redwoodjs/structure": "1.0.0",
"ci-info": "3.3.0",
"cross-undici-fetch": "0.1.28",
"cross-undici-fetch": "0.2.5",
"envinfo": "7.8.1",
"systeminformation": "5.11.9",
"uuid": "8.3.2",
Expand Down
4 changes: 4 additions & 0 deletions packages/testing/config/storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ const baseConfig = {
sbConfig.resolve.alias['~__REDWOOD__USER_WEB_SRC'] = rwjsPaths.web.src

// Determine the default storybook style file to use.
// If one isn't provided, set the alias to `false` to tell webpack to ignore it.
// See https://webpack.js.org/configuration/resolve/#resolvealias.
sbConfig.resolve.alias['~__REDWOOD__USER_WEB_DEFAULT_CSS'] = false

const supportedStyleIndexFiles = ['index.scss', 'index.sass', 'index.css']
for (let file of supportedStyleIndexFiles) {
const filePath = path.join(rwjsPaths.web.src, file)
Expand Down
2 changes: 1 addition & 1 deletion packages/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@storybook/react": "6.4.21",
"@testing-library/jest-dom": "5.16.4",
"@testing-library/react": "12.1.5",
"@testing-library/user-event": "13.5.0",
"@testing-library/user-event": "14.1.0",
"@types/aws-lambda": "8.10.93",
"@types/babel-core": "6.25.7",
"@types/jest": "27.4.1",
Expand Down
Loading

0 comments on commit f37a5c2

Please sign in to comment.