rsnext/test/lib
Jiachi Liu d8f4fa8946
Fix not found hangs the build with overridden node env (#53106)
### Why

In #52985 the not found solution introduces `NODE_ENV` to determine if it his the not found boundary and should render the not found, as in the next build mode, we have `/_not-found` as a special route which has a empty parallel route, but in next dev mode so far it his the `parallel-default-route`. This could dependend on the `NODE_ENV` passing to next server but not necessarily.

### What

Fixes #53082
Fixes #53083 

### How

When server actions `not-found` hits, now we create a new loader tree based on the previous one, including `layout` and other components but not the children parallel routes

For production case, to make the rendering independent from the `NODE_ENV`, we're using original pathname to check if it's `/_not-found` to determine if it's production build 404 page

To support replace the loader tree of action, did a little refactor that passing down the loader tree from top level to `bodyResult`. Then we can change the loader tree itself before rendering, in short, we tweak it from original tree to one for not-found case, so server actions could render it properly
2023-07-24 21:00:53 +00:00
..
browsers type check tests (and convert next-test-utils.js to ts) (#51071) 2023-06-23 17:42:50 +00:00
next-modes Fix not found hangs the build with overridden node env (#53106) 2023-07-24 21:00:53 +00:00
amp-test-utils.js Improve linting rules to catch more errors (#9374) 2019-11-10 19:24:53 -08:00
create-next-install.js Only create tarballs once per run-tests (#48321) 2023-04-12 23:23:59 -07:00
development-sandbox.ts fix app-hmr-changes.test.ts by updating next-tweet (#52046) 2023-06-30 23:09:09 +00:00
e2e-utils.ts refactor tests for readability (#51051) 2023-06-21 19:47:21 +00:00
flat-map-polyfill.js Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
mocks-require-hook.js Validate streaming writer chunk type in testing (#36200) 2022-04-18 16:24:06 +02:00
next-test-utils.ts add incremental cache for node.js app rendering (#52172) 2023-07-07 11:33:51 +02:00
next-webdriver.ts type check tests (and convert next-test-utils.js to ts) (#51071) 2023-06-23 17:42:50 +00:00
react-channel-require-hook.js Preload css (#48840) 2023-04-27 12:51:52 +02:00
turbo.ts type check tests (and convert next-test-utils.js to ts) (#51071) 2023-06-23 17:42:50 +00:00
use-temp-dir.ts fix(cli): handle Tailwind CSS + src/ correctly (#47238) 2023-03-20 14:21:29 -07:00