We're no longer currently planning on supporting caching for dynamic responses, so we can do some cleaning & simplification:
* Multiplexing can be removed since we only ever subscribe once (via `RenderResult.pipe`, described below)
* `RenderResult.toUnchunkedString` can become synchronous since static responses are never chunked
* `RenderResult.forEach` can become `RenderResult.pipe` which helps encapsulate some of the details of `RenderResult`
This applies the fix from the awesome investigation done in https://github.com/vercel/next.js/issues/28797 by @jayphelps and adds a test to ensure this is working as expected. It seems that the `route-loader` has a race condition while prefetching and if a script is executed before we have created a current "future" entry to resolve the entry stays in a pending state causing routes to hang so this handles the condition by ensuring pending/errored entries do not stay around.
## Bug
- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`
Fixes: https://github.com/vercel/next.js/issues/28797
Fixes: https://github.com/vercel/next.js/issues/27783
* Expose minify in next-swc
* Expose minify in js binding
* Use new minify function in terser plugin
* Only upload changed binary artifact
* Build next-swc binaries
* Add swc license info to copied file
Updates the React 18 concurrent tests to support streaming, by using webdriver (instead of cheerio) to support dynamic updates, and being more explicit about SSR vs. hydrated content.
Also enables streaming support by setting `supportsDynamicHTML: true` in `pipe(...)` for non-bot user agents.
Earlier it was:
```bash
npx create-next-app --example with-eslint with-eslint
# or
yarn create next-app --example with-eslint with-eslint
```
It was confusing for me,
as i couldn't identify which one is *example-name* and which one is *folder-name* (for *with-eslint*).
I checked other example folders and was able to digest the stuff.
But if a new programmer comes who is not familiar with next/npx,
this could have took some time to understand.
And Hence i modified the cmd it to the below, for better understanding:
```bash
npx create-next-app --example with-eslint with-eslint-app
# or
yarn create next-app --example with-eslint with-eslint-app
```
## Documentation / Examples
- [X] Make sure the linting passes
Example `with-typescript-graphql`has unmatched dependency tree in `react-test-renderer` lead to error in #28582, I changed version of `react-test-renderer` to `^17.0.1` and fix that issue.
Closes https://github.com/vercel/next.js/issues/28582
This ensures we trim test output that will exceed the amount that can be shown in GitHub actions so that we can still see which tests failed instead of un-helpful test logs.
Updating @react-three/drei from 4.x to 7.x
I was having problems using this example and realized that it was caused by the "old" version of the lib.
Also updating @react-three/fiber and next to latest.
## Documentation / Examples
- [x] Make sure the linting passes
The with-stitches example is broken presumably due to changes in the Stitches API now that it's hit `1.0.0`. I've created an issue already: #28650
I've made three small changes:
- Replaced the createCss function in `stitcheds.config.js` with createStitches
- Replaced the getCssString function with getCssText in `stitches.config.js` and `pages/_documents.jsx`
- Bumped `@stitches/react` to `^1.0.0` 🎉
I've left the rest of the example code alone as I'm still exploring the library after seeing yesterdays release annoucement.
@peduarte Is there anything else that needs to updated?
I found that an example for a redirect rule in the documentation doesn't have the required property `permanent`. I noticed this because I tried to use that same rule but building fails with the following message:
```
`permanent` is not set to `true` or `false` for route {"source":"/:path((?!another-page$).*)","has":[{"type":"host","value":"example.com"}],"destination":"/another-page"}
Error: Invalid redirect found
```
My PR simply adds the missing `permanent` property as false to be consistent with the rest.
## Documentation / Examples
- [x] Make sure the linting passes
on GetServerSidePropsContext and GetStaticPropsContext
As discussed on #21574 having a generic type will give it more flexibility and remove linting errors.
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using #21574
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`
## Documentation / Examples
- [ ] Make sure the linting passes