-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RSC: Support client-only package and include @tobbe.dev/rsc-test in s…
…moke test (#9367)
- Loading branch information
Showing
13 changed files
with
72 additions
and
119 deletions.
There are no files selected for viewing
19 changes: 0 additions & 19 deletions
19
...xtures__/test-project-rsc-external-packages/.yarn/patches/vite-npm-4.4.9-e845c1bbf8.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,13 +20,5 @@ | |
"prisma": { | ||
"seed": "yarn rw exec seed" | ||
}, | ||
"packageManager": "[email protected]", | ||
"resolutions": { | ||
"[email protected]": "patch:vite@npm%3A4.4.9#./.yarn/patches/vite-npm-4.4.9-e845c1bbf8.patch" | ||
}, | ||
"dependencies": { | ||
"@tobbe.dev/rsc-test": "^0.0.1", | ||
"client-only": "^0.0.1", | ||
"server-only": "^0.0.1" | ||
} | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
__fixtures__/test-project-rsc-external-packages/web/src/App.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 0 additions & 49 deletions
49
__fixtures__/test-project-rsc-external-packages/web/src/Form.tsx
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
__fixtures__/test-project-rsc-external-packages/web/src/actions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use server' | ||
|
||
import { randomWords } from './words' | ||
|
||
export async function onSend(formData: FormData) { | ||
console.log('formData entries:') | ||
formData.forEach((value, key) => console.log(key, value)) | ||
|
||
await new Promise((resolve) => setTimeout(resolve, 50 + Math.random() * 50)) | ||
|
||
// Want to keep something like this in the codebase to test | ||
// importing files that use the `server-only` package | ||
const words = await randomWords(5) | ||
|
||
return formData.get('message') + ': ' + words.join(' ') | ||
} |
17 changes: 0 additions & 17 deletions
17
__fixtures__/test-project-rsc-external-packages/web/src/chat.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters