Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/pantheredeye/redwood into b…
Browse files Browse the repository at this point in the history
…b-docs-azure
  • Loading branch information
pantheredeye committed Sep 22, 2024
2 parents c583ccc + d2fe56c commit bb1db16
Show file tree
Hide file tree
Showing 347 changed files with 54,061 additions and 3,148 deletions.
5 changes: 5 additions & 0 deletions .changesets/11447.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- fix(resolutions): Remove rehackt resolution (#11447) by @Tobbe

The rehackt resolution isn't needed anymore. Apollo Client has updated to rehackt 0.1.0. See https://github.com/apollographql/apollo-client/blob/HEAD/CHANGELOG.md#3101

Unfortunately this requires our users to manually go and update their resolutions
3 changes: 3 additions & 0 deletions .changesets/11458.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- fix(linting): Re-enable babel presets during linting of javascript projects (#11458) by @Josh-Walker-GM

The `yarn rw lint` command was failing for JavaScript projects. This change re-enables certain babel plugins to correct this issue and allow this command to succeed again.
3 changes: 3 additions & 0 deletions .changesets/11459.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- fix(jobs): Make deleteSuccessfulJobs configurable (#11459) by @Tobbe

Make the jobs Executor respect the `deleteSuccessfulJobs` config option
3 changes: 3 additions & 0 deletions .changesets/11531.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- fix(auth0): avoid use of undefined global in browser environment (#11531) by @Josh-Walker-GM

The Auth0 auth provider was failing in the browser due to trying to access `global`. This change corrects this and fixes Auth0 usage in the browser.
3 changes: 3 additions & 0 deletions .changesets/11533.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [gh11385] Updated the generated page template (#11533) by @ahaywood

This change alters the default content produced when you generate page with `yarn rw g page`. Previously our generated content contained code that would error out if you had a route parameter in your page - because the link we automatically generated would not contain a value for that parameter.
3 changes: 3 additions & 0 deletions .changesets/11534.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- fix(cli): handle both single and double quotes during dbAuth setup (#11534) by @Josh-Walker-GM

If you had changed your prettier config to use double quotes instead of the default single quotes then the `yarn rw setup auth dbAuth` would fail. This change fixes that command to work regardless of quote flavour.
5 changes: 5 additions & 0 deletions .changesets/11540.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- fix(graphql): Allow including 'File' scalar by default to be disabled (#11540) by @Josh-Walker-GM

As of v8.0.0 a `File` scalar was added to your graphql schema by default. This could be problematic if you wanted to define your own `File` scalar.

With this change it is now possible to disable including this scalar by default. To see how to do so look at the `Default Scalar` section of the `Graphql` docs [here](https://docs.redwoodjs.com/docs/graphql#default-scalars)
5 changes: 5 additions & 0 deletions .changesets/11542.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- feat(cli): Make scaffolded layout routing type-safe (#11542) by @Tobbe

With this feature we now make sure only valid route names are passed as `titleTo` and `buttonTo` props to the scaffolded layout.

This also means you get helpful code completion when typing out the prop values
3 changes: 3 additions & 0 deletions .changesets/11572.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Default NODE_ENV to "development" if it's `undefined` when starting jobs worker (#11572) by @cannikin

This mimics the behavior of `yarn rw dev` where `NODE_ENV` will equal `development` if you don't set it explicitly.
1 change: 1 addition & 0 deletions .changesets/11578.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixes `yarn rw jobs clear` command (#11578) by @cannikin
3 changes: 3 additions & 0 deletions .changesets/11591.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- fix(router): Add missing dependency for RSC (#11591) by @Tobbe

Adding missing dependency `react-server-dom-webpack` to the `@redwoodjs/router` package. This should fix an error some people were seeing when trying to use RSC.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ jobs:
- name: 🔎 Lint
run: yarn lint

- name: 🥡 Check packaging and attw
run: yarn check:package
# TODO(jgmw): Re-enable when it doesn't hang
# - name: 🥡 Check packaging and attw
# run: yarn check:package

- name: 🌡 Test Types
run: yarn test:types
Expand Down Expand Up @@ -183,7 +184,7 @@ jobs:
spec: |
cypress/e2e/01-tutorial/*.cy.js
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
if: always()
with:
name: logs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/require-release-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
issues: read
pull-requests: read
steps:
- uses: mheap/github-action-required-labels@5847eef68201219cf0a4643ea7be61e77837bbce # v5
- uses: mheap/github-action-required-labels@d25134c992b943fb6ad00c25ea00eb5988c0a9dd # v5
with:
mode: exactly
count: 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:

steps:
- name: 'Checkout code'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false

- name: 'Run analysis'
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
Expand Down
5 changes: 4 additions & 1 deletion __fixtures__/fragment-test-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@
"prisma": {
"seed": "yarn rw exec seed"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"resolutions": {
"rollup": "4.21.3"
}
}
4 changes: 2 additions & 2 deletions __fixtures__/fragment-test-project/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"@redwoodjs/router": "7.0.0",
"@redwoodjs/web": "7.0.0",
"humanize-string": "2.1.0",
"react": "19.0.0-rc-8269d55d-20240802",
"react-dom": "19.0.0-rc-8269d55d-20240802"
"react": "19.0.0-rc-f2df5694-20240916",
"react-dom": "19.0.0-rc-f2df5694-20240916"
},
"devDependencies": {
"@redwoodjs/vite": "7.0.0",
Expand Down
3 changes: 1 addition & 2 deletions __fixtures__/rsc-caching/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"packageManager": "[email protected]",
"resolutions": {
"@apollo/client-react-streaming/superjson": "^1.12.2",
"@apollo/client/rehackt": "0.1.0",
"react-is": "19.0.0-rc-8269d55d-20240802"
"react-is": "19.0.0-rc-f2df5694-20240916"
}
}
4 changes: 2 additions & 2 deletions __fixtures__/rsc-caching/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@redwoodjs/web": "8.0.0-canary.1102",
"@tobbe.dev/rsc-test": "0.0.5",
"client-only": "0.0.1",
"react": "19.0.0-rc-8269d55d-20240802",
"react-dom": "19.0.0-rc-8269d55d-20240802"
"react": "19.0.0-rc-f2df5694-20240916",
"react-dom": "19.0.0-rc-f2df5694-20240916"
},
"devDependencies": {
"@redwoodjs/vite": "8.0.0-canary.1102",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ const CachingOnePage = () => {
Find me in{' '}
<code>./web/src/pages/CachingOnePage/CachingOnePage.tsx</code>
</p>
<p>
{/*
My default route is named <code>cachingOne</code>, link to me with `
<Link to={routes.cachingOne()}>CachingOne</Link>`
</p>
*/}
</>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ const CachingTwoPage = () => {
Find me in{' '}
<code>./web/src/pages/CachingTwoPage/CachingTwoPage.tsx</code>
</p>
<p>
{/*
My default route is named <code>cachingTwo</code>, link to me with `
<Link to={routes.cachingTwo()}>CachingTwo</Link>`
</p>
*/}
</>
)
}
Expand Down
3 changes: 1 addition & 2 deletions __fixtures__/test-project-rsa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"packageManager": "[email protected]",
"resolutions": {
"@apollo/client-react-streaming/superjson": "^1.12.2",
"@apollo/client/rehackt": "0.1.0",
"react-is": "19.0.0-rc-8269d55d-20240802"
"react-is": "19.0.0-rc-f2df5694-20240916"
}
}
4 changes: 2 additions & 2 deletions __fixtures__/test-project-rsa/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"@redwoodjs/forms": "8.0.0-canary.144",
"@redwoodjs/router": "8.0.0-canary.144",
"@redwoodjs/web": "8.0.0-canary.144",
"react": "19.0.0-rc-8269d55d-20240802",
"react-dom": "19.0.0-rc-8269d55d-20240802"
"react": "19.0.0-rc-f2df5694-20240916",
"react-dom": "19.0.0-rc-f2df5694-20240916"
},
"devDependencies": {
"@redwoodjs/vite": "8.0.0-canary.144",
Expand Down
4 changes: 2 additions & 2 deletions __fixtures__/test-project-rsc-kitchen-sink/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"packageManager": "[email protected]",
"resolutions": {
"@apollo/client-react-streaming/superjson": "^1.12.2",
"@apollo/client/rehackt": "0.1.0",
"react-is": "19.0.0-rc-8269d55d-20240802"
"react-is": "19.0.0-rc-f2df5694-20240916",
"rollup": "4.21.3"
}
}
4 changes: 2 additions & 2 deletions __fixtures__/test-project-rsc-kitchen-sink/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@redwoodjs/web": "8.0.0-canary.861",
"@tobbe.dev/rsc-test": "0.0.5",
"client-only": "0.0.1",
"react": "19.0.0-rc-8269d55d-20240802",
"react-dom": "19.0.0-rc-8269d55d-20240802"
"react": "19.0.0-rc-f2df5694-20240916",
"react-dom": "19.0.0-rc-f2df5694-20240916"
},
"devDependencies": {
"@redwoodjs/vite": "8.0.0-canary.861",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,9 @@
& > main {
display: flex;
flex-grow: 1;

& > div {
width: 100%;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const BlogPage = () => {
<p>
Find me in <code>./web/src/pages/BlogPage/BlogPage.tsx</code>
</p>
<p>
{/*}
My default route is named <code>blog</code>, link to me with `
<Link to={routes.blog()}>Blog</Link>`
</p>
*/}
</>
)
}
Expand Down
4 changes: 2 additions & 2 deletions __fixtures__/test-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"packageManager": "[email protected]",
"resolutions": {
"@storybook/react-dom-shim@npm:7.6.17": "https://verdaccio.tobbe.dev/@storybook/react-dom-shim/-/react-dom-shim-8.0.8.tgz",
"@apollo/client/rehackt": "0.1.0",
"react-is": "19.0.0-rc-8269d55d-20240802"
"react-is": "19.0.0-rc-f2df5694-20240916",
"rollup": "4.21.3"
}
}
8 changes: 4 additions & 4 deletions __fixtures__/test-project/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
"@redwoodjs/router": "8.0.0",
"@redwoodjs/web": "8.0.0",
"humanize-string": "2.1.0",
"react": "19.0.0-rc-8269d55d-20240802",
"react-dom": "19.0.0-rc-8269d55d-20240802"
"react": "19.0.0-rc-f2df5694-20240916",
"react-dom": "19.0.0-rc-f2df5694-20240916"
},
"devDependencies": {
"@redwoodjs/vite": "8.0.0",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.45",
"postcss": "^8.4.47",
"postcss-loader": "^8.1.1",
"prettier-plugin-tailwindcss": "^0.5.12",
"tailwindcss": "^3.4.10"
"tailwindcss": "^3.4.12"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export const Loading = () => <div>Loading...</div>
export const Empty = () => {
return (
<div className="rw-text-center">
{'No contacts yet. '}
No contacts yet.{' '}
<Link to={routes.newContact()} className="rw-link">
{'Create one?'}
Create one?
</Link>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export const Loading = () => <div>Loading...</div>
export const Empty = () => {
return (
<div className="rw-text-center">
{'No posts yet. '}
No posts yet.{' '}
<Link to={routes.newPost()} className="rw-link">
{'Create one?'}
Create one?
</Link>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Toaster } from '@redwoodjs/web/toast'

type LayoutProps = {
title: string
titleTo: string
titleTo: keyof typeof routes
buttonLabel: string
buttonTo: string
buttonTo: keyof typeof routes
children: React.ReactNode
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// import { Link, routes } from '@redwoodjs/router'
import { Metadata } from '@redwoodjs/web'

type BlogPostPageProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Metadata } from '@redwoodjs/web'

import { useAuth } from 'src/auth'
// import { Link, routes } from '@redwoodjs/router'

const ProfilePage = () => {
const { currentUser, isAuthenticated, hasRole, loading } = useAuth()
Expand Down
2 changes: 1 addition & 1 deletion docs/.node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.16.0
20.17.0
16 changes: 15 additions & 1 deletion docs/docs/background-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ By checking the `lastError` field in the database you can see what the last erro
## Deployment
For many use cases you may simply be able to rely on the job runner to start your job workers, which will run forever:
For many use cases you may be able to rely on the job runner to start and detach your job workers, which will then run forever:
```bash
yarn rw jobs start
Expand All @@ -723,6 +723,20 @@ Of course if you have a process monitor system watching your workers you'll want
:::
### NODE_ENV
You'll need to explicitly set your `NODE_ENV` when in environments other than development or test. We like having a `.env` file in a serverfull production environment, and you just include:
```bash
NODE_ENV=production
```
If you're using Docker, make sure you have an `ENV` declaration for it:
```docker
ENV NODE_ENV="production"
```
## Advanced Job Workers
As noted above, although the workers are started and detached using the `yarn rw jobs start` command, there is nothing to monitor those workers to make sure they keep running. To do that, you'll want to start the workers yourself (or have your process monitor start them) using command line flags.
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -954,11 +954,11 @@ const QuotePage = ({ id }) => {
<>
<h1>QuotePage</h1>
<p>Find me in "./web/src/pages/QuotePage/QuotePage.js"</p>
<p>
{/*
My default route is named "quote", link to me with `
<Link to={routes.quote({ id: 42 })}>Quote 42</Link>`
</p>
<p>The parameter passed to me is {id}</p>
The parameter passed to me is {id}
*/}
</>
)
}
Expand Down
Loading

0 comments on commit bb1db16

Please sign in to comment.