Commit graph

2143 commits

Author SHA1 Message Date
Joe Haddad
ad16b8c823
v9.3.6-canary.9 2020-04-22 00:11:37 -04:00
Joe Haddad
d8c71b1537
Evaluate App before Page in Dev for CSS Ordering (#12090) 2020-04-21 23:55:02 -04:00
Fonger
fc830b25de
Upgrade ora to 4.0.4 to prevent undefined progress on CI build (#12088) 2020-04-21 22:52:07 -04:00
Brandon Duffany
548a01754d
Fix type on NextApiHandler (#11988)
* Fix type on NextApiHandler

The example [here](https://nextjs.org/docs/api-routes/api-middlewares) shows that `NextApiHandler` can be async, so the return type should be `void | Promise<void>`.

* Add TS integration tests for API
2020-04-21 19:14:24 -05:00
Joe Haddad
c14ec9cf51
v9.3.6-canary.8 2020-04-21 17:37:03 -04:00
Joe Haddad
07b24e6fa1
Upgrade webpack (#12082)
* Upgrade webpack

* rebundle
2020-04-21 16:05:29 -04:00
JJ Kasper
918cf38d82
Make sure to not show _error without 404 warning in some cases (#12061) 2020-04-21 14:22:39 +02:00
JJ Kasper
b73b2ef8be
Add additional check for segments in destination but not source (#12067)
* Add initial test for invalid segments usage

* Add additional check for segments in destination but not source

* bump
2020-04-21 14:21:41 +02:00
Tim Neutkens
9f1e7132f4 Update year on license files 2020-04-21 12:24:08 +02:00
Tim Neutkens
c60511c76d v9.3.6-canary.7 2020-04-21 11:47:45 +02:00
Tim Neutkens
483bd3ddda
Rename ZEIT to Vercel (#12075)
* Find/replace

* Update more URLs

* More rename

* Fix remaining examples

* More updates

* Update create-next-app

* Update remaining text

* Update

Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-04-21 11:47:12 +02:00
JJ Kasper
16e7871066
v9.3.6-canary.6 2020-04-20 20:02:00 -05:00
JJ Kasper
4d193ea33b
Update to only apply experimental process.env stub in developm… (#12055) 2020-04-20 20:25:36 +02:00
Joe Haddad
544654989f
v9.3.6-canary.5 2020-04-20 01:31:23 -04:00
Joe Haddad
73b859d53e
Add module.hot.invalidate() to webpack HMR (#12038) 2020-04-20 01:26:27 -04:00
Joe Haddad
bc845f2206
Stabilize HMR tests on CI (#12029) 2020-04-19 15:58:55 -04:00
Joe Haddad
450d4bd0f3
Experimental: React Refresh Support (#12008)
* Add Fast Refresh Support

* Add Basic Acceptance Test

* Increase delay

* fix version

* Ignore test files

* Update packages/next/build/webpack/loaders/next-babel-loader.js

* Copy tests

* Redo test style

* drop directory

* fix compile

* fix remove function

* Update helpers
2020-04-19 13:58:31 -04:00
Joe Haddad
86236bc76b
v9.3.6-canary.4 2020-04-19 03:05:13 -04:00
Joe Haddad
4619996d4e
Resolve TypeScript Extension in Correct Order (#12014) 2020-04-19 01:12:36 -04:00
Joe Haddad
ec3f8e5815
Create React Refresh Utils (#12006)
* Create React Refresh Utils

* Fix Linting

* Update Prettier Ignore

* fix rules
2020-04-18 13:55:10 -04:00
Joe Haddad
55ffb96a36
refactor(next-client-pages-loader): allow toggling router HMR (#11989)
* refactor(next-client-pages-loader): allow toggling router HMR

* Turn on

* Toggle dev properly

* Fix Test Run Order
2020-04-17 22:19:37 -04:00
Joe Haddad
bc12794672
Fix On Demand Types in Hot Reloader (#11987) 2020-04-17 18:40:00 -04: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
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
Tim Neutkens
5d0932ce25 v9.3.6-canary.1 2020-04-16 13:44:51 +02: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
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
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
Tim Neutkens
5713bcbb6c v9.3.5-canary.10 2020-04-14 11:35:38 +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