Commit graph

16 commits

Author SHA1 Message Date
Damien Simonin Feugas
35f1a3501a
feat: enables 'edge' as a possible runtime for API routes (#44045) 2022-12-15 10:08:03 +01:00
Steven Tey
cf3bb583d9
Included negative matcher docs in upgrade guide (#42489)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a 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 a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-11-04 10:20:53 -07:00
Balázs Orbán
4d20beb7c5
BREAKING CHANGE: feat(edge): split NextCookies to RequestCookies and ResponseCookies (#41526)
Ref: [Slack
thread](https://vercel.slack.com/archives/C035J346QQL/p1666056382299069?thread_ts=1666041444.633059&cid=C035J346QQL),
[docs update](https://github.com/vercel/front/pull/17090)

Spec: https://wicg.github.io/cookie-store/

BREAKING CHANGE:

Ref: https://github.com/vercel/edge-runtime/pull/177,
https://github.com/vercel/edge-runtime/pull/181

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a 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 a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-27 00:20:39 -07:00
Artur Sedlukha
377a39a88d
Typo in middleware upgrade guide (#40963)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a 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 a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-27 12:40:50 -07:00
Yusuke Hayashi
885defd442
Fix typo in error/middleware-upgrade-guide.md (#40176)
No Reponse Body -> No Response Body

<img width="330" alt="スクリーンショット 2022-09-02 16 40 04" src="https://user-images.githubusercontent.com/11132792/188084749-a1dd4ca6-b108-47ef-85d9-5f1602cb8cea.png">
2022-09-02 18:20:22 +00:00
Emerson Laurentino
6b8e499c7b
fix: middleware-upgrade-guide.md (#38246)
* Update middleware-upgrade-guide.md

* Update middleware-upgrade-guide.md
2022-07-01 22:24:34 -05:00
Edward Thomson
dd1492d3a0
Update middleware upgrade guide w/ more rationale (#38074)
* Update middleware upgrade guide w/ more rationale

The API changes for GA are general improvements.

Our middleware upgrade guide is very helpful about describing the changes
that were made and how to react to them; include some additional "why" to
rationalize these changes.

* Update middleware-upgrade-guide.md

Avoid words like "simple" and "easy"

* Update middleware-upgrade-guide.md

Clarify the issues around "security" with responses - the previous verbiage made it sound like there was a security vulnerability; there was not.

* Apply suggestions from code review

Co-authored-by: Lee Robinson <me@leerob.io>

* Apply suggestions from code review

* Update errors/middleware-upgrade-guide.md

* Update errors/middleware-upgrade-guide.md

Co-authored-by: Balázs Orbán <info@balazsorban.com>

* Apply suggestions from code review

* Update canary -> latest

* Apply suggestions from code review

Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-28 10:31:47 -05:00
JJ Kasper
8e161e1855
Middleware docs update (#38111)
* Initial outline added for middleware docs

* Feedback changes - not included new user agent yet

* edge api routes docs

* middleware page some cleanup

* moved api stuff to next server, added useragent

* waitUntil example added

* Updated env vars section

* Added cookies on the request object example

* fixed naming

* fixed import typo

* Amy feedback

* Update docs/advanced-features/middleware.md

Co-authored-by: Amy Burns <amy.burns@vercel.com>

* first commit

* more fixes

* re-structuring based on feedback

* changes to middleware.md

* updates to edge-api-routes

* code typo

* Update docs/advanced-features/middleware.md

Co-authored-by: JJ Kasper <jj@jjsweb.site>

* Update edge-api-routes.md

* Update Edge Runtime API docs

* Clarify API docs

* Update

* Update docs/advanced-features/middleware.md

* Update switchable runtime docs

* Update response

* experimental-edge

* Update docs/advanced-features/middleware.md

* Add example of forwarding headers and address comments

* Add proxying headers to middleware upgrade guide

* Apply suggestions from code review

Co-authored-by: Jeff Escalante <jescalan@users.noreply.github.com>

* fix middleware directory spec

* localization explanation

* update detecting runtime

* Update docs/advanced-features/react-18/switchable-runtime.md

Co-authored-by: Balázs Orbán <info@balazsorban.com>

* fix prettier issues

* table fix

* Update docs/advanced-features/react-18/switchable-runtime.md

Co-authored-by: Jeff Escalante <jescalan@users.noreply.github.com>

* Update docs/api-routes/edge-api-routes.md

Co-authored-by: Jeff Escalante <jescalan@users.noreply.github.com>

* lint-fix

Co-authored-by: molebox <hello@richardhaines.dev>
Co-authored-by: Amy Burns <amy.burns@vercel.com>
Co-authored-by: Ismael Rumzan <ismael.rumzan@gmail.com>
Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
Co-authored-by: Jeff Escalante <jescalan@users.noreply.github.com>
Co-authored-by: Ismael <ismael@vercel.com>
2022-06-28 10:22:48 -05:00
Dom Sip
a90349d519
Update middleware-upgrade-guide to be consistent (#38102)
Update middleware-upgrade-guide.md

Ensure that before and after examples are consistent
2022-06-28 14:48:57 +02:00
Javi Velasco
0f33c0cbf5
Rephrase middleware location (#38073)
It is possible that users that are defining `src/pages` in their project confuse the "project root" to locate middleware with the actual project root instead of `src/middleware` so this PR rephrases the migration guide to make explicit that the it should be located **next** to the `pages` folder.
2022-06-27 17:13:19 +00:00
Steven Tey
8019cf002a
Added ESLint upgrade instructions to middleware upgrade guide (#38008)
## 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 `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-27 00:20:36 +00:00
M. Zakiyuddin Munziri
2833904b6f
Fix typo for rewrites/redirects to rewrite/redirect (#38016)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-26 16:17:34 -05:00
Lee Robinson
5646e43f83
Fix typo for rewrites to rewrite. (#38000) 2022-06-24 15:45:02 -05:00
Balázs Orbán
a590c4e7f3
docs: return response in code example (#37985)
* Update middleware-upgrade-guide.md

* lint-fix

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-24 11:13:40 -05:00
JJ Kasper
97395b4cd6
Add missing error manifest entry and fix lint (#37758)
* Add missing error manifest entry

* fix lint

* guid -> guide
2022-06-16 11:46:15 -05:00
Lee Robinson
eb55af1cfe
Add upgrade guide for Middleware. (#37382)
* Middleware upgrade guide

* Add a bit more

* Apply suggestions from code review

Co-authored-by: Rich Haines <hello@richardhaines.dev>
Co-authored-by: Edward Thomson <ethomson@github.com>
Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>

* Apply suggestions from code review

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Updates based on PR comments

* Add before / after

* Flip paragraphs

* Apply suggestions from code review

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Apply suggestions from code review

Co-authored-by: Kiko Beats <josefrancisco.verdu@gmail.com>

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Damien Simonin Feugas <damien.feugas@gmail.com>

* Update errors/middleware-upgrade-guide.md

Co-authored-by: Dom Sip <dominik.sipowicz@gmail.com>

* Update errors/middleware-upgrade-guide.md

Co-authored-by: Damien Simonin Feugas <damien.feugas@gmail.com>

* Update middleware-upgrade-guide.md

* Update errors/middleware-upgrade-guide.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Update errors/middleware-upgrade-guide.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Apply suggestions from code review

Co-authored-by: Rich Haines <hello@richardhaines.dev>

* Apply suggestions from code review

* Update errors/middleware-upgrade-guide.md

Co-authored-by: Rich Haines <hello@richardhaines.dev>
Co-authored-by: Edward Thomson <ethomson@github.com>
Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>
Co-authored-by: Kiko Beats <josefrancisco.verdu@gmail.com>
Co-authored-by: Damien Simonin Feugas <damien.feugas@gmail.com>
Co-authored-by: Dom Sip <dominik.sipowicz@gmail.com>
2022-06-16 09:29:18 -07:00