Commit graph

2882 commits

Author SHA1 Message Date
Luis Alvarez D
a5fea53bc8
Update logo for dark mode (#20047)
Closes https://github.com/vercel/next.js/issues/20046
2020-12-09 23:57:07 +00:00
Joe Haddad
19fed3f83b
v10.0.4-canary.3 2020-12-08 11:14:36 -05:00
Tim Neutkens
c792317295
Clear up production build missing message for next start and next export (#19777)
Adds an err.sh link to the production build missing message. Also clears up `valid` as `production`.

Also fixes an edge case where an unhelpful error would be thrown because we checked for `.next` instead of `.next/BUILD_ID`

Added the out directory location as the list line during export to make sure people know where the files are output. 

Fixes #19778
Fixes #19788
2020-12-08 15:16:56 +00:00
JJ Kasper
cf4665539a
Fix failing Azure tests (#19877)
Noticed Azure tests have started failing after https://github.com/vercel/next.js/pull/19758 due to the middleware taking longer than the allotted threshold which adds unexpected logs to stderr. This attempts to resolve these test failures by increasing the allotted time for the middleware when running on Azure. 

x-ref: https://dev.azure.com/nextjs/next.js/_build/results?buildId=22617&view=logs&jobId=5ee44de4-e310-59d9-0ba5-4a271a649fb0&j=5ee44de4-e310-59d9-0ba5-4a271a649fb0&t=af3fb693-3771-5a1a-ec97-2ba4cc77f25c
x-ref: https://dev.azure.com/nextjs/next.js/_build/results?buildId=22619&view=logs&jobId=5ee44de4-e310-59d9-0ba5-4a271a649fb0&j=5ee44de4-e310-59d9-0ba5-4a271a649fb0&t=af3fb693-3771-5a1a-ec97-2ba4cc77f25c
2020-12-08 09:24:22 +00:00
Tim Neutkens
4bca939ff7
Remove aliases that are no longer needed (#19937)
Fixes #19939
2020-12-07 22:35:28 +00:00
JJ Kasper
358861d315
Ensure trailingSlash redirect applies correctly for i18n (#19859)
This ensures locales aren't applied for the trailing slash redirect un-necessarily

Fixes: https://github.com/vercel/next.js/issues/19784
2020-12-07 17:36:46 +00:00
Daniel Kempner
90e97b535b
Custom Server with bodyParser, don't parse body again in API Route (#16169)
## Why

Some users prefer to use a custom server implementation that handles body parsing. If they do this, they have no way to opt out of all body parsing in API Routes. Requests with bodies die if next's `bodyParser` is not disabled. Requests just hang forever.

Instead of adding [this config](https://nextjs.org/docs/api-routes/api-middlewares#custom-config) to every API Route, we do a simple check to avoid parsing the body twice.

Fixes #8315
Fixes #7960
2020-12-07 13:30:38 +00:00
JJ Kasper
b403e9ec15 v10.0.4-canary.2 2020-12-04 09:48:30 -06:00
Pepijn Senders
3f730fc7b1
Improve way cache version string is created (#19763)
Nitpicky change, but the version string contained a double `|`, implying that there might be an empty value between `process.env.__NEXT_VERSION` and the environment variables.
2020-12-04 14:08:02 +00:00
JJ Kasper
42385f48db
Ensure i18n custom routes resolves correctly (#19766)
This ensures i81n custom routes are resolving correctly, it also corrects redirects for default locales when `locale: false` is not used, and this also simplifies the resolving for custom routes with i18n in `next-server` adding types for the i18n config. This also adds additional tests to prevent regression and starts leveraging a shared `NextConfig` type to allow us to share types for config values. 

Fixes: https://github.com/vercel/next.js/issues/19521
Fixes: https://github.com/vercel/next.js/issues/19403
Fixes: https://github.com/vercel/next.js/issues/19302
Fixes: https://github.com/vercel/next.js/issues/19227
2020-12-04 10:14:55 +00:00
Prateek Bhatnagar
57e156bc49
Making font optimization as default (#19758)
- Making font optimizations as default
- Re-enabling tests
- Fixes #19159
2020-12-04 09:52:54 +00:00
JJ Kasper
bb1bdbb10f
Update @ampproject/toolbox-optimizer to latest version (#19722)
This updates to the latest version of the `@ampproject/toolbox-optimizer` which contains updates for dependencies to remove the warnings on install from `npm`

x-ref: https://github.com/vercel/next.js/pull/18994
Closes: https://github.com/vercel/next.js/issues/17416
2020-12-02 12:55:43 +00:00
JJ Kasper
7ae76f4326 v10.0.4-canary.1 2020-12-01 18:00:06 -06:00
Jeff Escalante
b86a1731e1
Error Message Clarity (#16052)
* make the error message more clear if webpack config comes back undefined

* Update check and add test

* bump

* Update build-output test

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-12-01 15:58:52 -06:00
JJ Kasper
d016eadeef v10.0.4-canary.0 2020-12-01 14:53:27 -06:00
Janicklas Ralph
c8cd77a856
Script loader component (#18281) 2020-12-01 19:10:16 +01:00
Janicklas Ralph
6e4632efe1
Css optimizations (#16539)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-12-01 19:02:07 +01:00
Steven
fddad89cbc
Fix cloudinary default quality to use q_auto (#19694)
The [default loader](17b91e7c76/packages/next/client/image.tsx (L488)) and [imgix loader](https://docs.imgix.com/apis/rendering/format/q) use a quality of 75 if none is specified on the Image component.

This PR does something similar for the cloudinary loader by utilizing `q_auto`, but it should yield even better results.

> This setting can significantly reduce the file size without any degradation noticeable to the human eye, and without the need for you to individually analyze every image.

https://cloudinary.com/documentation/image_optimization#use_q_auto_automatic_quality_and_encoding

### Example
- [Before](https://res.cloudinary.com/demo/image/upload/woman.jpg) - 583KB
- [After](https://res.cloudinary.com/demo/image/upload/q_auto/woman.jpg) - 46KB
2020-12-01 16:09:11 +00:00
Guy Bedford
9dd5ff2baa
fix: Revert #18921 and inline absolute babel runtime only for YarnPnp (#19542)
This reverts #18921 and ensures that the Babel runtime is only inlined as an absolute path when using PnP as before, but then including the correction this resolution as implemented by @merceyz only in the PnP cases, while keeping the diff to a minimum.
2020-11-25 22:28:39 +00:00
JJ Kasper
899a29cade
Break up the serverless loader into typed handlers (#19511)
This breaks up the `serverless-loader` into typed handlers to allow for easier maintenance and better type-checking/linting. 

Closes: https://github.com/vercel/next.js/issues/19071
2020-11-25 19:56:18 +00:00
Jamie
397a375b37
Ensure next commands respect termination signals (#19433)
Fixes #16173

## What

Restores handling of termination signals, `SIGTERM` and `SIGINT`, to allow graceful termination of next commands. Seems to have been removed during a child process refactor #6450, was this intentional?

## Why 

Currently the command processes have to be forcefully killed. This would help those using Next.js with custom servers and tools like Docker and Kubernetes that rely on termination signals to shutdown instances.

---

Where would be a good location to add some tests? [test/integration/cli/test/index.test.js](fc98c13a2e/test/integration/cli/test/index.test.js)?
2020-11-25 13:30:06 +00:00
Joe Haddad
17c81cdce3
v10.0.3 2020-11-24 01:11:41 -05:00
Joe Haddad
38df992aa6
v10.0.3-canary.3 2020-11-24 00:26:13 -05:00
Joe Haddad
b063f85f87
v10.0.3-canary.2 2020-11-23 15:13:38 -05:00
Joe Haddad
2832e753ad
Update vitals URL (#19454)
Update for rebranding purposes
2020-11-23 20:08:04 +00:00
Joe Haddad
8ddb3ad7da
v10.0.3-canary.1 2020-11-23 10:16:30 -05:00
Joe Haddad
c96c13a71b
Use render after hydrate (#19442)
Fixes #19399
2020-11-23 15:04:12 +00:00
JJ Kasper
e1737809db
Update fallback locale for locale: false (#19322)
This updates the fallback locale for `locale: false` to be the `defaultLocale` instead of the currently active `locale` as it allows passing through URLs more seamlessly as a URL without the locale prefixed can be treated as the `defaultLocale` instead of having to worry if the locale matches the currently active locale. This also ensures `locale={false}` is tested in the i18n-support-catchall suite

Closes: https://github.com/vercel/next.js/issues/19048
2020-11-20 21:50:26 +00:00
Connor Davis
c1702c2349
Exclude well known files when trailing slash: true (#19364)
* Exclude well known files when trailing slash: true

* Update manifest test

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-11-20 15:17:58 -06:00
JJ Kasper
26634c475e
v10.0.3-canary.0 2020-11-20 14:39:12 -06:00
JJ Kasper
2790ea411b
Ensure i18n + trailingSlash works for different page types (#19331)
This adds additional test coverage and more handling for i18n + `trailingSlash: true`

Closes: https://github.com/vercel/next.js/issues/19069
2020-11-20 18:45:47 +00:00
JJ Kasper
7782ba6ff8
Ensure export progress handles less pages than segments (#19281)
This updates the export progress to make sure we log out the final progress update when less pages than number of progress updates (segments). This also adds tests to ensure we are logging the progress out as expected. 

Fixes: https://github.com/vercel/next.js/issues/19122
Closes: https://github.com/vercel/next.js/pull/19123
2020-11-20 16:57:34 +00:00
JJ Kasper
5959f18431
Ensure non-configured i18n locales 404 (#19338)
This ensures navigations to non-configured locales causes the 404 page to be shown, it also adds tests to ensure direct visits for non-configured locales 404s correctly. 

Fixes: https://github.com/vercel/next.js/issues/19214
2020-11-20 15:07:00 +00:00
JJ Kasper
13aa9d666c
Correct errsh links in config checks (#19280)
This makes sure we're using `next.js` in the err.sh links instead of `nextjs` since that leads to a 404
2020-11-20 13:04:18 +00:00
JJ Kasper
8193df5309
Fix serverless with next start error case (#19288)
This fixes the case where we were returning page data when rendering `/_error` in `serverless` mode with `next start`

Closes: https://github.com/vercel/next.js/issues/19068
2020-11-19 16:25:54 +00:00
Sylvain Bannier
ce7ca2487b
Rewrite locale : fix wrong error message (#19319) 2020-11-19 16:04:55 +00:00
Joe Haddad
30c2dfdc47
Remove old modern mode experiment (#19275)
This PR removes the modern mode experiment because:

- It does not yield meaningful bundle size wins when compared to other initiatives we've taken
- It's not compatible with webpack 5 (which we're upgrading to)
- It's currently broken and causes most apps to malfunction
- There's no champion currently owning the experiment

We can re-introduce this in the future when we'd like to make it a default for all Next.js apps.

Note: **Next.js still supports Differential Loading (`nomodule`) and does it by default.** This PR strictly removes the experimental modern _syntax_, and does not disable our existing modern/legacy polyfilling.

---

Fixes #19200
Fixes #18960
Fixes #14707
Fixes #14465
2020-11-18 18:30:00 +00:00
Joe Haddad
ce5d9c858b
v10.0.2 2020-11-18 08:49:17 -05:00
Joe Haddad
5e5f206bcf
v10.0.2-canary.20 2020-11-18 00:49:44 -05:00
JJ Kasper
ca590c4cb9
Ensure i18n + trailingSlash: true handles correctly (#19149)
This ensures redirects are handled properly with i18n + `trailingSlash: true`, additional tests have also been added to ensure this is covered 

Fixes: https://github.com/vercel/next.js/issues/19069
2020-11-17 21:46:46 +00:00
JJ Kasper
2750880546
v10.0.2-canary.19 2020-11-17 12:54:56 -06:00
JJ Kasper
99e10a07fb
Ensure data prefetch for default locale is correct (#19085)
This makes sure SSG data is correctly prefetched for the default locale and other locales on the same page. Tests for this behavior have been added for catch-all and normal pages. 

Closes: https://github.com/vercel/next.js/issues/19048
2020-11-17 18:04:07 +00:00
Joe Haddad
ab0e2744ee
Upgrade styled-jsx (#19241)
This fixes compatibility with React 17 and `styled-jsx`.

Fixes #19242
2020-11-17 16:53:35 +00:00
Joe Haddad
7374d4ffb9
v10.0.2-canary.18 2020-11-15 16:41:42 -05:00
JJ Kasper
00f8297c4d
Fix prefetching in IE11 (#19171)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-11-15 16:18:16 -05:00
JJ Kasper
f0d2e64371
v10.0.2-canary.17 2020-11-14 09:14:53 -06:00
Joe Haddad
61c3db7368
Fix minifying inline CSS comments (#19167)
We accidentally regressed back in 9.5 and dropped support for inline CSS comments. PostCSS always parses these as pass-through (and not a syntax error), which can cause problems when minifying.

Browsers do a similar thing and ignore the comments.

To ensure we generate valid CSS, this adds support for stripping the CSS comments from the build.

--- 

Fixes #15589
Closes #17130
2020-11-14 15:03:04 +00:00
JJ Kasper
a32b1f4870
Enable handling for revalidate and notFound (#19165)
This allows SSG pages that return `notFound` to be revalidated. 

Closes: https://github.com/vercel/next.js/issues/18651
2020-11-14 07:12:47 +00:00
Joe Haddad
c1d2c32852
v10.0.2-canary.16 2020-11-13 22:40:37 -05:00
JJ Kasper
1e61b69e31
Add locale: false for custom-routes + i18n (#19164)
This mirrors the `basePath: false` behavior for custom-routes with `locale: false` to allow users to configure the locales manually (`locale: false`) or have the locales be handled automatically for custom-routes. 

Fixes: https://github.com/vercel/next.js/issues/18927
Fixes: https://github.com/vercel/next.js/issues/18795
2020-11-14 03:35:42 +00:00