Commit graph

8 commits

Author SHA1 Message Date
Tim Neutkens
f260328900
BREAKING CHANGE: Enable newNextLinkBehavior (#41459)
- Enable newNextLinkBehavior. See #36436 
- Run next/link codemod on test suite

Note that from when this lands on apps trying canary will need to run
the new-link codemod in order to upgrade.
Ideally we have to detect `<a>` while rendering the new link and warn
for it.

Co-authored-by: Steven <steven@ceriously.com>
2022-10-17 21:20:28 -04:00
JJ Kasper
9793e9004f
Add isPreview field to router (#21638)
This adds an `isPreview` field to the `next/router` to allow detecting when in preview mode. 

Closes: https://github.com/vercel/next.js/issues/14903
2021-02-18 18:34:33 +00:00
Joe Haddad
86160a5190
Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
Joe Haddad
18036d4e51
Correct Cache-Control Behavior for GS(S)P (#11022)
* Correct Cache-Control Behavior for GS(S)P

* remove old line

* fix test
2020-03-13 10:40:10 +01:00
Joe Haddad
8443a809f3
Verify GS(S)P Serializability (#10857)
* Verify GS(S)P Serializability

* Add support for cyclic refs

* Add unit tests

* Test for error in development mode

* Fix prerender preview tests

* Fix gssp preview tests

* fix 2x test cases

* Add desired test

* fix some more tests

* Fix route manifest expect

* Fix test expects

* Test that `getServerSideProps` does not error in production

* Test that getStaticProps is not checked in production

* Test serialization check during build

* Fix export detection for serverless

* Update test/unit/is-serializable-props.test.js

Co-Authored-By: JJ Kasper <jj@jjsweb.site>

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-03-09 13:30:44 -04:00
Tim Neutkens
0f0398c88e
Make sure to error when setting too large of preview data (#10831)
* Make sure to error when setting too large of preview data

* Update to check size after signing and limit to 2KB
2020-03-04 21:37:53 +01:00
Joe Haddad
50c95d16b4
Send Credentials for getServerSideProps Requests (#10826)
* Send Credentials for `getServerSideProps` Requests

* Fix tests
2020-03-04 11:56:08 -05:00
JJ Kasper
70cb5bd726
Update to make sure preview mode works with getServerSideProps (#10813)
* Update to make sure preview mode works with getServerSideProps

* Update to only parse previewData in GS(S)P mode
2020-03-04 13:58:12 +01:00