diff --git a/__fixtures__/test-project-rsc-external-packages-and-cells/.vscode/settings.json b/__fixtures__/test-project-rsc-external-packages-and-cells/.vscode/settings.json index bb0578ddbbf8..6887d360eb96 100644 --- a/__fixtures__/test-project-rsc-external-packages-and-cells/.vscode/settings.json +++ b/__fixtures__/test-project-rsc-external-packages-and-cells/.vscode/settings.json @@ -3,7 +3,7 @@ "files.trimTrailingWhitespace": true, "editor.formatOnSave": false, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" }, "[prisma]": { "editor.formatOnSave": true diff --git a/__fixtures__/test-project-rsc-external-packages-and-cells/README.md b/__fixtures__/test-project-rsc-external-packages-and-cells/README.md index 812b1741778a..5a9a838d17c8 100644 --- a/__fixtures__/test-project-rsc-external-packages-and-cells/README.md +++ b/__fixtures__/test-project-rsc-external-packages-and-cells/README.md @@ -1,10 +1,14 @@ -RW smoke-test fixture project for an app that uses RSC and imports external npm -packages +RW smoke-test fixture project for an app that tests two RSC related features + 1. imports external npm packages + 2. Uses client cells to do client-side gql data fetching Mainly these things are tested: * Importing a package with company scope (@ and / in its name) * Importing a package that uses the 'use client' directive * Using the 'client-only' package * Using the 'server-only' package + * Imports a traditional RW Cell into a page (that's, like all pages, a server + component) to verify that we can still do client side GQL data fetching + like we've always been able to do Used by `.github/actions/set-up-rsc-from-fixture` diff --git a/__fixtures__/test-project-rsc-external-packages-and-cells/api/package.json b/__fixtures__/test-project-rsc-external-packages-and-cells/api/package.json index 2521f9ad7839..643edd217b4b 100644 --- a/__fixtures__/test-project-rsc-external-packages-and-cells/api/package.json +++ b/__fixtures__/test-project-rsc-external-packages-and-cells/api/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "private": true, "dependencies": { - "@redwoodjs/api": "7.0.0-canary.966", - "@redwoodjs/graphql-server": "7.0.0-canary.966" + "@redwoodjs/api": "7.0.0-canary.981", + "@redwoodjs/graphql-server": "7.0.0-canary.981" } } diff --git a/__fixtures__/test-project-rsc-external-packages-and-cells/package.json b/__fixtures__/test-project-rsc-external-packages-and-cells/package.json index 5ea538232fe3..a907102034dd 100644 --- a/__fixtures__/test-project-rsc-external-packages-and-cells/package.json +++ b/__fixtures__/test-project-rsc-external-packages-and-cells/package.json @@ -7,7 +7,7 @@ ] }, "devDependencies": { - "@redwoodjs/core": "7.0.0-canary.966" + "@redwoodjs/core": "7.0.0-canary.981" }, "eslintConfig": { "extends": "@redwoodjs/eslint-config", diff --git a/__fixtures__/test-project-rsc-external-packages-and-cells/web/package.json b/__fixtures__/test-project-rsc-external-packages-and-cells/web/package.json index f4bf29104a45..252d7d499d33 100644 --- a/__fixtures__/test-project-rsc-external-packages-and-cells/web/package.json +++ b/__fixtures__/test-project-rsc-external-packages-and-cells/web/package.json @@ -11,9 +11,9 @@ ] }, "dependencies": { - "@redwoodjs/forms": "7.0.0-canary.966", - "@redwoodjs/router": "7.0.0-canary.966", - "@redwoodjs/web": "7.0.0-canary.966", + "@redwoodjs/forms": "7.0.0-canary.981", + "@redwoodjs/router": "7.0.0-canary.981", + "@redwoodjs/web": "7.0.0-canary.981", "@tobbe.dev/rsc-test": "0.0.3", "client-only": "0.0.1", "react": "0.0.0-experimental-e5205658f-20230913", @@ -21,7 +21,7 @@ "server-only": "0.0.1" }, "devDependencies": { - "@redwoodjs/vite": "7.0.0-canary.966", + "@redwoodjs/vite": "7.0.0-canary.981", "@types/react": "^18.2.55", "@types/react-dom": "^18.2.19" } diff --git a/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/Routes.tsx b/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/Routes.tsx index 7d9f5419ed8c..19e058bd2eec 100644 --- a/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/Routes.tsx +++ b/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/Routes.tsx @@ -17,13 +17,14 @@ import NotFoundPage from './pages/NotFoundPage/NotFoundPage' const AboutPage = serve('AboutPage') const HomePage = serve('HomePage') const UserExampleUserExamplesPage = serve('UserExampleUserExamplesPage') +const UserExampleNewUserExamplePage = serve('UserExampleNewUserExamplePage') const Routes = () => { return ( - {/* - + + {/* */} diff --git a/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/components/UserExample/NewUserExample/NewUserExample.tsx b/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/components/UserExample/NewUserExample/NewUserExample.tsx index 1877a5013a23..7177e7f7164e 100644 --- a/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/components/UserExample/NewUserExample/NewUserExample.tsx +++ b/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/components/UserExample/NewUserExample/NewUserExample.tsx @@ -1,3 +1,5 @@ +'use client' + import { navigate, routes } from '@redwoodjs/router' import { useMutation } from '@redwoodjs/web' import { toast } from '@redwoodjs/web/toast' diff --git a/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/components/UserExample/UserExamplesCell/UserExamplesCell.tsx b/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/components/UserExample/UserExamplesCell/UserExamplesCell.tsx index 7fd1501f148e..a64397621de6 100644 --- a/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/components/UserExample/UserExamplesCell/UserExamplesCell.tsx +++ b/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/components/UserExample/UserExamplesCell/UserExamplesCell.tsx @@ -1,8 +1,8 @@ -"use client" +'use client' import type { FindUserExamples } from 'types/graphql' -// import { Link, routes } from '@redwoodjs/router' +import { Link, routes } from '@redwoodjs/router' import type { CellSuccessProps, CellFailureProps } from '@redwoodjs/web' import UserExamples from '../UserExamples/UserExamples' @@ -22,10 +22,10 @@ export const Loading = () =>
Loading...
export const Empty = () => { return (
- {'No userExamples yet. '} - {/* */} - {'Create one?'} - {/* */} + No userExamples yet.{' '} + + Create one? +
) } diff --git a/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/entries.ts b/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/entries.ts index dacbb5d33544..7f2e1aaa6923 100644 --- a/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/entries.ts +++ b/__fixtures__/test-project-rsc-external-packages-and-cells/web/src/entries.ts @@ -2,7 +2,7 @@ import { defineEntries } from '@redwoodjs/vite/entries' export default defineEntries( // getEntry - async (id) => { + async (id: string) => { switch (id) { case 'AboutPage': return import('./pages/AboutPage/AboutPage') @@ -10,6 +10,10 @@ export default defineEntries( return import('./pages/HomePage/HomePage') case 'UserExampleUserExamplesPage': return import('./pages/UserExample/UserExamplesPage/UserExamplesPage') + case 'UserExampleNewUserExamplePage': + return import( + './pages/UserExample/NewUserExamplePage/NewUserExamplePage' + ) default: return null }