Skip to content

Commit

Permalink
Merge branch 'main' into jgmw/og-image-setup-command
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Walker-GM committed Apr 23, 2024
2 parents 6138213 + 1dc7179 commit 183f1b9
Show file tree
Hide file tree
Showing 48 changed files with 288 additions and 222 deletions.
3 changes: 3 additions & 0 deletions .changesets/10479.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- fix(cli): avoid `npx` during upgrade command (#10479) by @Josh-Walker-GM

This change fixes a problem with the `yarn rw upgrade` command when you don't have `npx` installed. If you don't have `npx` installed you will now have to manually run a command to dedupe dependencies rather than this being done for you automatically during the upgrade command. If this is the case, the `npx` command will be logged to the console when you run `yarn rw upgrade`.
19 changes: 19 additions & 0 deletions .changesets/10493.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- feat(cookieJar): Change cookie.get to directly return value (#10493) by @dac09

**Motivation**
My original design of the `CookeiJar.get` would return the full cookie object we store, including cookie options. This is not ideal because you need to access the cookie like this:

```js
const myCookie = mwRequest.cookies.get('myCookie')

// 👇
const actualValue = myCookie.value
```

This is unwieldy, and feels unergonomic for the 98% of cases where `get` will be used to just see the value.

**How do I still see the options of the cookie?**
You can still access all the details of the cookie by doing `cookie.entries`. I don't really have a case for this yet, so let's not optimise for this case, but we know it's possible!


This is me just stabilizing the API for Middleware stuff, before we ship it out of experimental
9 changes: 0 additions & 9 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,6 @@
"sort-package-json",
"zx"
]
},

