- 15 Nov, 2021 22 commits
-
-
jj@jjsweb.site authored
-
jj@jjsweb.site authored
-
JJ Kasper authored
-
Kiko Beats authored
closes: https://github.com/vercel/next.js/issues/30353 According with spec, `'about:client'` is the default value is the user doesn't provide it. It needs to add a test there, looks like there no unit tests for these classes
🤔 -
jj@jjsweb.site authored
-
JJ Kasper authored
-
Jiachi Liu authored
* support custom 500 error in streaming * remove unused imports
-
Steven authored
This fixes our `basePath` detection/replacing server-side as we were incorrectly considering `/docss` a match for a `basePath` of `/docs` which caused us to have an unexpected value in the `normalizeLocalePath` function. - Fixes #22429 - Regression introduced in #17757 - Fixes: https://github.com/vercel/next.js/issues/31423Co-authored-by:
JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
Tim Neutkens authored
-
Shu Ding authored
Initial step to refactor the rendering logic by decoupling the handler and renderer: 1. Delegate Flight rendering to server/render 2. Reuse the piper glue code for both Fizz and Flight streams 3. Add buffering for ReadableStream In 1), this PR also makes sure that gSSP/gSP are correctly executed before the Flight stream and `pageProps` and `router` are correctly delivered to the component. Related to #30994. ## 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 by running `yarn lint`
-
Vincent Voyer authored
This fixes the iron-session example url from an old url to the new, always-up-to-date url. I believe the Next.js team owns the previous url but it's not up-to-date. This commit also changes req.session.get("user") => req.session.user to reflect the new API. -
Bradley Turek authored
Adds a few commas where they could improve the clarity of the sentence. - [X] Make sure the linting passes by running `yarn lint` Co-authored-by:Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
-
Orri Arnarsson authored
## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint`
-
Byron authored
fixes #29667 I didn't add an integration test, but I can take a stab at it if you point me in the right direction!
-
Tim Neutkens authored
-
Tim Neutkens authored
-
Jiachi Liu authored
## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` x-ref: https://github.com/vercel/styled-jsx/issues/761 Since next.js is using styled-jsx v5 beta now, it requires wrapping a `StyleRegistry` component on the root top. ref: [styled-jsx doc](https://github.com/vercel/styled-jsx/tree/beta#server-side-rendering)
-
Nikola Knežević authored
There is a non-valid mix of classic and arrow function notation in the documentation. I've fixed it to be a classical function notation because all the other examples are like that. ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
-
Tim Neutkens authored
-
Tobias Koppers authored
## 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 by running `yarn lint`
-
Tim Neutkens authored
-
Donny/강동윤 authored
-
- 14 Nov, 2021 6 commits
-
-
Onur Temiz authored
"styled-jsx" link was broken. Added `/docs/` prefix and removed `.md` suffix to fix it. Co-authored-by:Lee Robinson <9113740+leerob@users.noreply.github.com>
-
Max Schmitt authored
-
Alessandro Ursino authored
-
Onur Temiz authored
Added a link to third "Internationalized Routing" ## 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 - [x] 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 by running `yarn lint`
-
Tim Neutkens authored
-
Emmanouil Zoumpoulakis authored
Some simple typo fixes on Markdown files
-
- 13 Nov, 2021 5 commits
-
-
Tim Neutkens authored
-
Tim Neutkens authored
-
Zhang Zhi authored
-
Rishabh Poddar authored
Co-authored-by:Lee Robinson <me@leerob.io>
-
Matt Kane authored
This changes the check for whether a rewrite is internal or if it should be proxied. Currently it checks if `protocol` is unset, which is only the case for relative URLs or localhost. This means that requests where there is a hostname set, or if localhost is specified in another way such as `127.0.0.1`, then it will be proxied, which potentially causes a proxy loop or ssl error. This PR changes the test so that it also checks if the hosts match, and only proxies if they are different. Fixes #31179 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
-
- 12 Nov, 2021 7 commits
-
-
Thibaut SABOT authored
* Add eslint rule to prevent importing next/server outside of _middleware * add error to manifest.json Co-authored-by:Javi Velasco <javier.velasco86@gmail.com>
-
Hiroshi Ogawa authored
* fix(30724): clear "x-middleware-next" header when chaining middlewares * refactor: do not accumulate "x-middleware-next" header * test: fix grammar of test case title * Update packages/next/server/next-server.ts Co-authored-by:Javi Velasco <javier.velasco86@gmail.com>
-
Tim Neutkens authored
-
Tim Neutkens authored
-
JJ Kasper authored
-
Filip Skokan authored
The `resource` argument[^1] in fetch may also be an instance of URL (or any other stringifiable value) but the sandbox variant of middlewares doesn't support that. ```js export async function middleware(req, ev) { await fetch(new URL('https://www.googleapis.com/oauth2/v3/certs'), { redirect: 'manual', method: 'GET', }) return new Response(JSON.stringify({}), { status: 200 }); } ``` This is fixing the use of e.g. URL instance in `fetch`. ``` TypeError: initurl.startsWith is not a function at getFetchURL (/my-next-app/node_modules/next/dist/server/web/sandbox/sandbox.js:246:17) at fetch (/my-next-app/node_modules/next/dist/server/web/sandbox/sandbox.js:77:29) at Object.middleware [as handler] (webpack-internal:///./pages/_middleware.js:86:15) at async adapter (webpack-internal:///./node_modules/next/dist/server/web/adapter.js:30:22) at async DevServer.runMiddleware (/my-next-app/node_modules/next/dist/server/next-server.js:430:26) at async DevServer.runMiddleware (/my-next-app/node_modules/next/dist/server/dev/next-dev-server.js:394:28) at async Object.fn (/my-next-app/node_modules/next/dist/server/next-server.js:807:34) at async Router.execute (/my-next-app/node_modules/next/dist/server/router.js:211:32) at async DevServer.run (/my-next-app/node_modules/next/dist/server/next-server.js:1115:29) at async DevServer.run (/my-next-app/node_modules/next/dist/server/dev/next-dev-server.js:440:20) ``` [^1]: https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters -
Jiachi Liu authored
1. Align `renderToReadableStream` with `renderToNodeStream`, resolve promise of `NodeWritablePiper` only when `onCompleteShell` is called. 2. update webpack to disable chunk loading for web runtime Item 1 is the preparation for middleware-ssr-loader. Then we can do the following there ```js try { result = await renderToHTML(page) } catch (e) { result = await renderToHTML(errorPage) } result.pipe(renderResult) ```
-