Commit graph

5611 commits

Author SHA1 Message Date
Justin
fe686b30b4
with-iron-session: fix link to next-iron-session (#11974) 2020-04-17 17:18:50 -05:00
JJ Kasper
28ca0a7086
Add API route to default CNA template (#11981) 2020-04-17 16:28:58 -05:00
Joe Haddad
3edfe51861
Strongly Type Usage of Client Pages Loader (#11985) 2020-04-17 16:53:43 -04:00
Joe Haddad
0e915b118d
Add Missing Hook for MainTemplate (#11984) 2020-04-17 16:52:04 -04:00
Joe Haddad
2ef814a274
v9.3.6-canary.3 2020-04-17 15:26:31 -04:00
Joe Haddad
09e38847ea
Update HMR Client Runtime (#11977)
* Update HMR Client Runtime

* Increment event when building or different state

* Dismiss Old Type-Only Overlay

* Update packages/next/client/dev/error-overlay/hot-dev-client.js
2020-04-17 15:24:45 -04:00
Joe Haddad
48e2c19de0
Serialize JSON Warnings Before Event (#11976) 2020-04-17 13:38:09 -04:00
Tim Neutkens
511cf748ee
Enable "paths" support by default (#11970)
* Enable "paths" support by default

* Enable NEXT_PUBLIC_ prefix exposing the variable globally

Part of #11106
2020-04-17 16:28:17 +02:00
Vitor Capretz
26df01800d
docs: improve wording on some pages according to alex.js (#11973) 2020-04-17 16:26:25 +02:00
Tim Neutkens
e0d4ae0447 v9.3.6-canary.2 2020-04-17 11:24:55 +02:00
Tim Neutkens
2fa26a2fd8
Allow disabling runtime JS in production for certain pages (#11949)
This allows a page to be fully static (no runtime JavaScript) on a per-page basis.

The initial implementation does not disable JS in development mode as we need to figure out a way to inject CSS from CSS imports / CSS modules without executing the component JS. This restriction is somewhat similar to https://www.gatsbyjs.org/packages/gatsby-plugin-no-javascript/. All things considered that plugin only has a usage of 600 downloads per week though, hence why I've made this option unstable/experimental initially as I'd like to see adoption patterns for it first.

Having a built-in way to do this makes sense however as the people that do want to adopt this pattern are overriding Next.js internals currently and that'll break between versions.

Related issue: #5054 - Not adding `fixes` right now as this implementation needs more work. If anyone wants to work on this feel free to reach out on https://twitter.com/timneutkens
2020-04-17 11:22:03 +02:00
Paul Matthew Jaworski
22e3c699f6
add warning about manually installing PostCSS plugins (#11966) 2020-04-17 10:27:40 +02:00
Luis Alvarez D
42a328f3e4
Improved steps for examples/cms-prismic (#11935)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-04-16 09:15:43 -05:00
Tim Neutkens
5d0932ce25 v9.3.6-canary.1 2020-04-16 13:44:51 +02:00
Luis Alvarez D
3036463080
Updated shallow docs (#11925) 2020-04-15 15:38:46 -04:00
Tim Neutkens
29c697b36b
Add initial configuration changes for webpack 5 (#11917)
* Disable PnP plugin in webpack 5

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* Use full hashes for hot update names

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* Disable autodll in webpack 5

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* Disable HashedModuleIdsPlugin in webpack 5

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* Use regexes for ignoreplugin as it only supports regexes in webpack 5

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* webpack 4 supports resourceRegExp and contextRegExp

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* Remove webpack 4 specific properties from the webpack 5 config

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* Add library option for webpack 5 support

Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>

* Fix TypeScript Errors

Co-authored-by: Zack Jackson <zackary.l.jackson@gmail.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-15 14:25:02 -04:00
Joe Haddad
fe09c10383
Upgrade terser-webpack-plugin for Webpack 5 (#11922)
* Upgrade `terser-webpack-plugin` for Webpack 5

* Upgrade again

* cacache cannot be bundled

* cacache cannot be bundled

* fix file

* remove cacache dep

* Update LICENSE
2020-04-15 14:20:25 -04:00
Joe Haddad
92dac59630
v9.3.6-canary.0 2020-04-15 02:48:57 -04:00
JJ Kasper
20c7b5c50d
Add initial process.env stubbing for new env support (#11893)
* Add initial process.env stubbing for new env support

* Fix server process.env being stubbed in production

* bump

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-15 02:42:37 -04:00
JJ Kasper
2b116cea29
Ensure module not found error is shown with jsconfig paths (#11889)
* Ensure correct module not found error is shown with jsconfig paths

* bump
2020-04-15 02:33:05 -04:00
Scott Parker
67e6cae448
Correct Global and Local CSS Loading Order in Dev (#11901)
* Global styles now load before local in dev

* fix lint

* Adjust tests

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-15 02:32:25 -04:00
JJ Kasper
2b488ab1e1
Fix NEXT_PUBLIC env values not being inlined (#11896)
* Clean up env tests a bit

* Fix NEXT_PUBLIC env values not being inlined

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-15 02:32:03 -04:00
Gonzalo D'Elia
6202a7f3bd
Fix: Update shallow routing docs (#11894) 2020-04-15 02:21:06 -04:00
Vincent Voyer
7d2ee3b015
docs(Link): precise how prefetch works (#11792)
* docs(Link): precise how prefetch works

After this discussion: https://twitter.com/timneutkens/status/1243572726998188036

This might not be the exact good wording though. Let me know!

* Update docs/api-reference/next/link.md

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

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-04-15 02:03:15 -04:00
Vincent Voyer
90ffdcc33b
docs(auth): add with-iron-session to the alternatives list (#11903)
Following https://github.com/zeit/next.js/pull/11865#issuecomment-613663718
2020-04-15 02:01:40 -04:00
Joe Haddad
c0724cac82
v9.3.5 2020-04-14 23:24:53 -04:00
Joe Haddad
df1e54877c
v9.3.5-canary.13 2020-04-14 19:39:12 -04:00
Matt Carlotta
ffa4089b18
Update with-redux-thunk example to include HMR (#11816)
* Update with-redux-thunk example to include HMR

* Update README

* Fix clock component

* Fix example component

* Fix README
2020-04-14 18:36:50 -05:00
Joe Haddad
682120b732
v9.3.5-canary.12 2020-04-14 19:16:15 -04:00
Fonger
5248e182fe
fix(export): fallback to empty string for basePath (#11880)
* fix(next-server): fallback to empty string for basePath

* Revert extra change and add unit test

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-04-14 19:12:02 -04:00
JJ Kasper
ab18c7929e
Add support for params in header key/values (#10324)
* Add support for params in header key/values

* Update todo

* Update with handling for named patterns

* Use compiled package

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-14 11:47:53 -05:00
Joe Haddad
b1aa594a80
Handle Potential Promise Rejection in Serverless (#11882) 2020-04-14 11:43:46 -04:00
Joe Haddad
d1b987f524
v9.3.5-canary.11 2020-04-14 10:49:42 -04:00
Joe Haddad
841cd6c4d7
Fix Situation Where Build Can Hang Indefinitely (#11881) 2020-04-14 10:25:24 -04:00
Tim Neutkens
4e6d6d206c
Remove unused import (#11875) 2020-04-14 13:31:15 +02:00
Luis Alvarez D
4094dfeff9
Remove with-cookie-auth (#11865) 2020-04-14 11:58:26 +02:00
Tim Neutkens
5713bcbb6c v9.3.5-canary.10 2020-04-14 11:35:38 +02:00
Tim Neutkens
f0422f2119
Revert "minor change in hello-world/package.json" (#11874)
This reverts commit 287961ed91.
2020-04-14 10:11:15 +02:00
JJ Kasper
d3e308a79f
Add basePath in link component and add/remove it consistently (#9988)
* Add basePath in link component and add/remove it consistently

* Update to not use regex for delBasePath

* Expose addBasePath as router method

* Revert "Expose addBasePath as router method"

This reverts commit 40fed596195c6affabf837e42d472452768e13a3.

* Expose basePath as router field

* Apply suggestion

* Expose basePath as router field

* remove un-used vars

* Update externals

* Apply lint fix

* Update size-limit test

* Update prefetch
2020-04-14 09:50:39 +02:00
JJ Kasper
0b51b2340a
Add stats config for load tests (#11868) 2020-04-13 22:00:12 -04:00
Luis Alvarez D
2b1f959b7d
Update shallow routing docs (#11616)
* Updated shallow routing docs

* Include getStaticProps
2020-04-13 20:22:07 -05:00
Luis Alvarez D
20f6429643
Replaced express with next-connect (#11747) 2020-04-13 18:11:41 -05:00
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