{
"groupName": "experimental",
"enabled": false,

"matchPackageNames": [
"@apollo/experimental-nextjs-app-support"
]
}
]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"redwoodjs",
"rsdw",
"RWJS",
"superjson",
"tailwindcss",
"waku"
]
Expand Down
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": "18.3.0-canary-a870b2d54-20240314",
"react-dom": "18.3.0-canary-a870b2d54-20240314"
"react": "19.0.0-canary-36e62c603-20240418",
"react-dom": "19.0.0-canary-36e62c603-20240418"
},
"devDependencies": {
"@redwoodjs/vite": "7.0.0",
Expand Down

This file was deleted.

3 changes: 2 additions & 1 deletion __fixtures__/test-project-rsa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
},
"packageManager": "yarn@4.1.1",
"resolutions": {
"vite@4.4.9": "patch:vite@npm%3A4.4.9#./.yarn/patches/vite-npm-4.4.9-e845c1bbf8.patch"
"@apollo/client-react-streaming/superjson": "^1.12.2",
"@apollo/client/rehackt": "0.0.0-pr.10.0"
}
}
6 changes: 3 additions & 3 deletions __fixtures__/test-project-rsa/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
]
},
"dependencies": {
"@apollo/experimental-nextjs-app-support": "0.0.0-commit-b8a73fe",
"@apollo/client-react-streaming": "0.10.0",
"@redwoodjs/forms": "8.0.0-canary.144",
"@redwoodjs/router": "8.0.0-canary.144",
"@redwoodjs/web": "8.0.0-canary.144",
"react": "18.3.0-canary-a870b2d54-20240314",
"react-dom": "18.3.0-canary-a870b2d54-20240314"
"react": "19.0.0-canary-36e62c603-20240418",
"react-dom": "19.0.0-canary-36e62c603-20240418"
},
"devDependencies": {
"@redwoodjs/vite": "8.0.0-canary.144",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@
"prisma": {
"seed": "yarn rw exec seed"
},
"packageManager": "yarn@4.1.1"
"packageManager": "yarn@4.1.1",
"resolutions": {
"@apollo/client-react-streaming/superjson": "^1.12.2",
"@apollo/client/rehackt": "0.0.0-pr.10.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
]
},
"dependencies": {
"@apollo/experimental-nextjs-app-support": "0.0.0-commit-b8a73fe",
"@apollo/client-react-streaming": "0.10.0",
"@jtoar/throw-on-client": "0.0.1",
"@redwoodjs/forms": "7.0.0-canary.1011",
"@redwoodjs/router": "7.0.0-canary.1011",
"@redwoodjs/web": "7.0.0-canary.1011",
"@tobbe.dev/rsc-test": "0.0.5",
"client-only": "0.0.1",
"react": "18.3.0-canary-a870b2d54-20240314",
"react-dom": "18.3.0-canary-a870b2d54-20240314"
"react": "19.0.0-canary-36e62c603-20240418",
"react-dom": "19.0.0-canary-36e62c603-20240418"
},
"devDependencies": {
"@redwoodjs/vite": "7.0.0-canary.1011",
Expand Down
6 changes: 5 additions & 1 deletion __fixtures__/test-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@
"prisma": {
"seed": "yarn rw exec seed"
},
"packageManager": "yarn@4.1.1"
"packageManager": "yarn@4.1.1",
"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.0.0-pr.10.0"
}
}
4 changes: 2 additions & 2 deletions __fixtures__/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": "18.3.0-canary-a870b2d54-20240314",
"react-dom": "18.3.0-canary-a870b2d54-20240314"
"react": "19.0.0-canary-36e62c603-20240418",
"react-dom": "19.0.0-canary-36e62c603-20240418"
},
"devDependencies": {
"@redwoodjs/vite": "7.0.0",
Expand Down
5 changes: 5 additions & 0 deletions docs/docs/ReactPlayer.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use client'

import ReactPlayer from 'react-player'

export default ReactPlayer
23 changes: 0 additions & 23 deletions docs/docs/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -1193,9 +1193,6 @@ yarn redwood generate sdl <model>
The sdl will inspect your `schema.prisma` and will do its best with relations. Schema to generators isn't one-to-one yet (and might never be).
<!-- See limited generator support for relations
https://community.redwoodjs.com/t/prisma-beta-2-and-redwoodjs-limited-generator-support-for-relations-with-workarounds/361 -->
| Arguments & Options | Description |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `model` | Model to generate the sdl for |
Expand Down Expand Up @@ -1627,16 +1624,6 @@ If you wanted to seed your database using a different method (like `psql` and an
In addition, you can [code along with Ryan Chenkie](https://www.youtube.com/watch?v=2LwTUIqjbPo), and learn how libraries like [faker](https://www.npmjs.com/package/faker) can help you create a large, realistic database fast, especially in tandem with Prisma's [createMany](https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#createmany).
<!-- ### generate -->
<!-- Generate artifacts (e.g. Prisma Client). -->
<!-- > 👉 Quick link to the [Prisma CLI Reference](https://www.prisma.io/docs/reference/api-reference/command-reference#generate). -->
<!-- ``` -->
<!-- yarn redwood prisma generate -->
<!-- ``` -->
**Log Formatting**
If you use the Redwood Logger as part of your seed script, you can pipe the command to the LogFormatter to output prettified logs.
Expand Down Expand Up @@ -1714,16 +1701,6 @@ Create a migration from changes in Prisma schema, apply it to the database, trig
yarn redwood prisma migrate dev
```
<!-- #### reset -->
<!-- Reset your database and apply all migrations, all data will be lost. -->
<!-- > 👉 Quick link to the [Prisma CLI Reference](https://www.prisma.io/docs/reference/api-reference/command-reference#migrate-reset). -->
<!-- ``` -->
<!-- yarn redwood prisma migrate reset -->
<!-- ``` -->
#### prisma migrate deploy
Apply pending migrations to update the database schema in production/staging.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/project-configuration-dev-test-build.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Project Configuration
description: Advanced project configuration
---

import ReactPlayer from 'react-player'
import ReactPlayer from './ReactPlayer'

# Project Configuration: Dev, Test, Build

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"vscode-languageserver": "6.1.1",
"vscode-languageserver-protocol": "3.15.3",
"vscode-languageserver-textdocument": "1.0.11",
"vscode-languageserver-types": "3.17.5"
"vscode-languageserver-types": "3.17.5",
"@storybook/react-dom-shim@npm:7.6.17": "https://verdaccio.tobbe.dev/@storybook/react-dom-shim/-/react-dom-shim-8.0.8.tgz"
},
"devDependencies": {
"@actions/cache": "3.2.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/auth0/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@babel/cli": "7.24.1",
"@babel/core": "^7.22.20",
"@types/react": "^18.2.55",
"react": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-canary-36e62c603-20240418",
"typescript": "5.4.5",
"vitest": "1.4.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@babel/core": "^7.22.20",
"@types/netlify-identity-widget": "1.9.6",
"@types/react": "^18.2.55",
"react": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-canary-36e62c603-20240418",
"typescript": "5.4.5",
"vitest": "1.4.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/clerk/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@clerk/clerk-react": "4.30.7",
"@clerk/types": "3.62.1",
"@types/react": "^18.2.55",
"react": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-canary-36e62c603-20240418",
"typescript": "5.4.5",
"vitest": "1.4.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/dbAuth/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@types/react": "^18.2.55",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"react": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-canary-36e62c603-20240418",
"typescript": "5.4.5"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/firebase/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"firebase": "10.11.0",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"react": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-canary-36e62c603-20240418",
"typescript": "5.4.5"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/netlify/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@babel/core": "^7.22.20",
"@types/netlify-identity-widget": "1.9.6",
"@types/react": "^18.2.55",
"react": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-canary-36e62c603-20240418",
"typescript": "5.4.5",
"vitest": "1.4.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/supabase/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@babel/core": "^7.22.20",
"@supabase/supabase-js": "2.40.0",
"@types/react": "^18.2.55",
"react": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-canary-36e62c603-20240418",
"typescript": "5.4.5",
"vitest": "1.4.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/supertokens/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@babel/cli": "7.24.1",
"@babel/core": "^7.22.20",
"@types/react": "^18.2.55",
"react": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-canary-36e62c603-20240418",
"supertokens-auth-react": "0.39.1",
"typescript": "5.4.5",
"vitest": "1.4.0"
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 @@
},
"dependencies": {
"core-js": "3.36.1",
"react": "18.3.0-canary-a870b2d54-20240314"
"react": "19.0.0-canary-36e62c603-20240418"
},
"devDependencies": {
"@redwoodjs/framework-tools": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-packages/dataMigrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/redwoodjs/redwood.git",
"directory": "packages/cli-packages/storybook"
"directory": "packages/cli-packages/dataMigrate"
},
"license": "MIT",
"exports": "./dist/index.js",
Expand Down
19 changes: 16 additions & 3 deletions packages/cli/src/commands/experimental/setupStreamingSsrHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,22 @@ export const handler = async ({ force, verbose }) => {
})
},
},
addWebPackages([
'@apollo/experimental-nextjs-app-support@0.0.0-commit-b8a73fe',
]),
{
title:
'Adding resolution for "@apollo/client-react-streaming/superjson"',
task: () => {
// We need this to make sure we get a version of superjson that works
// with CommonJS.
// TODO: Remove this when Redwood switches to ESM
const pkgJsonPath = path.join(rwPaths.base, 'package.json')
const pkgJson = fs.readJsonSync(pkgJsonPath)
const resolutions = pkgJson.resolutions || {}
resolutions['@apollo/client-react-streaming/superjson'] = '^1.12.2'
pkgJson.resolutions = resolutions
fs.writeJsonSync(pkgJsonPath, pkgJson, { spaces: 2 })
},
},
addWebPackages(['@apollo/client-react-streaming@0.10.0']),
{
task: () => {
printTaskEpilogue(command, description, EXPERIMENTAL_TOPIC_ID)
Expand Down
Loading

0 comments on commit 183f1b9

Please sign in to comment.