rsnext/test
Justin Ridgewell feca3ce21c
Turbopack: Implement Server Actions (#53890)
### What?

This implements Server Actions inside the new Turbopack next-api bundles.

### How?

Server Actions requires:
1. A `.next/server/server-reference-manifest.json` manifest describing what loader module to import to invoke a server action
2. A "loader" entry point that then imports server actions from our internal chunk items
3. Importing the bundled `react-experimental` module instead of regular `react`
4. A little 🪄 pixie dust
5. A small change in the magic comment generated in modules that export server actions

I had to change the magic `__next_internal_action_entry_do_not_use__` comment generated by the server actions transformer. When I traverse the module graph to find all exported actions _after chunking_ has been performed, we no longer have access to the original file name needed to generate the server action's id hash. Adding the filename to comment allows me to recover this without overcomplicating our output pipeline.

Closes WEB-1279
Depends on https://github.com/vercel/turbo/pull/5705

Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
2023-10-04 23:33:21 +00:00
..
.stats-app chore(ci): bump pnpm v8.6.11 to v8.7.1 (#54873) 2023-09-06 00:39:44 +00:00
__mocks__ [edge] bump @edge-runtime/* package suite (#49092) 2023-05-31 08:03:20 +00:00
development Turbopack: Implement Server Actions (#53890) 2023-10-04 23:33:21 +00:00
e2e Separate RSC and SSR jsx-runtime modules (#56438) 2023-10-04 20:29:10 +00:00
examples feat(cli): introduce --tailwind flag (#46927) 2023-03-16 16:06:27 +01:00
integration Remove buildId test as it's no longer relevant (#56316) 2023-10-02 18:20:47 +00:00
lib Turbopack: Implement Server Actions (#53890) 2023-10-04 23:33:21 +00:00
production App Router - preinitialize chunks during SSR (#54752) 2023-10-03 21:40:25 +00:00
unit More Turbopack fixes (#56299) 2023-10-02 13:55:23 +00:00
.gitignore ci(workflow): enable test trace upload (#51107) 2023-06-12 17:14:13 +00:00
build-turbopack-tests-manifest.js test: add flaky turbopack integration tests to manifest (#56309) 2023-10-03 00:53:09 +02:00
jest-setup-after-env.ts Decrease default test timeouts (#56116) 2023-09-27 23:55:20 +00:00
jest.d.ts refactor smooth scroll bailout logic in app navigations (#53186) 2023-07-27 14:39:51 +00:00
readme.md refactor: split up CONTRIBUTING.md (#40515) 2022-09-16 14:54:58 -07:00
test-file.txt
turbopack-tests-manifest.json chore: pass defineEnv from next.js to rust directly (#56216) 2023-10-03 22:43:21 +02:00

See Testing for more information on how you can run/write/debug tests for Next.js.