Commit graph

5569 commits

Author SHA1 Message Date
Hoang Vo
ee372f472f
feat(example): add CRUD example with next-connect and passport (#11359)
* Add with-next-connect example

* Update README

* Fix code and lint

* Fix typo

* Run prettier

* Include username

* Rename example

* Match with-passport styling

* Add comments in code

* Run prettier

* Rewrite example

* Add some comments

* Update README.md

* keys -> secret

* Updated package.json and readme

* UX changes

* Securely encrypt cookie with @hapi/iron

* Update README

* Abstract db related actions and update README

* security: add note on password hashing

* remove unused dep

* Updated readme

Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-04-13 18:07:54 -05:00
Yuki Takemoto
65335155d1
chore(example): Update styled-components to v5 in with-typescript-styled-components (#11766) 2020-04-13 17:30:17 -05:00
Joe Haddad
39c068e1f0
Update Serverless Note in Docs (#11861) 2020-04-13 17:11:14 -04:00
Joe Haddad
9fdd6ed2e4
Fix Lockfile 2020-04-13 14:48:23 -04:00
matamatanot
7dbdf1d89e
Remove update-check.d.ts (#11858)
Co-authored-by: matamatanot <matamatanot@gmail.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-13 14:47:01 -04:00
Houssein Djirdeh
04ceba4309
Adds first input delay performance metric (#8884)
* measures fid

* updates typings, fixes logic, updates per review comments

* update to es5

* separate clearMeasures

* use relayer

* creates fid polyfll render helper + simplifies measure

* switch to dynamic import

* creates fid experimental flag

* removes unecessary time-to-first-input metric

* removes hydration measure removes

* default flag to false

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-13 14:46:46 -04:00
a14m
0ccce7271d
Update sentry example (#11701)
* Fix the with-sentry-simple example configuration code

This fixes the following issues:
- https://github.com/zeit/next.js/issues/8873
- https://github.com/zeit/next.js/issues/11642

* Update the README with the info about uploading to sentry configurations

* Fix the typo in SENTRY_DNS -> SENTRY_DSN
2020-04-13 14:08:56 -04:00
Fabian Mastenbroek
9e75162a27
[examples/with-react-intl] Fix issues with Intl.js polyfill (#11806)
* Add workaround for Intl.js RegEx issue

This change adds a workaround for an issue with the Intl.js polyfill
library where it instantiates an invalid regular expression.

Relevant issues:
https://github.com/andyearnshaw/Intl.js/issues/270
https://github.com/andyearnshaw/Intl.js/issues/256
https://github.com/andyearnshaw/Intl.js/issues/306

Until this issue is fixed upstream, we use a workaround in the example.

Fixes: #11777

* Do not load Intl.js polyfill by default on Node

This change updates the `with-react-intl` example to prevent it from
polyfilling `Intl` in a Node environment when it is not needed.
2020-04-13 13:55:30 -04:00
matamatanot
e686545c0d
Update @types in create-next-app (#11815)
* remove self made types

* add types

Co-authored-by: matamatanot <matamatanot@gmail.com>
2020-04-13 13:06:19 -04:00
JJ Kasper
2594bb93ab
v9.3.5-canary.9 2020-04-13 11:26:11 -05:00
MicrochipQ
ccefab76dd
[examples/custom-server-fastify] Fix ts(2341) (#11844)
* Fix ts(2341)

Property 'handleRequest' is private and only accessible within class 'Server'.ts(2341)

* Update server.js

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-04-13 13:41:38 +02:00
JJ Kasper
dcb0a656f5
Add gip identifiers to NEXT_DATA (#11835)
* Add gip identifiers to NEXT_DATA

* Update test a bit
2020-04-13 11:59:49 +02:00
Dave Cardwell
cbcb10b922
Add displayName property to React Context objects (#11829)
https://reactjs.org/docs/context.html#contextdisplayname

Use the .displayName property to show distinct component names in React
DevTools. For example, “DocumentContext.Provider” instead of just
“Context.Provider”.
2020-04-13 11:55:42 +02:00
Minh Nguyen
ec76d9265c
Rename functional component -> function component (#11850)
See the following for context:

- https://reactjs.org/docs/components-and-props.html#function-and-class-components
- https://overreacted.io/how-are-function-components-different-from-classes/
- https://twitter.com/dan_abramov/status/1057625147216220162
- https://twitter.com/kentcdodds/status/1136274289965928448
2020-04-13 11:33:06 +02:00
liulanz
287961ed91
minor change in hello-world/package.json (#11830) 2020-04-11 23:19:53 +02:00
liulanz
f1e561b889
Update dependencies (#11833)
* updated npm dependencies

* updated npm dependencies

* updated npm dependencies
2020-04-11 23:18:40 +02:00
JJ Kasper
37c98faa01
Make sure to pass through query values for custom routes (#11812) 2020-04-11 12:57:52 +02:00
Tim Neutkens
099ea8b932 v9.3.5-canary.8 2020-04-11 12:45:39 +02:00
Joe Haddad
1199c235b1
Externalize next-server from Server Builds (#11819)
* Externalize  from Server Builds

* Windows Compatibility for Plugins

* Only check for windows path on windows

* add comments
2020-04-11 12:36:06 +02:00
JJ Kasper
46ecb00112
v9.3.5-canary.7 2020-04-10 18:12:02 -05:00
JJ Kasper
cd1a2a5949
Handle more invalid CSS class characters (#11809)
* Handle more invalid CSS class characters

* Remove old comment
2020-04-10 10:37:24 -05:00
Abdul Rauf
bbe7a52bd2
update dev script in examples/using-preact (#11805) 2020-04-10 13:59:17 +02:00
Tim Neutkens
c59d24055d
Add Prismic Example (#10897)
* Add Prismic Example

* Update package.json

* Update constants

* Remove react-datocms

* Add Preview Mode for Prismic

* Add support for Preview Mode

* Delete author.jpg

* Delete image.jpg

* Fixes and readme updates

* Fixed issues with preview mode

* Updated preview mode steps

* Added more posts

* Updated readme

* Updated readme

* Added demo URL

* Added related examples links

* Added example to docs

Co-authored-by: Shu Uesugi <shu@chibicode.com>
Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-04-10 12:41:09 +02:00
JJ Kasper
ab4ba0418c
Replace brackets in CSS classes for dynamic routes (#11795) 2020-04-10 12:32:55 +02:00
JJ Kasper
0648c35508
Update auto export opt-out warning and err.sh (#11801) 2020-04-10 12:31:19 +02:00
JJ Kasper
7d6fbe7fd6
Add Node.js version to Bug template (#11781) 2020-04-10 12:30:44 +02:00
JJ Kasper
982e880f9a
Update CNA tests on windows for further investigating (#11779) 2020-04-09 13:57:59 -04:00
Rounak Agarwal
0c2a6d8f48
fix typo (#11786) 2020-04-09 12:54:59 -05:00
Joe Haddad
13cf97055f
v9.3.5-canary.6 2020-04-09 10:24:02 -04:00
Joe Haddad
041384bdda
Upgrade ci-info (#11758)
* Upgrade `ci-info`
This adds support for Nevercode, GH Actions, and Render.

* Repackage compiled deps

* Try to fix test
2020-04-09 10:23:04 -04:00
Stig Kleppe-Jørgensen
28e1be83df
Remove duplicate content (#11750) 2020-04-09 10:29:34 +02:00
JJ Kasper
7af04db4e4
Fix just headers not being applied in dev mode (#11755) 2020-04-09 10:24:15 +02:00
JJ Kasper
fa167e3346
Update to latest version of AMP optimizer (#11753)
* Update to latest version of AMP optimizer

* Update test

* Update another test

* Update another test
2020-04-09 10:23:31 +02:00
Yuki Takemoto
a35ae240c4
chore(example): Update styled-components to v5 (#11765) 2020-04-08 19:41:06 -05:00
Zack Krida
1d21897982
Update start script in preact example (#11763)
As far as I understand using preact in Next.js no longer requires a custom server. The current start command `"start": "NODE_ENV=production node server.js"` references a file that no longer exists.
2020-04-08 19:34:54 -05:00
sdhani
7e39079462
Minor with-docker readme grammar fix (#11760)
* Fix with-docker readme grammar

* Amended with-docker readme grammar fix

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-04-08 19:07:12 -05:00
Joe Haddad
2704387d2e
Add New Provider (#11757) 2020-04-08 16:20:28 -04:00
Zack Krida
21be4c054b
Fix: small typo in SERVER_PROPS_EXPORT_ERROR constant (#11749) 2020-04-08 09:43:18 -04:00
Luis Alvarez D
84b73bdb0a
[contributing docs] Add more details about chromedriver for ma… (#11739) 2020-04-08 09:58:16 +02:00
Luis Alvarez D
5a786bdfd8
Bump timeout for create-next-app tests (#11743) 2020-04-08 09:44:52 +02:00
Luis Alvarez D
282f375189
[Examples] Update with-mobx-state-tree examples (#11736)
* Updated with-mobx-state-tree

* Updated with-mobx-state-tree-typescript

* minor fix
2020-04-08 09:44:28 +02:00
David Janda
17384fc064
Updated with-xstate (#11658)
* Replaced getInitialProps with SSG

* Removed getStaticProps

* Apply suggestions from code review

Remove count

Co-authored-by: Luis Alvarez D <luis@zeit.co>
2020-04-07 15:26:05 -05:00
JJ Kasper
cad2a75649
Make sure to handle "next" import gracefully (#11733)
* Make sure to handle "next" import gracefully

* Update test file
2020-04-07 15:13:01 -04:00
David Janda
44b7b3c953
Updated with-webpack-bundle-size-analyzer to use SSG (#11657)
* Replaced getInitialProps with SSG

* Moved faker to a top level import and re-added contact.js
2020-04-07 13:20:50 -05:00
Joe Haddad
43a8e57b3e
v9.3.5-canary.5 2020-04-07 13:38:48 -04:00
JJ Kasper
cc9678056e
Fix inconsistent handling for /index (#11643)
* Fix inconsistent handling for /index

* Add more test cases

* Add pages/index/index.js test

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-07 13:24:53 -04:00
Dylan Brookes
bc7d18367b
Confirm if user wants example when creating app (#10543)
* Confirm if user wants example when creating app

* Only ask user to choose example if they provide --example flag

* Simplify the search

* Added test

* Use a select to pick the template

* Updated test

* check for lowercase and updated no example message

* Add message if no template is selected

* Updated tests

* Handle error if fetching the examples fails

* Fixed tests

* Updated test timeout

* Update examples.ts

Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
Co-authored-by: Luis Alvarez <luis@zeit.co>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-07 13:11:29 -04:00
JJ Kasper
bf184fceeb
Update to merge props from GSSP methods with _app pageProps (#11709)
* Add warning for pageProps GSSP conflict

* Update warning

* Update to merge pageProps instead of warn on conflict

* bump

* Update merging
2020-04-07 11:33:26 -04:00
Vincent Voyer
009369a9aa
docs(examples): add with-iron-session example (#10973)
This example creates an authentication system that uses a **signed and encrypted cookie to store session data**. It relies on [`next-iron-session`](https://github.com/vvo/next-iron-session).

It uses current best practices as for authentication in the Next.js ecosystem:
1. **no `getInitialProps`** to ensure every page is static
2. **`useUser` hook** together with [`swr`](https://swr.now.sh/) for data fetching

Features:
- Logged in status synchronized between browser windows/tabs
- Layout based on logged in status
- All pages are static
- Session data is signed and encrypted in a cookie
2020-04-07 10:47:00 -04:00
viz
9f27259425
chore(deps): remove next-css from examples/antd (#10804)
* chore(deps): remove next-css

* Update examples/with-ant-design/package.json

Co-Authored-By: Jack <jacklee82814@gmail.com>

* Update examples/with-ant-design/pages/_app.js

Co-Authored-By: Jack <jacklee82814@gmail.com>

* chore(lint): fix a linting error

Co-authored-by: Jack <jacklee82814@gmail.com>
2020-04-07 10:40:11 -04:00