Skip to content

Commit b9dd681

Browse files
committed
Merge branch 'main' of github.com:redwoodjs/redwood into feat/dc-rc-og-gen-mw-p2
* 'main' of github.com:redwoodjs/redwood: RSC: Add RSC+SSR smoke test to CI (#10477) fix(dbauth-mw): Use response passed in to middleware (#10516) Add redwood.toml to `yarn rw info` (#10518) chore(tests): Fix packages/web tests (#10517) fix(dbauth-mw): Unset cookie instead of clearing (#10502) chore(deps): Upgrade to React canary 20240424 (#10513) chore(deps): Upgrade to React Testing Library 14.3.1 (#10514) feat(upgrade): Use GitHub token if available when downloading patches (#10515)
2 parents 8f2de47 + ebb3475 commit b9dd681

File tree

47 files changed

+601
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+601
-133
lines changed

.changesets/10502.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- fix(dbauth-mw): Unset cookie instead of clearing (#10502) by @dac09
2+
Updates dbAuth middleware implementation to _unset_ the cookies, instead of clearing them.

.changesets/10515.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
- feat(upgrade): Use GitHub token if available when downloading patches (#10515) by @Tobbe
2+
3+
If a GitHub token is available in the environment we use that when fetching the
4+
git tree from GitHub. That way we're less likely to be rate limited. For most
5+
users the token shouldn't be needed. The free allowance/usage of the GitHub API
6+
should be enough.
7+
8+
We support `GH_TOKEN`, `GITHUB_TOKEN` and `REDWOOD_GITHUB_TOKEN` as the env var names

.changesets/10516.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- fix(dbauth-mw): Use response passed in to middleware (#10516) by @dac09
2+
3+
Middleware can be chained - which means if auth middleware is not the first one on the list of middleware being registered, we need to use the `MiddlewareResponse` that gets passed to the middleware, instead of creating a new one.

.changesets/10518.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
- Add redwood.toml to `yarn rw info` (#10518) by @Tobbe
2+
3+
The project `redwood.toml` file is now included in the `yarn rw info` output to
4+
make it easier and faster to help with issue reports
5+
6+
7+
## Before
8+
```
9+
System:
10+
OS: macOS 14.1.1
11+
Shell: 5.9 - /bin/zsh
12+
Binaries:
13+
Node: 20.11.0 - /usr/local/bin/node
14+
Yarn: 4.1.1 - /usr/local/bin/yarn
15+
Databases:
16+
SQLite: 3.39.5 - /usr/bin/sqlite3
17+
Browsers:
18+
Safari: 17.1
19+
```
20+
21+
## After
22+
```
23+
System:
24+
OS: macOS 14.1.1
25+
Shell: 5.9 - /bin/zsh
26+
Binaries:
27+
Node: 20.11.0 - /usr/local/bin/node
28+
Yarn: 4.1.1 - /usr/local/bin/yarn
29+
Databases:
30+
SQLite: 3.39.5 - /usr/bin/sqlite3
31+
Browsers:
32+
Safari: 17.1
33+
redwood.toml:
34+
[web]
35+
title = "Redwood App"
36+
port = 8910
37+
apiUrl = "/.redwood/functions" # You can customize graphql and dbauth urls individually too: see https://redwoodjs.com/docs/app-configuration-redwood-toml#api-paths
38+
includeEnvironmentVariables = [
39+
# Add any ENV vars that should be available to the web side to this array
40+
# See https://redwoodjs.com/docs/environment-variables#web
41+
]
42+
[api]
43+
port = 8911
44+
[browser]
45+
open = true
46+
[notifications]
47+
versionUpdates = ["latest"]
48+
```

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"autoplay",
2626
"bazinga",
2727
"corepack",
28+
"envinfo",
2829
"execa",
2930
"Fastify",
3031
"Flightcontrol",

__fixtures__/fragment-test-project/web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"@redwoodjs/router": "7.0.0",
1717
"@redwoodjs/web": "7.0.0",
1818
"humanize-string": "2.1.0",
19-
"react": "19.0.0-canary-36e62c603-20240418",
20-
"react-dom": "19.0.0-canary-36e62c603-20240418"
19+
"react": "19.0.0-canary-cb151849e1-20240424",
20+
"react-dom": "19.0.0-canary-cb151849e1-20240424"
2121
},
2222
"devDependencies": {
2323
"@redwoodjs/vite": "7.0.0",

__fixtures__/test-project-rsa/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"packageManager": "[email protected]",
2323
"resolutions": {
2424
"@apollo/client-react-streaming/superjson": "^1.12.2",
25-
"@apollo/client/rehackt": "0.0.0-pr.10.0"
25+
"@apollo/client/rehackt": "0.0.0-pr.10.0",
26+
"react-is": "19.0.0-canary-cb151849e1-20240424"
2627
}
2728
}

__fixtures__/test-project-rsa/web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"@redwoodjs/forms": "8.0.0-canary.144",
1616
"@redwoodjs/router": "8.0.0-canary.144",
1717
"@redwoodjs/web": "8.0.0-canary.144",
18-
"react": "19.0.0-canary-36e62c603-20240418",
19-
"react-dom": "19.0.0-canary-36e62c603-20240418"
18+
"react": "19.0.0-canary-cb151849e1-20240424",
19+
"react-dom": "19.0.0-canary-cb151849e1-20240424"
2020
},
2121
"devDependencies": {
2222
"@redwoodjs/vite": "8.0.0-canary.144",

__fixtures__/test-project-rsc-external-packages-and-cells/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"packageManager": "[email protected]",
2424
"resolutions": {
2525
"@apollo/client-react-streaming/superjson": "^1.12.2",
26-
"@apollo/client/rehackt": "0.0.0-pr.10.0"
26+
"@apollo/client/rehackt": "0.0.0-pr.10.0",
27+
"react-is": "19.0.0-canary-cb151849e1-20240424"
2728
}
2829
}

__fixtures__/test-project-rsc-external-packages-and-cells/web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"@redwoodjs/web": "7.0.0-canary.1011",
1919
"@tobbe.dev/rsc-test": "0.0.5",
2020
"client-only": "0.0.1",
21-
"react": "19.0.0-canary-36e62c603-20240418",
22-
"react-dom": "19.0.0-canary-36e62c603-20240418"
21+
"react": "19.0.0-canary-cb151849e1-20240424",
22+
"react-dom": "19.0.0-canary-cb151849e1-20240424"
2323
},
2424
"devDependencies": {
2525
"@redwoodjs/vite": "7.0.0-canary.1011",
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
// In this file, all Page components from 'src/pages` are auto-imported. Nested
2+
// directories are supported, and should be uppercase. Each subdirectory will be
3+
// prepended onto the component name.
4+
//
5+
// Examples:
6+
//
7+
// 'src/pages/HomePage/HomePage.js' -> HomePage
8+
// 'src/pages/Admin/BooksPage/BooksPage.js' -> AdminBooksPage
9+
10+
import { Route } from '@redwoodjs/router/dist/Route'
11+
import { Router } from '@redwoodjs/router/dist/server-router'
12+
import { Set } from '@redwoodjs/router/dist/Set'
13+
14+
import NavigationLayout from './layouts/NavigationLayout/NavigationLayout'
15+
import ScaffoldLayout from './layouts/ScaffoldLayout/ScaffoldLayout'
16+
import AboutPage from './pages/AboutPage/AboutPage'
17+
import EmptyUserEmptyUsersPage from './pages/EmptyUser/EmptyUsersPage/EmptyUsersPage'
18+
import EmptyUserNewEmptyUserPage from './pages/EmptyUser/NewEmptyUserPage/NewEmptyUserPage'
19+
import HomePage from './pages/HomePage/HomePage'
20+
import MultiCellPage from './pages/MultiCellPage/MultiCellPage'
21+
import UserExampleNewUserExamplePage from './pages/UserExample/NewUserExamplePage/NewUserExamplePage'
22+
import UserExampleUserExamplePage from './pages/UserExample/UserExamplePage/UserExamplePage'
23+
import UserExampleUserExamplesPage from './pages/UserExample/UserExamplesPage/UserExamplesPage'
24+
25+
const NotFoundPage = () => {
26+
return <div>Not Found</div>
27+
}
28+
29+
const Routes = ({ location }) => {
30+
return (
31+
<Router location={location}>
32+
<Set wrap={NavigationLayout} rnd={Math.random()}>
33+
<Route path="/" page={HomePage} name="home" />
34+
<Route path="/about" page={AboutPage} name="about" />
35+
<Route path="/multi-cell" page={MultiCellPage} name="multiCell" />
36+
37+
<Set
38+
wrap={ScaffoldLayout}
39+
title="EmptyUsers"
40+
titleTo="emptyUsers"
41+
buttonLabel="New EmptyUser"
42+
buttonTo="newEmptyUser"
43+
>
44+
<Route
45+
path="/empty-users/new"
46+
page={EmptyUserNewEmptyUserPage}
47+
name="newEmptyUser"
48+
/>
49+
<Route
50+
path="/empty-users"
51+
page={EmptyUserEmptyUsersPage}
52+
name="emptyUsers"
53+
/>
54+
</Set>
55+
56+
<Set
57+
wrap={ScaffoldLayout}
58+
title="UserExamples"
59+
titleTo="userExamples"
60+
buttonLabel="New UserExample"
61+
buttonTo="newUserExample"
62+
>
63+
<Route
64+
path="/user-examples/new"
65+
page={UserExampleNewUserExamplePage}
66+
name="newUserExample"
67+
/>
68+
<Route
69+
path="/user-examples/{id:Int}"
70+
page={UserExampleUserExamplePage}
71+
name="userExample"
72+
/>
73+
<Route
74+
path="/user-examples"
75+
page={UserExampleUserExamplesPage}
76+
name="userExamples"
77+
/>
78+
</Set>
79+
</Set>
80+
<Route notfound page={NotFoundPage} />
81+
</Router>
82+
)
83+
}
84+
85+
export default Routes
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
import type { TagDescriptor } from '@redwoodjs/web/dist/components/htmlTags'
22

33
import { Document } from './Document'
4+
import ServerRoutes from './ServerRoutes'
45

56
interface Props {
67
css: string[]
78
meta?: TagDescriptor[]
9+
location: {
10+
pathname: string
11+
hash?: string
12+
search?: string
13+
}
814
}
915

10-
export const ServerEntry: React.FC<Props> = ({ css, meta }) => {
16+
export const ServerEntry: React.FC<Props> = ({ css, meta, location }) => {
1117
return (
1218
<Document css={css} meta={meta}>
13-
<div>App</div>
19+
<ServerRoutes location={location} />
1420
</Document>
1521
)
1622
}

__fixtures__/test-project-rsc-external-packages-and-cells/web/src/layouts/NavigationLayout/NavigationLayout.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
import { Link, routes } from '@redwoodjs/router'
1+
import { namedRoutes as routes } from '@redwoodjs/router/dist/namedRoutes'
22

33
import './NavigationLayout.css'
44

55
type NavigationLayoutProps = {
66
children?: React.ReactNode
7+
rnd?: number
78
}
89

9-
const NavigationLayout = ({ children }: NavigationLayoutProps) => {
10+
const Link = (props: any) => {
11+
return <a href={props.to}>{props.children}</a>
12+
}
13+
14+
const NavigationLayout = ({ children, rnd }: NavigationLayoutProps) => {
1015
return (
1116
<div className="navigation-layout">
1217
<nav>
@@ -28,6 +33,7 @@ const NavigationLayout = ({ children }: NavigationLayoutProps) => {
2833
</li>
2934
</ul>
3035
</nav>
36+
<div id="rnd">{Math.round(rnd * 100)}</div>
3137
<main>{children}</main>
3238
</div>
3339
)

__fixtures__/test-project/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"packageManager": "[email protected]",
2424
"resolutions": {
2525
"@storybook/react-dom-shim@npm:7.6.17": "https://verdaccio.tobbe.dev/@storybook/react-dom-shim/-/react-dom-shim-8.0.8.tgz",
26-
"@apollo/client/rehackt": "0.0.0-pr.10.0"
26+
"@apollo/client/rehackt": "0.0.0-pr.10.0",
27+
"react-is": "19.0.0-canary-cb151849e1-20240424"
2728
}
2829
}

__fixtures__/test-project/web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"@redwoodjs/router": "7.0.0",
1717
"@redwoodjs/web": "7.0.0",
1818
"humanize-string": "2.1.0",
19-
"react": "19.0.0-canary-36e62c603-20240418",
20-
"react-dom": "19.0.0-canary-36e62c603-20240418"
19+
"react": "19.0.0-canary-cb151849e1-20240424",
20+
"react-dom": "19.0.0-canary-cb151849e1-20240424"
2121
},
2222
"devDependencies": {
2323
"@redwoodjs/vite": "7.0.0",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"@npmcli/arborist": "7.4.0",
6969
"@playwright/test": "1.42.1",
7070
"@testing-library/jest-dom": "6.4.2",
71-
"@testing-library/react": "14.2.2",
71+
"@testing-library/react": "14.3.1",
7272
"@testing-library/user-event": "14.5.2",
7373
"@types/babel__generator": "7.6.8",
7474
"@types/fs-extra": "11.0.4",

packages/auth-providers/auth0/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@babel/cli": "7.24.1",
3333
"@babel/core": "^7.22.20",
3434
"@types/react": "^18.2.55",
35-
"react": "19.0.0-canary-36e62c603-20240418",
35+
"react": "19.0.0-canary-cb151849e1-20240424",
3636
"typescript": "5.4.5",
3737
"vitest": "1.4.0"
3838
},

packages/auth-providers/azureActiveDirectory/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@babel/core": "^7.22.20",
3434
"@types/netlify-identity-widget": "1.9.6",
3535
"@types/react": "^18.2.55",
36-
"react": "19.0.0-canary-36e62c603-20240418",
36+
"react": "19.0.0-canary-cb151849e1-20240424",
3737
"typescript": "5.4.5",
3838
"vitest": "1.4.0"
3939
},

packages/auth-providers/clerk/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@clerk/clerk-react": "4.30.7",
3434
"@clerk/types": "3.62.1",
3535
"@types/react": "^18.2.55",
36-
"react": "19.0.0-canary-36e62c603-20240418",
36+
"react": "19.0.0-canary-cb151849e1-20240424",
3737
"typescript": "5.4.5",
3838
"vitest": "1.4.0"
3939
},

0 commit comments

Comments
 (0)